feat(lsp): add ltex and keymaps

This commit is contained in:
catvayor 2024-11-13 16:56:33 +01:00
parent 4bad814136
commit b6ea6af1fb
Signed by: lbailly
GPG key ID: CE3E645251AC63F3
2 changed files with 31 additions and 1 deletions

View file

@ -8,7 +8,7 @@ in
{ {
imports = [ imports = [
zsh.user zsh.user
./neovim ./neovim.nix
((import sources.nixvim).homeManagerModules.nixvim) ((import sources.nixvim).homeManagerModules.nixvim)
]; ];
# options.kat = { # options.kat = {

View file

@ -100,10 +100,40 @@ with lib;
lsp = mkIf config.kat.neovim.lsp { lsp = mkIf config.kat.neovim.lsp {
enable = true; 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 = "<CMD>LspStop<Enter>";
key = "lx";
}
{
action = "<CMD>LspStart<Enter>";
key = "ls";
}
{
action = "<CMD>LspRestart<Enter>";
key = "lr";
}
];
};
servers = { servers = {
nixd.enable = true; nixd.enable = true;
pylsp.enable = true; pylsp.enable = true;
clangd.enable = true; clangd.enable = true;
ltex.enable = true;
rust_analyzer = { rust_analyzer = {
enable = true; enable = true;
installCargo = true; installCargo = true;