Closed alex-ds13 closed 9 months ago
Hey π Thanks for the detailed report.
Strange, I thought Windows paths were case insensitive. I guess We can normalise only the drive letter then...
Hey π Thanks for the detailed report.
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. But if the client is attaching, as you describe, I don't see how that can be the problem (unless it's somehow a combination of the two changes).
Anyways, I've changed it to only lower-case the drive letter: https://github.com/mrcjkb/rustaceanvim/commit/387ca846d632f8c90631536341ca1778b4c2c497
Let me know if that fixes it :smile:
4.11.0 introduced a feature where the client doesn't auto-attach to buffers that aren't actual files. But if the client is attaching, as you describe, I don't see how that can be the problem (unless it's somehow a combination of the two changes).
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 rust-analyzer
but I don't think that's the issue...
Maybe there's just less Windows/Neovim users. The 4.11.0 release was just yesterday. Anyways, I'm glad it's working now :smile:
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 check --workspace
entries)
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.