diff options
Diffstat (limited to 'apps/nixvim.nix')
| -rw-r--r-- | apps/nixvim.nix | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/apps/nixvim.nix b/apps/nixvim.nix index 9440525..f5655bb 100644 --- a/apps/nixvim.nix +++ b/apps/nixvim.nix @@ -6,14 +6,23 @@ programs.nixvim = { enable = true; + # fix rust_analyzer error + extraConfigLua = "for _, method in ipairs({ 'textDocument/diagnostic', 'workspace/diagnostic' }) do + local default_diagnostic_handler = vim.lsp.handlers[method] + vim.lsp.handlers[method] = function(err, result, context, config) + if err ~= nil and err.code == -32802 then + return + end + return default_diagnostic_handler(err, result, context, config) + end +end"; + keymaps = [ - # Equivalent to nnoremap ; : { key = ";"; action = ":"; } - # Equivalent to nmap <silent> <buffer> <leader>gg <cmd>Man<CR> { key = "<leader>gg"; action = "<cmd>Man<CR>"; @@ -22,22 +31,18 @@ remap = false; }; } - # Etc... ]; globals.mapleader = " "; clipboard.register = "unnamedplus"; - # We can also set options: opts = { tabstop = 4; shiftwidth = 4; expandtab = false; mouse = "a"; - - # etc... }; plugins = { @@ -62,7 +67,7 @@ lsp = { enable = true; servers = { - tsserver.enable = true; + ts_ls.enable = true; lua_ls.enable = true; bashls.enable = true; html.enable = true; |
