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
The intention behind this weird piece of config was that I wanted to setup rust_analyzer manually, essentially due to #22. But back when I was writing this config, there was also the legacy Rust language server, RLS, which I wanted to exclude. And at the time, I wanted to use preferred_servers to set my preferred servers instead of excluding those that I did not want (not unlike #23 (comment)).
In the past, this worked exactly as I wanted: lazy-lsp would not setup rust_analyzer because I have excluded it, and would also setup nothing else for this filetype because of the preferred_servers value. So in the end, lazy-lsp would not do anything for the rust filetype.
However, some time ago, lazy-lsp started instead setting up a second copy of rust-analyzer. I did not investigate this very deeply, but I suspect this is due to 26c681f. If I understand correctly, on the left side we iterate on included_servers, which takes excluded_servers into account. However, on the right side, we iterate on server_to_filetypes, which also takes preferred_servers into account.
In the end, I just switched to using prefer_local (thanks a lot! ❤️). Also I changed my mind on excluded_servers/preferred_servers, and you have removed RLS configuration anyway. And even then I will be first to admit that the snippet I pasted looks kind of absurd, so I won't be surprised if you just close the issue immediately 😛 But I do feel the previous behavior is slightly more correct, and I just wanted to create this issue to not throw away information.
The text was updated successfully, but these errors were encountered:
Getting these options to cover needed situations without getting too overwhelming is a journey :)
You are correct, I was able to verify with a new test case that there was indeed a regression and matches the commit you found. I also find the previous behavior more intuitive.
Glad to hear the new option works for you even better with a cleaner config. I think I will push a fix anyway to get a peace of mind :)
So I had something like this in my config:
The intention behind this weird piece of config was that I wanted to setup rust_analyzer manually, essentially due to #22. But back when I was writing this config, there was also the legacy Rust language server, RLS, which I wanted to exclude. And at the time, I wanted to use
preferred_servers
to set my preferred servers instead of excluding those that I did not want (not unlike #23 (comment)).In the past, this worked exactly as I wanted: lazy-lsp would not setup rust_analyzer because I have excluded it, and would also setup nothing else for this filetype because of the
preferred_servers
value. So in the end, lazy-lsp would not do anything for therust
filetype.However, some time ago, lazy-lsp started instead setting up a second copy of rust-analyzer. I did not investigate this very deeply, but I suspect this is due to 26c681f. If I understand correctly, on the left side we iterate on
included_servers
, which takesexcluded_servers
into account. However, on the right side, we iterate onserver_to_filetypes
, which also takespreferred_servers
into account.In the end, I just switched to using
prefer_local
(thanks a lot! ❤️). Also I changed my mind onexcluded_servers
/preferred_servers
, and you have removed RLS configuration anyway. And even then I will be first to admit that the snippet I pasted looks kind of absurd, so I won't be surprised if you just close the issue immediately 😛 But I do feel the previous behavior is slightly more correct, and I just wanted to create this issue to not throw away information.The text was updated successfully, but these errors were encountered: