diff options
Diffstat (limited to 'common/home/programs/nixvim/plugins/lsp.nix')
| -rw-r--r-- | common/home/programs/nixvim/plugins/lsp.nix | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/common/home/programs/nixvim/plugins/lsp.nix b/common/home/programs/nixvim/plugins/lsp.nix new file mode 100644 index 0000000..578518f --- /dev/null +++ b/common/home/programs/nixvim/plugins/lsp.nix @@ -0,0 +1,39 @@ +{ pkgs, ... }: +{ + enable = true; + servers = { + + bashls = { + enable = true; + package = pkgs.unstable.bash-language-server; + }; + + clangd.enable = true; + + nixd = { + enable = true; + settings.formatting.command = [ "nixfmt" ]; + }; + + rust-analyzer = { + enable = true; + installCargo = true; + installRustc = true; + }; + + pyright.enable = true; + + ocamllsp.enable = true; + }; + + keymaps.lspBuf = { + "gd" = "definition"; + "gD" = "references"; + "gt" = "type_definition"; + "gi" = "implementation"; + "K" = "hover"; + "rn" = "rename"; + "<space>ca" = "code_action"; + "<space>f" = "format"; + }; +} |