Closed CaamVilvactDJavu closed 2 months ago
What version of the rust-analyzer server are you using? Does your code contain any wide characters? A minimal reproducible example would be helpful for reproducing the issue.
What version of the rust-analyzer server are you using? Does your code contain any wide characters? A minimal reproducible example would be helpful for reproducing the issue.
I'm using rust-analyzer 1.78.0 (9b00956 2024-04-29) which I installed via brew. The rust analyzer is running, but the error is bothering me. There are no errors in my coding. but it seems to be an error from the rust-analyzer. What do you mean by wide characters
What text editor are you using / what lsp integration. And the next time you see that error, please check what LineCol
info it shows and how many lines the document has (that is whether the info shown is actually out of bounds for the document).
I'm using LazyVim. Howdo you see the LineCol?
it is in the error message
it is in the error message
It's not my error code. It's from rust-analyzer.
I think I figured something out.
After changing the version of rust-analyzer to multiple different versions with a stock config, I concluded that the issue is at the very least not directly a result of rust-analyzer. I was using the latest version of neovim 0.10 and found out that changing to any previous version fixed this issue entirely.
Not sure if this will be the case for everyone, but seeing as other comment talk about rust-analyzer working fine on other editors such as vscode, I would guess this to be the case. Perhaps the lastest neovim version changed something in regards to how communication with the LSP (or the language server to the LSP) works and thus it now no longer tracks the offset correctly. Not sure which is the case.
@bunkrat do you know if this is being tracked in the neovim issue tracker somewhere? I'm hitting this constantly and it's making my environment borderline unusable.
@mfontanini I don't believe so. As far as I know no one is really sure what is causing the issue yet. The closest thing I found in neovim's issue tracker is issue neovim#29500, but I'm not entirely sure how related that is to this specific issue. There does still seem to be discussions about it on rust-lang#17289 though.
I personally don't use LSP anymore, but since you do, you might consider downgrading your nvim to release-0.9
for the time being.
I'll close this as a duplicate of https://github.com/rust-lang/rust-analyzer/issues/17289
How to fix that Error, This Error always bothers me