This commit is contained in:
cnst
2024-10-17 20:06:17 +02:00
parent f70061cc24
commit ec57cb7599
196 changed files with 1150 additions and 1271 deletions

View File

@@ -0,0 +1,76 @@
{
lib,
config,
...
}: let
inherit (lib) mkEnableOption mkIf;
cfg = config.home.devtools.nixvim.plugins.lsp;
in {
options = {
home.devtools.nixvim.plugins.lsp = {
enable = mkEnableOption "Enables LSP support for nixvim";
};
};
config = mkIf cfg.enable {
programs.nixvim.plugins = {
lsp-format = {
enable = true;
lspServersToEnable = [
"rust-analyzer"
];
};
lsp = {
enable = true;
keymaps = {
silent = true;
diagnostic = {
"<leader>k" = "goto_prev";
"<leader>j" = "goto_next";
};
lspBuf = {
gd = "definition";
gD = "references";
gt = "type_definition";
gi = "implementation";
K = "hover";
"<F2>" = "rename";
};
};
servers = {
# Average webdev LSPs
cssls.enable = true; # CSS
tailwindcss.enable = true; # TailwindCSS
html.enable = true; # HTML
astro.enable = true; # AstroJS
phpactor.enable = true; # PHP
svelte.enable = false; # Svelte
vuels.enable = false; # Vue
pyright.enable = true;
marksman.enable = true;
nixd.enable = true;
dockerls.enable = true;
bashls.enable = true;
clangd.enable = true;
csharp-ls.enable = true;
yamlls.enable = true;
lua-ls = {
enable = true;
settings = {
telemetry.enable = false;
diagnostics = {
globals = ["vim"];
};
};
};
tsserver = {
enable = false; # TS/JS
};
};
};
};
};
}