Files
dots/home/editors/nvim/plugins/lsp/default.nix
2025-12-16 16:37:36 +01:00

36 lines
777 B
Nix

{
imports = [./servers.nix ./lint.nix ./otter.nix];
programs.nixvim = {
plugins = {
lspkind = import ./lspkind.nix;
lspconfig.enable = true;
trouble.enable = true;
tiny-inline-diagnostic = {
enable = true;
settings.options.multilines.enabled = true;
};
};
keymaps = let
trouble-lsp = key: action: {
mode = "";
inherit key;
options.desc = action;
action = "<cmd>Trouble lsp_${action}<cr>";
};
in [
{
mode = "";
key = "K";
options.desc = "Hover";
action = "<cmd>Lspsaga hover_doc<cr>";
}
(trouble-lsp "gd" "definitions")
(trouble-lsp "gr" "references")
(trouble-lsp "gi" "implementations")
];
};
}