Updated nvim which forced me to change the lsp config, no longer using

that plugin (which honestly wasn't doing much) and I am now using the
nvim built in perfered way to config the lsps.
This commit is contained in:
2025-10-21 21:26:49 -07:00
parent ca2d6550fa
commit 0a6c51ad4f
2 changed files with 82 additions and 39 deletions
+77 -33
View File
@@ -37,39 +37,83 @@ local on_attach = function(client, bufnr)
--vim.keymap.set('i', '<A-.>', v:lua.vim.lsp.omnifunc, bufopts)
end
local lsp_flags = {
debounce_text_changes = 150, --wtf is this
}
local lspconfig = require('lspconfig');
lspconfig.zls.setup {
on_attach = on_attach,
flags = lsp_flags,
}
lspconfig.gopls.setup{
on_attach = on_attach,
flags = lsp_flags,
}
lspconfig.clangd.setup{
on_attach = on_attach,
flags = lsp_flags,
handlers = {
["textDocument/publishDiagnostics"] = function(err, result, ctx, config)
end
--local lsp_flags = {
-- debounce_text_changes = 150, --wtf is this
--}
--local lspconfig = require('lspconfig');
--lspconfig.zls.setup {
-- on_attach = on_attach,
-- flags = lsp_flags,
--}
--lspconfig.gopls.setup{
-- on_attach = on_attach,
-- flags = lsp_flags,
--}
--lspconfig.clangd.setup{
-- on_attach = on_attach,
-- flags = lsp_flags,
-- handlers = {
-- ["textDocument/publishDiagnostics"] = function(err, result, ctx, config)
-- end
-- }
--}
--lspconfig.rust_analyzer.setup{
-- on_attach = on_attach,
--}
--lspconfig.ols.setup{
-- on_attach = on_attach,
--}
--lspconfig.pylsp.setup{
-- on_attach = on_attach,
-- flags = lsp_flags,
--}
--lspconfig.gdscript.setup{
-- on_attach = on_attach,
-- flags = lsp_flags,
--}
local lsps = {
{
"clangd",
{
cmd = {
'clangd',
'--clang-tidy',
},
root_markers = { '.clangd', 'compile_commands.json' },
filetypes = { 'c', 'cpp', 'h' },
on_attach = on_attach,
}
},
{
"luals",
{
cmd = {
'lua-language-server',
},
root_markers = { '.git', 'init.lua' },
filetypes = { 'lua' },
on_attach = on_attach,
}
},
{
"python-lsp",
{
cmd = {
'pylsp'
},
root_markers = { '.git' },
filetype = { 'py' },
on_attach = on_attach,
}
}
}
lspconfig.rust_analyzer.setup{
on_attach = on_attach,
}
lspconfig.ols.setup{
on_attach = on_attach,
}
--lspconfig.pylyzer.setup{}
lspconfig.pylsp.setup{
on_attach = on_attach,
flags = lsp_flags,
}
lspconfig.gdscript.setup{
on_attach = on_attach,
flags = lsp_flags,
}
for _, lsp in pairs(lsps) do
local name, config = lsp[1], lsp[2]
vim.lsp.enable(name)
if config then
vim.lsp.config(name, config)
end
end