Adjusting nim lsp

This commit is contained in:
2025-09-09 02:02:07 -04:00
parent 0cd1bc94c7
commit 542885dbd1
2 changed files with 44 additions and 3 deletions

View File

@@ -28,7 +28,23 @@ vim.lsp.enable('gopls', {
},
},
})
vim.lsp.enable('nimlsp')
-- Configure nimlangserver
local lspconfig = require('lspconfig')
lspconfig.nim_langserver.setup({
cmd = { "nimlangserver" },
filetypes = { "nim" },
root_dir = function(fname)
return lspconfig.util.find_git_ancestor(fname) or
lspconfig.util.find_node_modules_ancestor(fname) or
lspconfig.util.path.dirname(fname)
end,
settings = {
nim = {
nimsuggestPath = "nimsuggest",
nimprettyPath = "nimpretty",
}
},
})
require("lsp_signature").setup({
debug = false,
bind = true, -- registers signature handler