nix/home-manager/common/software/cli/nixvim.nix

82 lines
2 KiB
Nix
Raw Normal View History

2024-02-16 07:39:00 +01:00
{ ... }: {
2024-02-16 09:56:55 +01:00
imports = [ ./nixvim-base.nix ];
2024-02-08 03:17:11 +01:00
2024-02-16 09:56:55 +01:00
programs.nixvim = {
plugins = {
lsp = {
enable = true;
servers = {
rust-analyzer = {
enable = true;
installCargo = true;
installRustc = true;
};
pylsp = {
enable = true;
autostart = true;
installLanguageServer = true;
settings = {
plugins = {
black = {
enabled = true;
preview = true;
2024-02-08 03:42:16 +01:00
};
2024-02-16 09:56:55 +01:00
jedi_completion = {
enabled = true;
fuzzy = true;
2024-02-13 06:19:41 +01:00
};
2024-02-16 09:56:55 +01:00
pylint.enabled = true;
2024-02-16 10:56:48 +01:00
pylsp_mypy.enabled = true;
2024-02-16 09:56:55 +01:00
};
};
};
nil_ls.enable = true;
html.enable = true;
cssls.enable = true;
bashls.enable = true;
};
keymaps = {
silent = true;
diagnostic = {
"<leader>lk" = {
action = "goto_prev";
desc = "Go to prev";
};
"<leader>lj" = {
action = "goto_next";
desc = "Go to next";
};
};
lspBuf = {
K = {
action = "hover";
desc = "Hover";
};
"<leader>lr" = {
action = "references";
desc = "LSP [r]eferences";
};
"<leader>ld" = {
action = "definition";
desc = "LSP [d]efinitions";
};
"<leader>li" = {
action = "implementation";
desc = "LSP [i]implementations";
};
"<leader>lt" = {
action = "type_definition";
desc = "LSP [t]ype definitions";
};
"<leader>la" = {
action = "code_action";
desc = "LSP Code [A]ctions";
2024-02-08 03:42:16 +01:00
};
2024-02-16 09:56:55 +01:00
};
2024-02-08 03:17:11 +01:00
};
2024-02-16 09:56:55 +01:00
};
2024-02-08 03:17:11 +01:00
};
2024-02-16 09:56:55 +01:00
};
2024-02-08 11:08:43 +01:00
}