rust-lang / rust-lang/rust-analyzer
Invalid offset -32603 when editing an empty .rs file
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
rust-analyzer version: 2024-05-09
rustc version: (eg. output of rustc -V): 1.78.0
editor or extension: neovim with Mason+Lspconfig+RustAnalyzer
relevant settings: none
repository link (if public, optional): none
code snippet to reproduce:
Rust analyzer is printing this error if I start editing an empty .rs file before it has completed its startup. There are no settings involved, just an empty cargo project with a main.rs. Once that error pops up, it will keep appearing on every keystroke until I close the buffer, reopen it, wait for it to fully initialize and then start writing. This does not happen if the file is not empty.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in an empty Cargo project with an empty main.rs, using Neovim with Mason, Lspconfig, and rust-analyzer, and begin typing before startup completes. Trace the startup and editing path responsible for the repeated -32603 error; done means typing in the empty file no longer produces the error during initialization.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100