mirror of
https://github.com/Baipyrus/nvim-config.git
synced 2024-12-27 05:41:45 +00:00
Compare commits
No commits in common. "0021ecd32e84de15d16435ae97de1a5290787735" and "9cd6ce3279e78e369694e7390adfe7ee80ab714c" have entirely different histories.
0021ecd32e
...
9cd6ce3279
@ -38,8 +38,8 @@ Neovim's configurations are located under the following paths, depending on your
|
||||
| OS | PATH |
|
||||
| :- | :--- |
|
||||
| Linux, MacOS | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` |
|
||||
| Windows (cmd)| `%localappdata%\nvim\` |
|
||||
| Windows (powershell)| `$env:LOCALAPPDATA\nvim\` |
|
||||
| Windows (cmd)| `%userprofile%\AppData\Local\nvim\` |
|
||||
| Windows (powershell)| `$env:USERPROFILE\AppData\Local\nvim\` |
|
||||
|
||||
### Install this Configuration
|
||||
|
||||
@ -58,13 +58,13 @@ git clone https://github.com/Baipyrus/nvim-config.git "${XDG_CONFIG_HOME:-$HOME/
|
||||
If you're using `cmd.exe`:
|
||||
|
||||
```bat
|
||||
git clone https://github.com/Baipyrus/nvim-config.git %localappdata%\nvim\
|
||||
git clone https://github.com/Baipyrus/nvim-config.git %userprofile%\AppData\Local\nvim\
|
||||
```
|
||||
|
||||
If you're using `powershell.exe`
|
||||
|
||||
```pwsh
|
||||
git clone https://github.com/Baipyrus/nvim-config.git $env:LOCALAPPDATA\nvim\
|
||||
git clone https://github.com/Baipyrus/nvim-config.git $env:USERPROFILE\AppData\Local\nvim\
|
||||
```
|
||||
|
||||
</details>
|
||||
|
52
lua/custom/plugins/harpoon.lua
Normal file
52
lua/custom/plugins/harpoon.lua
Normal file
@ -0,0 +1,52 @@
|
||||
return {
|
||||
'ThePrimeagen/harpoon',
|
||||
branch = 'harpoon2',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
'nvim-telescope/telescope.nvim',
|
||||
},
|
||||
config = function()
|
||||
local harpoon = require 'harpoon'
|
||||
harpoon:setup {}
|
||||
|
||||
-- basic telescope configuration
|
||||
local conf = require('telescope.config').values
|
||||
local function toggle_telescope(harpoon_files)
|
||||
local file_paths = {}
|
||||
for _, item in ipairs(harpoon_files.items) do
|
||||
table.insert(file_paths, item.value)
|
||||
end
|
||||
|
||||
require('telescope.pickers')
|
||||
.new({}, {
|
||||
prompt_title = 'Harpoon',
|
||||
finder = require('telescope.finders').new_table {
|
||||
results = file_paths,
|
||||
},
|
||||
previewer = conf.file_previewer {},
|
||||
sorter = conf.generic_sorter {},
|
||||
})
|
||||
:find()
|
||||
end
|
||||
|
||||
-- Open harpoon list window
|
||||
vim.keymap.set('n', '<leader>ho', function()
|
||||
toggle_telescope(harpoon:list())
|
||||
end, { desc = '[H]arpoon [O]pen' })
|
||||
-- Append to harpoon list
|
||||
vim.keymap.set('n', '<leader>ha', function()
|
||||
harpoon:list():append()
|
||||
end, { desc = '[H]arpoon [A]ppend' })
|
||||
-- Append to harpoon list
|
||||
vim.keymap.set('n', '<leader>hr', function()
|
||||
harpoon:list():remove()
|
||||
end, { desc = '[H]arpoon [R]emove' })
|
||||
-- Toggle previous & next buffers stored within Harpoon list
|
||||
vim.keymap.set('n', '<C-S-p>', function()
|
||||
harpoon:list():prev()
|
||||
end)
|
||||
vim.keymap.set('n', '<C-S-n>', function()
|
||||
harpoon:list():next()
|
||||
end)
|
||||
end,
|
||||
}
|
@ -6,13 +6,13 @@
|
||||
--]]
|
||||
|
||||
local check_version = function()
|
||||
local verstr = tostring(vim.version())
|
||||
if not vim.version.ge then
|
||||
local verstr = string.format('%s.%s.%s', vim.version().major, vim.version().minor, vim.version().patch)
|
||||
if not vim.version.cmp then
|
||||
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
|
||||
return
|
||||
end
|
||||
|
||||
if vim.version.ge(vim.version(), '0.10-dev') then
|
||||
if vim.version.cmp(vim.version(), { 0, 9, 4 }) >= 0 then
|
||||
vim.health.ok(string.format("Neovim version is: '%s'", verstr))
|
||||
else
|
||||
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
|
||||
|
@ -127,11 +127,6 @@ return {
|
||||
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
|
||||
},
|
||||
sources = {
|
||||
{
|
||||
name = 'lazydev',
|
||||
-- set group index to 0 to skip loading LuaLS completions as lazydev recommends it
|
||||
group_index = 0,
|
||||
},
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'luasnip' },
|
||||
{ name = 'path' },
|
||||
|
@ -1,8 +1,7 @@
|
||||
return {
|
||||
{ -- Autoformat
|
||||
'stevearc/conform.nvim',
|
||||
event = { 'BufWritePre' },
|
||||
cmd = { 'ConformInfo' },
|
||||
lazy = false,
|
||||
keys = {
|
||||
{
|
||||
'<leader>fb',
|
||||
|
@ -17,7 +17,7 @@ return {
|
||||
vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, {
|
||||
group = lint_augroup,
|
||||
callback = function()
|
||||
lint.try_lint()
|
||||
require('lint').try_lint()
|
||||
end,
|
||||
})
|
||||
end,
|
||||
|
@ -11,19 +11,9 @@ return {
|
||||
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
|
||||
{ 'j-hui/fidget.nvim', opts = {} },
|
||||
|
||||
-- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins
|
||||
-- `neodev` configures Lua LSP for your Neovim config, runtime and plugins
|
||||
-- used for completion, annotations and signatures of Neovim apis
|
||||
{
|
||||
'folke/lazydev.nvim',
|
||||
ft = 'lua',
|
||||
opts = {
|
||||
library = {
|
||||
-- Load luvit types when the `vim.uv` word is found
|
||||
{ path = 'luvit-meta/library', words = { 'vim%.uv' } },
|
||||
},
|
||||
},
|
||||
},
|
||||
{ 'Bilal2453/luvit-meta', lazy = true },
|
||||
{ 'folke/neodev.nvim', opts = {} },
|
||||
},
|
||||
config = function()
|
||||
-- Brief aside: **What is LSP?**
|
||||
@ -117,7 +107,7 @@ return {
|
||||
--
|
||||
-- When you move your cursor, the highlights will be cleared (the second autocommand).
|
||||
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
||||
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then
|
||||
if client and client.server_capabilities.documentHighlightProvider then
|
||||
local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false })
|
||||
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
|
||||
buffer = event.buf,
|
||||
@ -140,13 +130,13 @@ return {
|
||||
})
|
||||
end
|
||||
|
||||
-- The following code creates a keymap to toggle inlay hints in your
|
||||
-- The following autocommand is used to enable inlay hints in your
|
||||
-- code, if the language server you are using supports them
|
||||
--
|
||||
-- This may be unwanted, since they displace some of your code
|
||||
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then
|
||||
if client and client.server_capabilities.inlayHintProvider and vim.lsp.inlay_hint then
|
||||
map('<leader>th', function()
|
||||
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf })
|
||||
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
|
||||
end, '[T]oggle Inlay [H]ints')
|
||||
end
|
||||
end,
|
||||
|
@ -6,7 +6,7 @@ return {
|
||||
--
|
||||
-- Examples:
|
||||
-- - va) - [V]isually select [A]round [)]paren
|
||||
-- - yinq - [Y]ank [I]nside [N]ext [Q]uote
|
||||
-- - yinq - [Y]ank [I]nside [N]ext [']quote
|
||||
-- - ci' - [C]hange [I]nside [']quote
|
||||
require('mini.ai').setup { n_lines = 500 }
|
||||
|
||||
|
@ -10,29 +10,21 @@ return {
|
||||
build = ':TSUpdate',
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
'bash',
|
||||
'c',
|
||||
'diff',
|
||||
'html',
|
||||
'lua',
|
||||
'luadoc',
|
||||
'markdown',
|
||||
'markdown_inline',
|
||||
'query',
|
||||
'vim',
|
||||
'vimdoc',
|
||||
|
||||
'javascript',
|
||||
'typescript',
|
||||
'svelte',
|
||||
'php',
|
||||
|
||||
'python',
|
||||
'rust',
|
||||
'javascript',
|
||||
'typescript',
|
||||
'vimdoc',
|
||||
'vim',
|
||||
'svelte',
|
||||
'c_sharp',
|
||||
|
||||
'luadoc',
|
||||
'markdown',
|
||||
'gitcommit',
|
||||
'gitignore',
|
||||
'html',
|
||||
'php',
|
||||
},
|
||||
-- Autoinstall languages that are not installed
|
||||
auto_install = true,
|
||||
|
@ -1,7 +1,7 @@
|
||||
-- [[ Install `lazy.nvim` plugin manager ]]
|
||||
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
|
||||
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
|
||||
if not vim.uv.fs_stat(lazypath) then
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
|
||||
local out = vim.fn.system {
|
||||
'git',
|
||||
|
@ -63,6 +63,7 @@ require('lazy').setup({
|
||||
|
||||
require 'kickstart.plugins.indent_line',
|
||||
require 'kickstart.plugins.lint',
|
||||
-- require 'kickstart.plugins.neo-tree',
|
||||
|
||||
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
||||
-- This is the easiest way to modularize your config.
|
||||
|
Loading…
Reference in New Issue
Block a user