diff options
| author | seth <[email protected]> | 2024-07-16 19:04:27 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2024-07-16 22:24:21 -0400 |
| commit | 2e7e1ce219b43bb74f67875200dd4b68758ffd27 (patch) | |
| tree | 11ca91f55aa47c5b341aaf65f3626c9681a22b07 /nixvim/plugins/lsp/servers.nix | |
| parent | 255e7c40af44aeedf19a3ca682cfc8a098266e8a (diff) | |
back to nixvim againnixvim-again
Diffstat (limited to 'nixvim/plugins/lsp/servers.nix')
| -rw-r--r-- | nixvim/plugins/lsp/servers.nix | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/nixvim/plugins/lsp/servers.nix b/nixvim/plugins/lsp/servers.nix new file mode 100644 index 0000000..6334939 --- /dev/null +++ b/nixvim/plugins/lsp/servers.nix @@ -0,0 +1,82 @@ +{ pkgs, helpers, ... }: +{ + extraPackages = [ + # bashls + pkgs.shellcheck + pkgs.shfmt + + # nil-ls + pkgs.nixfmt-rfc-style + ]; + + globals = { + # Required for Deno's LSP + markdown_fenced_languages = [ "ts=typescript" ]; + }; + + plugins.lsp.servers = { + astro.enable = true; + bashls.enable = true; + biome.enable = true; + clangd.enable = true; + denols.enable = true; + eslint.enable = true; + + lua-ls = { + enable = true; + settings = { + diagnostics.globals = [ "vim" ]; + runtime.version = "LuaJIT"; + workspace = { + checkThirdParty = false; + library = [ (helpers.mkRaw "vim.env.VIMRUNTIME") ]; + }; + }; + }; + + nil-ls = { + enable = true; + + settings = { + formatting.command = [ "nixfmt" ]; + }; + }; + + nimls.enable = true; + pyright = { + enable = true; + + settings = { + # Use ruff for imports + pyright = { + disableOrganizeImports = true; + }; + python.ignore = [ "*" ]; + }; + }; + + ruff-lsp = { + enable = true; + + # pyright should handle this + onAttach.function = '' + client.server_capabilities.hoverProvider = false + ''; + }; + + rust-analyzer = { + enable = true; + + installCargo = false; + installRustc = false; + + settings = { + check.command = "clippy"; + }; + }; + + tsserver.enable = true; + typos-lsp.enable = true; + typst-lsp.enable = true; + }; +} |
