pkg(nixvim): Add some lsp configuration

This commit is contained in:
ulic-youthlic 2025-07-13 06:04:55 +08:00
parent 39ca09b05f
commit 56dc7f3bba
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721

View file

@ -2,10 +2,34 @@
youthlic.plugins.lspconfig.enable = true;
lsp = {
inlayHints.enable = true;
servers = {
nixd = {
enable = true;
};
};
luaConfig.post =
#lua
''
do
vim.diagnostic.config({
underline = true,
virtual_lines = {
current_line = true,
},
signs = true,
severity_sort = true,
float = {
scope = "cursor",
source = "if_many",
},
jump = {
on_jump = function(diagnostic, bufnr)
vim.diagnostic.open_float({
scope = "cursor",
severity_sort = true,
source = "if_many",
bufnr = bufnr,
})
end,
wrap = true,
},
})
end
'';
};
}