Nvim: update config for lsp and add few minor plugins

This commit is contained in:
Robert Kmiec
2025-12-05 10:46:37 +00:00
parent 2aa4027f9d
commit 1437d1826e
11 changed files with 74 additions and 30 deletions

View File

@@ -8,9 +8,7 @@ return {
{ url = "http://git.sr.ht/~p00f/clangd_extensions.nvim" },
},
config = function()
local nvim_lsp = require('lspconfig')
vim.lsp.config('clangd_extensions', {
-- require('clangd_extensions').setup({
require('clangd_extensions').setup({
ast = {
-- These are unicode, should be available in any font
role_icons = {
@@ -109,9 +107,9 @@ return {
virtual_text = false,
update_in_insert = false,
severity_sort = true,
virtual_lines = {
current_line = true,
}
-- virtual_lines = {
-- current_line = true,
-- }
})
end
})
@@ -125,16 +123,22 @@ return {
-- )
--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" },
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,
filetypes = { "cpp" },
})
nvim_lsp.pylsp.setup({
vim.lsp.config('pylsp', {
settings = {
pylint = {
enabled = true
@@ -146,7 +150,7 @@ return {
capabilities = capabilities
})
nvim_lsp.lua_ls.setup({
vim.lsp.config('lua_ls', {
settings = {
Lua = {
diagnostics = { globals = { "vim" } },
@@ -174,19 +178,19 @@ return {
-- }
-- })
nvim_lsp.typos_lsp.setup({
vim.lsp.config('typos_lsp', {
cmd = { 'typos-lsp' },
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,
settings = {},
})
-- Use a loop to conveniently call 'setup' on multiple servers and
-- 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
nvim_lsp[lsp].setup({
vim.lsp.config(lsp, {
capabilities = capabilities,
})
end