Nvim: update config for lsp and add few minor plugins
This commit is contained in:
@@ -14,12 +14,13 @@ vim.g.mapleader = ' '
|
|||||||
vim.g.maplocalleader = ' '
|
vim.g.maplocalleader = ' '
|
||||||
|
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
require'lazy'.setup('plugins', {
|
require'lazy'.setup('plugins')
|
||||||
change_detection = {
|
-- , {
|
||||||
enabled = true,
|
-- change_detection = {
|
||||||
notify = false
|
-- enabled = false,
|
||||||
},
|
-- notify = false
|
||||||
dev = {
|
-- },
|
||||||
path = '/home/kmcr'
|
-- dev = {
|
||||||
}
|
-- path = '/home/kmcr'
|
||||||
})
|
-- }
|
||||||
|
-- })
|
||||||
|
|||||||
@@ -7,5 +7,6 @@ return {
|
|||||||
-- dev = true,
|
-- dev = true,
|
||||||
config = function()
|
config = function()
|
||||||
require('bitbucket-nvim').setup({ opt = "test"})
|
require('bitbucket-nvim').setup({ opt = "test"})
|
||||||
end
|
end,
|
||||||
|
enabled = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ return { {
|
|||||||
'disrupted/blink-cmp-conventional-commits',
|
'disrupted/blink-cmp-conventional-commits',
|
||||||
'moyiz/blink-emoji.nvim',
|
'moyiz/blink-emoji.nvim',
|
||||||
'milanglacier/minuet-ai.nvim',
|
'milanglacier/minuet-ai.nvim',
|
||||||
|
'mikavilpas/blink-ripgrep.nvim',
|
||||||
},
|
},
|
||||||
|
|
||||||
-- use a release tag to download pre-built binaries
|
-- use a release tag to download pre-built binaries
|
||||||
@@ -41,7 +42,16 @@ return { {
|
|||||||
-- Default list of enabled providers defined so that you can extend it
|
-- Default list of enabled providers defined so that you can extend it
|
||||||
-- elsewhere in your config, without redefining it, due to `opts_extend`
|
-- elsewhere in your config, without redefining it, due to `opts_extend`
|
||||||
sources = {
|
sources = {
|
||||||
default = { 'conventional_commits', 'lsp', 'path', 'snippets', 'buffer', 'emoji', 'codecompanion', --[[ 'minuet' ]] },
|
default = {
|
||||||
|
'conventional_commits',
|
||||||
|
'lsp',
|
||||||
|
'path',
|
||||||
|
'snippets',
|
||||||
|
'buffer',
|
||||||
|
'emoji',
|
||||||
|
--'ripgrep',
|
||||||
|
--[[ 'minuet' ]]
|
||||||
|
},
|
||||||
providers = {
|
providers = {
|
||||||
conventional_commits = {
|
conventional_commits = {
|
||||||
name = "Conventional Commits",
|
name = "Conventional Commits",
|
||||||
@@ -69,6 +79,11 @@ return { {
|
|||||||
timeout_ms = 3000,
|
timeout_ms = 3000,
|
||||||
score_offset = 50, -- Gives minuet higher priority among suggestions
|
score_offset = 50, -- Gives minuet higher priority among suggestions
|
||||||
},
|
},
|
||||||
|
ripgrep = {
|
||||||
|
module = 'blink-ripgrep',
|
||||||
|
name = 'Ripgrep',
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -45,4 +45,5 @@ return {
|
|||||||
log_level = "DEBUG",
|
log_level = "DEBUG",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
enabled = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,6 +44,9 @@ return {
|
|||||||
-- 'm15a/nvim-srcerite', - requires buggy highlite
|
-- 'm15a/nvim-srcerite', - requires buggy highlite
|
||||||
'nyoom-engineering/oxocarbon.nvim',
|
'nyoom-engineering/oxocarbon.nvim',
|
||||||
'rjshkhr/shadow.nvim',
|
'rjshkhr/shadow.nvim',
|
||||||
|
'folke/tokyonight.nvim',
|
||||||
|
'nendix/zen.nvim',
|
||||||
|
'mcauley-penney/techbase.nvim',
|
||||||
'default'
|
'default'
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -31,5 +31,5 @@ return {
|
|||||||
hijack_file_patterns = { "*.png", "*.jpg", "*.jpeg", "*.gif", "*.webp", "*.avif", "*.svg" }, -- render image files as images when opened
|
hijack_file_patterns = { "*.png", "*.jpg", "*.jpeg", "*.gif", "*.webp", "*.avif", "*.svg" }, -- render image files as images when opened
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
enabled = true
|
enabled = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,9 +8,7 @@ return {
|
|||||||
{ url = "http://git.sr.ht/~p00f/clangd_extensions.nvim" },
|
{ url = "http://git.sr.ht/~p00f/clangd_extensions.nvim" },
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local nvim_lsp = require('lspconfig')
|
require('clangd_extensions').setup({
|
||||||
vim.lsp.config('clangd_extensions', {
|
|
||||||
-- require('clangd_extensions').setup({
|
|
||||||
ast = {
|
ast = {
|
||||||
-- These are unicode, should be available in any font
|
-- These are unicode, should be available in any font
|
||||||
role_icons = {
|
role_icons = {
|
||||||
@@ -109,9 +107,9 @@ return {
|
|||||||
virtual_text = false,
|
virtual_text = false,
|
||||||
update_in_insert = false,
|
update_in_insert = false,
|
||||||
severity_sort = true,
|
severity_sort = true,
|
||||||
virtual_lines = {
|
-- virtual_lines = {
|
||||||
current_line = true,
|
-- current_line = true,
|
||||||
}
|
-- }
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
@@ -125,16 +123,22 @@ return {
|
|||||||
-- )
|
-- )
|
||||||
--capabilities.offsetEncoding = { "utf-16" }
|
--capabilities.offsetEncoding = { "utf-16" }
|
||||||
|
|
||||||
nvim_lsp.groovyls.setup({
|
vim.lsp.config('groovyls', {
|
||||||
cmd = { "java", "-jar", "/home/kmcr/tools/groovy-language-server/build/libs/groovy-language-server-all.jar" },
|
cmd = { "java", "-jar", "/home/kmcr/tools/groovy-language-server/build/libs/groovy-language-server-all.jar" },
|
||||||
capabilities = capabilities
|
capabilities = capabilities
|
||||||
})
|
})
|
||||||
|
|
||||||
nvim_lsp.clangd.setup({
|
vim.lsp.config('clangd_extensions', {
|
||||||
|
cmd = {
|
||||||
|
"/workspace/WayveCode/bzl-build/WayveCode/external/llvm_toolchain_llvm/bin/clangd",
|
||||||
|
"--background-index",
|
||||||
|
"-j=32",
|
||||||
|
"--header-insertion=never"},
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
|
filetypes = { "cpp" },
|
||||||
})
|
})
|
||||||
|
|
||||||
nvim_lsp.pylsp.setup({
|
vim.lsp.config('pylsp', {
|
||||||
settings = {
|
settings = {
|
||||||
pylint = {
|
pylint = {
|
||||||
enabled = true
|
enabled = true
|
||||||
@@ -146,7 +150,7 @@ return {
|
|||||||
capabilities = capabilities
|
capabilities = capabilities
|
||||||
})
|
})
|
||||||
|
|
||||||
nvim_lsp.lua_ls.setup({
|
vim.lsp.config('lua_ls', {
|
||||||
settings = {
|
settings = {
|
||||||
Lua = {
|
Lua = {
|
||||||
diagnostics = { globals = { "vim" } },
|
diagnostics = { globals = { "vim" } },
|
||||||
@@ -174,19 +178,19 @@ return {
|
|||||||
-- }
|
-- }
|
||||||
-- })
|
-- })
|
||||||
|
|
||||||
nvim_lsp.typos_lsp.setup({
|
vim.lsp.config('typos_lsp', {
|
||||||
cmd = { 'typos-lsp' },
|
cmd = { 'typos-lsp' },
|
||||||
filetypes = { '*' },
|
filetypes = { '*' },
|
||||||
root_dir = nvim_lsp.util.root_pattern('typos.toml', '_typos.toml', '.typos.toml'),
|
root_dir = require("lspconfig.util").root_pattern('typos.toml', '_typos.toml', '.typos.toml'),
|
||||||
single_file_support = true,
|
single_file_support = true,
|
||||||
settings = {},
|
settings = {},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Use a loop to conveniently call 'setup' on multiple servers and
|
-- Use a loop to conveniently call 'setup' on multiple servers and
|
||||||
-- map buffer local keybindings when the language server attaches
|
-- map buffer local keybindings when the language server attaches
|
||||||
local servers = { "cmake", "rust_analyzer", "bashls", "marksman" }
|
local servers = { "cmake", "rust_analyzer", "bashls", "marksman", "bzl" }
|
||||||
for _, lsp in ipairs(servers) do
|
for _, lsp in ipairs(servers) do
|
||||||
nvim_lsp[lsp].setup({
|
vim.lsp.config(lsp, {
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -8,4 +8,8 @@ return {{
|
|||||||
}, {
|
}, {
|
||||||
'mong8se/buffish.nvim',
|
'mong8se/buffish.nvim',
|
||||||
vim.keymap.set("n", "<leader>tb", function() require('buffish').open() end, { desc = "Open buffers list" })
|
vim.keymap.set("n", "<leader>tb", function() require('buffish').open() end, { desc = "Open buffers list" })
|
||||||
|
}, {
|
||||||
|
"benomahony/oil-git.nvim",
|
||||||
|
dependencies = { "stevearc/oil.nvim" },
|
||||||
|
enabled = false
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -3,4 +3,5 @@ return {
|
|||||||
config = function()
|
config = function()
|
||||||
require("pendulum").setup()
|
require("pendulum").setup()
|
||||||
end,
|
end,
|
||||||
|
enabled = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,11 +6,12 @@ return {
|
|||||||
'nvim-telescope/telescope-symbols.nvim',
|
'nvim-telescope/telescope-symbols.nvim',
|
||||||
'mrloop/telescope-git-branch.nvim',
|
'mrloop/telescope-git-branch.nvim',
|
||||||
{
|
{
|
||||||
"isak102/telescope-git-file-history.nvim",
|
'isak102/telescope-git-file-history.nvim',
|
||||||
dependencies = { "tpope/vim-fugitive" }
|
dependencies = { 'tpope/vim-fugitive' }
|
||||||
},
|
},
|
||||||
'kiyoon/telescope-insert-path.nvim',
|
'kiyoon/telescope-insert-path.nvim',
|
||||||
"zongben/navimark.nvim",
|
'zongben/navimark.nvim',
|
||||||
|
'johmsalas/text-case.nvim',
|
||||||
},
|
},
|
||||||
event = 'VeryLazy',
|
event = 'VeryLazy',
|
||||||
--cmd = ":Telescope",
|
--cmd = ":Telescope",
|
||||||
@@ -56,6 +57,17 @@ return {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
require('textcase').setup({
|
||||||
|
enabled_methods = {
|
||||||
|
"to_lower_case",
|
||||||
|
"to_snake_case",
|
||||||
|
"to_dash_case",
|
||||||
|
"to_constant_case",
|
||||||
|
"to_camel_case",
|
||||||
|
"to_title_case",
|
||||||
|
"to_path_case",
|
||||||
|
}
|
||||||
|
})
|
||||||
require('telescope').load_extension('undo')
|
require('telescope').load_extension('undo')
|
||||||
require('telescope').load_extension('menufacture')
|
require('telescope').load_extension('menufacture')
|
||||||
require("telescope").load_extension("git_file_history")
|
require("telescope").load_extension("git_file_history")
|
||||||
@@ -75,6 +87,8 @@ return {
|
|||||||
-- Neovim lsp pickers
|
-- Neovim lsp pickers
|
||||||
map('n', 'grr', function() require("telescope.builtin").lsp_references() end, def)
|
map('n', 'grr', function() require("telescope.builtin").lsp_references() end, def)
|
||||||
map('n', 'gd', function() require("telescope.builtin").lsp_definitions() end, def)
|
map('n', 'gd', function() require("telescope.builtin").lsp_definitions() end, def)
|
||||||
|
map('n', 'grt', "<cmd>TextCaseOpenTelescope<CR>", def)
|
||||||
|
map('x', 'grt', "<cmd>TextCaseOpenTelescope<CR>", def)
|
||||||
-- git pickers
|
-- git pickers
|
||||||
-- map('n', '<leader>gc', function() require("telescope.builtin").git_commits() end, def)
|
-- map('n', '<leader>gc', function() require("telescope.builtin").git_commits() end, def)
|
||||||
-- map('n', '<leader>gC', function() require("telescope.builtin").git_bcommits() end, def)
|
-- map('n', '<leader>gC', function() require("telescope.builtin").git_bcommits() end, def)
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ return {
|
|||||||
"ini",
|
"ini",
|
||||||
"jq",
|
"jq",
|
||||||
"json",
|
"json",
|
||||||
"latex",
|
--"latex",
|
||||||
"lua",
|
"lua",
|
||||||
"make",
|
"make",
|
||||||
"markdown",
|
"markdown",
|
||||||
|
|||||||
Reference in New Issue
Block a user