From 9a77bf305e9705c15a8caa30e673914a910b64be Mon Sep 17 00:00:00 2001 From: Doloro1978 Date: Sun, 9 Aug 2026 00:23:11 +0100 Subject: [PATCH] fix(nixvim): eliminate per-keystroke LSP completion latency - drop lsp-lines (redundant with tiny-inline-diagnostic; double diagnostic virtual-text redraw per keystroke) - drop nvim_lsp_signature_help cmp source (extra server request per keystroke; keymap covers it) - remove cmp-nvim-lsp-signature-help plugin (now unused) - disable LSP client file logging (nixd/svelte stderr spam was writing 5MB+ logs on the main loop) - disable rust-analyzer semantic tokens (ContentModified retry loop while typing) --- config/modules/nixvim/default.nix | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/config/modules/nixvim/default.nix b/config/modules/nixvim/default.nix index c20a16e..ac2786c 100644 --- a/config/modules/nixvim/default.nix +++ b/config/modules/nixvim/default.nix @@ -121,9 +121,14 @@ }; }; }; - lsp = { - enable = true; - servers = { + lsp = { + enable = true; + onAttach = '' + if client.name == "rust-analyzer" then + client.server_capabilities.semanticTokensProvider = nil + end + ''; + servers = { # qmlls = { # enable = true; # config = { @@ -224,7 +229,6 @@ }; }; }; - lsp-lines.enable = true; trouble = { enable = true; settings = { @@ -257,10 +261,6 @@ name = "nvim_lsp"; priority = 100; } - { - name = "nvim_lsp_signature_help"; - priority = 90; - } { name = "luasnip"; priority = 75; @@ -340,7 +340,6 @@ }; }; extraPlugins = with pkgs; [ - vimPlugins.cmp-nvim-lsp-signature-help tiny-code-action ]; opts = { @@ -355,6 +354,8 @@ mapleader = " "; }; extraConfigLua = '' + -- LSP client writes server stderr + errors to disk on the main loop; nixd spams info logs -> 5MB+ logs. Kill it. + vim.lsp.set_log_level("off") -- tree-sitter-nix uses (#is-not? local) which the new nvim-treesitter main branch no longer registers vim.treesitter.query.add_predicate("is-not?", function() return true end, { force = true })