Open des-b opened 5 days ago
I've seen a bit of flickering on and off for the diagnostic status with som
, ede
and others in files.
With the above setup you'll notice that there are multiple language servers running - it starts a new one whech every file is opened.
Open nvim-tree and two other files:
: ; ps aux | grep typos
alex 13574 0.0 0.0 2323388 21600 ? Ssl 09:41 0:00 typos-lsp
alex 13609 0.0 0.0 2323380 20756 ? Ssl 09:41 0:00 typos-lsp
alex 13650 0.0 0.0 2323420 21588 ? Ssl 09:41 0:00 typos-lsp
alex 13703 0.0 0.0 6396 3840 pts/3 S+ 09:42 0:00 grep --color=auto typos
: ;
For other language servers, adding an identifying name is enough to result in the one instance being shared e.g. lua-language-server: wiki: Development: Native neovim Configuration
That doesn't seem to be the case for typos-lsp.
Using the "official" language server manager nvim-lspconfig did work nicely:
local lspconfig = require("lspconfig")
lspconfig.typos_lsp.setup()
You'll need typos-lsp
in your $PATH
Please let me know if that works and I'll convert this to a discussion.
Updated https://github.com/nvim-tree/nvim-tree.lua/wiki/Development
You are right. With the lspconfig
config as you suggested there is no flickering.
I have to check my actual neovim config. (where I already use lspconfig with mason btw. 😅) There I observed the flickering as well. When I find the cause I will post it.
Sorry for the noise and thanks for the rapid response and the effort on nvim-tree!
Description
When
diagnostics.enable = true
and a filetype-generic LSP (e.g.typos-lsp
) is running, one may see flickering of diagnostics in the nvim-tree buffer/window.On a more complex neovim setup than "Clean room replication" I also observed moderate to high CPU load.
A possible workaround for me was to add a check for
vim.bo[bufnr].buflisted
inview.lua:491:is_buf_valid
. I am new to this stuff and not sure if this would be a valid solution.Neovim version
Operating system and version
Linux 6.11.3
Windows variant
-
nvim-tree version
master
Clean room replication
Steps to reproduce
som.txt
Expected behavior
Diagnostic on
som.txt
shown in nvim-tree should just show ''typos:som
should besome
"Actual behavior
The diagnostic is shown but flickers every few ~100ms