{ ... }: { programs.nixvim = { plugins.lsp = { enable = true; onAttach = '' -- Set capabilities for the LSP client from blink-cmp -- client.config.capabilities = require('blink.cmp').get_lsp_capabilities(client.config.capabilities) local active_clients = vim.lsp.get_active_clients() if client.name == "denols" then for _, client_ in pairs(active_clients) do -- stop tsserver if denols is already active if client_.name == "ts_ls" then client_.stop() end end elseif client.name == "ts_ls" then for _, client_ in pairs(active_clients) do -- prevent tsserver from starting if denols is already active if client_.name == "denols" then client.stop() end end end ''; servers = { ts_ls = { enable = true; rootDir = "require('lspconfig').util.root_pattern('package.json')"; settings = { single_file_support = false; }; }; denols = { enable = true; rootDir = "require('lspconfig').util.root_pattern('deno.json', 'deno.jsonc')"; }; cssls.enable = true; tailwindcss.enable = true; html.enable = true; phpactor.enable = true; pyright.enable = true; marksman.enable = true; nil_ls.enable = true; ## Using nil_ls # nixd.enable = true; dockerls.enable = true; # Docker bashls.enable = true; # Bash clangd.enable = true; # C/C++ csharp_ls.enable = true; # C# yamlls.enable = true; # YAML ltex = { enable = true; settings = { enabled = [ "astro" "html" "latex" "markdown" "text" "tex" "gitcommit" ]; completionEnabled = true; language = "en-US de-DE nl"; # dictionary = { # "nl-NL" = [ # ":/home/liv/.local/share/nvim/ltex/nl-NL.txt" # ]; # "en-US" = [ # ":/home/liv/.local/share/nvim/ltex/en-US.txt" # ]; # "de-DE" = [ # ":/home/liv/.local/share/nvim/ltex/de-DE.txt" # ]; # }; }; }; gopls = { # Golang enable = true; autostart = true; }; lua_ls = { # Lua enable = true; settings.telemetry.enable = false; }; # Rust rust_analyzer = { enable = true; installRustc = true; installCargo = true; }; }; }; }; }