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

76 lines
2.6 KiB
Nix
Raw Normal View History

2024-02-08 11:40:29 +01:00
{ inputs, pkgs, config, lib, theme, ... }: {
2024-02-15 04:07:08 +01:00
imports = [ ./nixvim-base.nix ];
2024-02-08 03:17:11 +01:00
programs.nixvim = {
2024-02-08 03:42:16 +01:00
plugins = {
lsp = {
enable = true;
servers = {
2024-02-08 03:44:30 +01:00
rust-analyzer = {
enable = true;
installCargo = true;
installRustc = true;
};
2024-02-13 06:47:15 +01:00
pylsp = {
enable = true;
autostart = true;
installLanguageServer = true;
settings = {
plugins = {
black = {
enabled = true;
preview = true;
};
};
};
};
2024-02-08 04:04:30 +01:00
nixd.enable = true;
html.enable = true;
cssls.enable = true;
bashls.enable = true;
2024-02-08 03:42:16 +01:00
};
2024-02-13 06:19:41 +01:00
keymaps = {
silent = true;
diagnostic = {
2024-02-13 06:59:40 +01:00
"<leader>lk" = {
action = "goto_prev";
desc = "Go to prev";
};
"<leader>lj" = {
action = "goto_next";
desc = "Go to next";
};
2024-02-13 06:19:41 +01:00
};
lspBuf = {
2024-02-13 06:57:05 +01:00
K = {
action = "hover";
2024-02-13 06:57:54 +01:00
desc = "Hover";
2024-02-13 06:57:05 +01:00
};
"<leader>lr" = {
2024-02-13 06:59:40 +01:00
action = "references";
desc = "LSP [r]eferences";
2024-02-13 06:57:05 +01:00
};
"<leader>ld" = {
2024-02-13 06:59:40 +01:00
action = "definition";
desc = "LSP [d]efinitions";
2024-02-13 06:57:05 +01:00
};
"<leader>li" = {
2024-02-13 06:59:40 +01:00
action = "implementation";
desc = "LSP [i]implementations";
2024-02-13 06:57:05 +01:00
};
"<leader>lt" = {
2024-02-13 06:59:40 +01:00
action = "type_definition";
desc = "LSP [t]ype definitions";
2024-02-13 06:57:05 +01:00
};
"<leader>la" = {
2024-02-13 06:59:40 +01:00
action = "code_action";
desc = "LSP Code [A]ctions";
2024-02-13 06:57:05 +01:00
};
2024-02-13 06:19:41 +01:00
};
};
2024-02-08 03:42:16 +01:00
};
2024-02-08 03:17:11 +01:00
};
};
2024-02-08 11:08:43 +01:00
}