You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a Rust project with an attached LSP I noticed that nvim-tree was flickering when using project.nvim and opening files in different crates within the same workspace. The project would would stay correctly on the workspace root, but I wasn't sure why it was flickering, and also collapsing the directory of the previously opened file in a different sub-crate.
I turned silent_chdir = false to debug what was happening and what I saw is that it was performing multiple chdirs, once for one of the patterns that matched and also for the LSP workspace root.
Changing the detection method to just { "lsp" } removed the flickering and in-project collapse of the tree in the previous buffer in the other workspace crate.
It was my understanding from the documentation that the ordering of the detection methods meant that it would prefer a match from the first detection method encountered. I had assumed that since I had an lsp attached, it would only change directory to that supplied by the LSP and would ignore the patterns configured, but what I saw is that it was using both the LSP and the patterns.
In a Rust project with an attached LSP I noticed that nvim-tree was flickering when using project.nvim and opening files in different crates within the same workspace. The project would would stay correctly on the workspace root, but I wasn't sure why it was flickering, and also collapsing the directory of the previously opened file in a different sub-crate.
I turned
silent_chdir = false
to debug what was happening and what I saw is that it was performing multiple chdirs, once for one of the patterns that matched and also for the LSP workspace root.Changing the detection method to just
{ "lsp" }
removed the flickering and in-project collapse of the tree in the previous buffer in the other workspace crate.It was my understanding from the documentation that the ordering of the detection methods meant that it would prefer a match from the first detection method encountered. I had assumed that since I had an lsp attached, it would only change directory to that supplied by the LSP and would ignore the patterns configured, but what I saw is that it was using both the LSP and the patterns.
This is my config that produced the flickering:
and this config stops the flickering and multiple CWD changes:
Is there a way to use both lsp and pattern but to disregard the pattern if the lsp supplies a project root?
The text was updated successfully, but these errors were encountered: