-
Notifications
You must be signed in to change notification settings - Fork 5
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
[BUG] Language Server Crash on trivial edits to new project #13
Comments
Playing some more, after a save and more of the |
It looks like the "index out of bounds" index is in fact the last line in the file. Similarly, I deleted that blank line, at which point mere cursor interactions on what was now the last line caused panics. So it looks like the core problem here is any editor interaction involving the last line of the file is panicking. |
Thank you for this detailed bug report! You've definitely hit on an issue with the last line causing problems like "out of bounds" error with Rust Analyzer. I think this issue sounds like a core Nova bug I've heard of elsewhere, so it's not something I can fix. Other extensions have logged the same issue, and it's been mentioned multiple times in their extension developer forum. Panic is aware of the issue, but hasn't stated if a fix is imminent. I've noticed the |
Like Code Actions, Panic appears to have fixed this issue in version 9 which was released today. Let me know if anyone still has this issue. |
Describe the bug
I created a new project with
cargo new foo
, opened it in Nova, and began editing the main.rs file. And the language server keeps crashing on every edit. I restart it, it looks fine, I edit the file, crash.Crash log
To Reproduce
Steps to reproduce the behavior:
cargo new foo
in the terminalfoo
folder into Novasrc/main.rs
Additional information
I haven't attempted to reproduce this with a fresh project.
In addition, after collecting that log, I cleared the console, opted to Restart Server, and then noticed that every cursor movement would log another panic (but would not tell me that the language server crashed). Hitting Save informed me of the crash again. I hit Restart Server again, and got
At this point every time I moved the cursor I'd get a line like
I hit Save again and this time it finally showed
Once I saw that, moving the cursor no longer logged anything, and I was able to make a trivial edit without logging too.
However, while writing up this report, after having left it alone for a while, I went back to Nova and inserted a single space at the end of the file, at which point the language server promptly crashed again.
Versions (please complete the following information):
The text was updated successfully, but these errors were encountered: