diff options
| author | bee <beebeeb5k@gmail.com> | 2026-05-05 22:37:10 +0530 |
|---|---|---|
| committer | bee <beebeeb5k@gmail.com> | 2026-05-05 22:37:10 +0530 |
| commit | 9365a8e96827cbf7bc5adad6d29bcd05b4d761b2 (patch) | |
| tree | 0998a5dcfc4517e4112a2c589e04ac0dbc1e011b /lua/config/lsp.lua | |
| parent | 0c50f17133b90c60735f1f51943f51f60372bdd3 (diff) | |
Migrate from nixcats to nix-wrapper-modules
Diffstat (limited to 'lua/config/lsp.lua')
| -rw-r--r-- | lua/config/lsp.lua | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/lua/config/lsp.lua b/lua/config/lsp.lua deleted file mode 100644 index ab35b80..0000000 --- a/lua/config/lsp.lua +++ /dev/null @@ -1,92 +0,0 @@ -vim.lsp.inlay_hint.enable(true) -vim.lsp.enable({ - "clangd", - "lua_ls", - "nixd", - "nil_ls", - "zls", - "pyrefly", - "marksman", - "harper", - "tinymist", - "gopls", - "tombi", - "qmlls", -}) - -vim.lsp.config("nil_ls", { - settings = { - formatting = { - command = { "nixfmt" }, - }, - }, -}) - -vim.lsp.config("lua_ls", { - settings = { - Lua = { - codeLens = { enable = true }, - hint = { - enable = false, - semicolon = "Disable", - }, - workspace = { - checkThirdParty = false, - -- IMPORTANT: Leave library empty here. - -- lazydev will inject the correct Nix store paths dynamically. - library = {}, - }, - runtime = { - version = "LuaJIT", - -- Setting this to false allows lazydev to find files - -- outside your immediate workspace (like Nix store plugins) - pathStrict = false, - }, - }, - }, -}) - -vim.lsp.config("*", { - capabilities = { textDocument = { semanticTokens = { multilineTokenSupport = true } } }, - root_markers = { ".git", ".editorconfig", "flake.nix", "shell.nix" }, -}) - -vim.diagnostic.config({ - severity_sort = true, - severity_sort_priority = { - Error = 100, - Warn = 90, - Hint = 50, - Info = 10, - }, -}) - -local RustLsp = function(mode, keymap, action, bufnr) - vim.keymap.set(mode, keymap, function() - vim.cmd.RustLsp(action) - end, { silent = true, buffer = bufnr }) -end - -vim.g.rustaceanvim = { - tools = {}, - server = { - on_attach = function(client, bufnr) - RustLsp({ "n", "x" }, "gra", "codeAction", bufnr) - RustLsp("n", "<leader>ee", "explainError", bufnr) - RustLsp("n", "K", { "hover", "actions" }, bufnr) - RustLsp("n", "L", { "hover", "range" }, bufnr) - end, - default_settings = { - ["rust-analyzer"] = { - checkOnSave = { - enable = true, - command = "clippy", - }, - procMacro = { - enable = true, - }, - }, - }, - }, - dap = {}, -} |
