tsserver
diagnostic discrepancy on identifier completion
#60606
Labels
Needs More Info
The issue still hasn't been fully clarified
π Search Terms
region diagnostics auto complete
π Version & Regression Information
I suspect this is a regression caused by #57842
β― Playground Link
No response
π» Code
Any code that auto-completes an identifier should trigger the bug (sometimes)
π Actual behavior
Typing an identifier that TS recognizes, then selecting one of the possible completions, may cause the server to see the source in a way that's inconsistent with the currently opened buffer.
For example, some hours ago, I tried
Completed to
Typography
succesfully, but the LSP saidSometimes, instead of a permutation of chars, it's a duplicate substring (example:
useState
->useStState
)I can assure you this is not an ESM-specific issue, it happens with regular variables, and object properties too, even on minimal projects with 0 dependencies.
I have to restart the LSP multiple times during a coding session. However, as I said, this is non-deterministic, sometimes it's fine for a while. A single restart is enough to sync the states, until the bug happens again.
π Expected behavior
The LSP must have an internal state that's consistent (no discrepancies) with the actual buffer
Additional information about the issue
hx -V
:helix 24.7 (079f5442)
npm ls -g
(snip):[email protected]
The text was updated successfully, but these errors were encountered: