diff --git a/kat/users/default.nix b/kat/users/default.nix index 731cb4d..5039333 100644 --- a/kat/users/default.nix +++ b/kat/users/default.nix @@ -8,7 +8,7 @@ in { imports = [ zsh.user - ./neovim + ./neovim.nix ((import sources.nixvim).homeManagerModules.nixvim) ]; # options.kat = { diff --git a/kat/users/neovim/default.nix b/kat/users/neovim.nix similarity index 76% rename from kat/users/neovim/default.nix rename to kat/users/neovim.nix index 51c051a..6b9f46c 100644 --- a/kat/users/neovim/default.nix +++ b/kat/users/neovim.nix @@ -100,10 +100,40 @@ with lib; lsp = mkIf config.kat.neovim.lsp { enable = true; + keymaps = { + diagnostic = { + "lj" = "goto_next"; + "lk" = "goto_prev"; + }; + lspBuf = { + K = "hover"; + lgD = "references"; + lgd = "definition"; + lgi = "implementation"; + lgt = "type_definition"; + la = "code_action"; + ls = "signature_help"; + }; + extra = [ + { + action = "LspStop"; + key = "lx"; + } + { + action = "LspStart"; + key = "ls"; + } + { + action = "LspRestart"; + key = "lr"; + } + ]; + }; servers = { nixd.enable = true; pylsp.enable = true; clangd.enable = true; + ltex.enable = true; rust_analyzer = { enable = true; installCargo = true;