-
-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[windows] rust-analyzer attaches but it is not working #273
Comments
Hey 👋 Strange, I thought Windows paths were case insensitive. I guess We can normalise only the drive letter then... |
What's even stranger is that I'm pretty sure that I've had a version of rustaceanvim higher than 4.7.5 (might have been version 4.10) for a couple of days now and it had this problem but it wasn't every time! Sometimes it took a while longer after initialization but it started working. But now with version 4.11 it never works. I don't see any other commit that might have change this in since the one on version 4.8.0, so it really is weird.. |
4.11.0 introduced a feature where the client doesn't auto-attach to buffers that aren't actual files. Anyways, I've changed it to only lower-case the drive letter: 387ca84 Let me know if that fixes it 😄 |
That does fix it! 😄 Thank you! I've really tried to understand why is this happening but couldn't figure it out. I also found it weird that no one else had created an issue about it yet. Was it really just me? If so there had to be something different on my end, but the only thing that I have that might be different is that I'm using Mason's version of |
Maybe there's just less Windows/Neovim users. The 4.11.0 release was just yesterday. |
Just for the sake of completness, I run yesterday into the same issue, and anything was working (neither runnnables/testables/debuggables) was being loaded correctly (only the I was unable to reproduce the issue on my Unix based setup, after facing this on my Windows machine. After updating to the v4.11 everything is working again on Windows. Thanks for the catch @alex-ds13 and @mrcjkb for the quick update! |
Neovim version (nvim -v)
NVIM v0.10.0-dev-2507+g3df1211eb
Operating system/version
Windows 11
Output of :checkhealth rustaceanvim
How to reproduce the issue
Expected behaviour
Expected the LSP to work after initialization
Actual behaviour
No LSP features work after initialization. There is nothing showing on the rust-analyzer log file (it is empty).
I've traced this to the commit e536434.
The problem is the following change on the
lua/rustaceanvim/lsp.lua
file:Somehow the old
normalize_path
function that only change the drive letter to lowercase works, but the new normalize function that lowercase's the entire path doesn't. I can't quite figure out why, but I've tested it locally and changing that line is what makes the difference (considering the oldnormalize_path
function is still on thelsp.lua
file).I don't know if it has anything to do with the fact that
vim.api.nvim_buf_get_name(buf_nr)
returns the path that way, with only the drive letter as lowercase? I've tried looking if the internals of neovim lsp by any chance are using this function to get the client, but doesn't seem like it. So right now I have no clue...Maybe you might find out whats happening.
The minimal config used to reproduce this issue.
The text was updated successfully, but these errors were encountered: