Fix inlay hints reading from disk instead of editor buffer#8250
Draft
shulhi wants to merge 3 commits intorescript-lang:masterfrom
Draft
Fix inlay hints reading from disk instead of editor buffer#8250shulhi wants to merge 3 commits intorescript-lang:masterfrom
shulhi wants to merge 3 commits intorescript-lang:masterfrom
Conversation
rescript
@rescript/darwin-arm64
@rescript/darwin-x64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/runtime
@rescript/win32-x64
commit: |
Member
|
Nice! 🎉 Good to go? Could you add a CHANGELOG entry? |
Member
Author
It is considered as breaking change depending on the LSP extension you're using. I explained more in rescript-lang/rescript-vscode#1179 I'm not exactly sure how we want to tackle this. On the plus side, I've been using this fix on my work stuff and it is such an improvement. |
nojaf
reviewed
Feb 27, 2026
Member
nojaf
left a comment
There was a problem hiding this comment.
Could you add some more code comments on what the context of this fix is?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The inlay hints doesn't read the document from the buffer, but instead read it from disk. This causes stale position location when the document is edited, at least until you saved it. This stale position interferes with user inputs as well (see video).
This fixed it by reading from the buffer just like completion, etc. See rescript-lang/rescript-vscode#1179
Before/After.
Screen.Recording.2026-02-22.at.10.55.28.AM.mov
Screen.Recording.2026-02-22.at.11.04.41.AM.mov