Highlights and inlay hints randomly get offset
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
Research direction
The payload names no files or tests, so start by reproducing: open a long Java file in Zed with this extension, make edits, and check whether highlights and parameter inlay hints drift further down the file, as the screenshots show. The reporter says a save refreshes the positions, so compare the positions the language server sends after an edit with the ones Zed renders. Done means the offset stops appearing after edits without a save, with a reproduction and a note on whether the cause is in the extension, Zed, or JDTLS.
Written by the indexing model from the issue text.
Description
I don't know if this is a bug with the extension, Zed or JDTLS, but it has been happening for months so I figured I might as well report it and hopefully one of you guys here can find where the actual issue is.
Like the issue title says, there is a disconnect between the positions where highlights and inlay hints should be in the code and where Zed displays them.
Here is a screenshot of the parameter name inlay hints to show what I mean:
And what it should look like:
And here for highlights (I have the cursor inside lastName here):
I haven't figured out what it is that triggers this; it just happens every now and then when I edit the code in a file. It also does not happen across the entire file; it starts at some point and then gradually gets worse the further down the file I go from there. If I make any change to the file and save it, the LSP will refresh the information and everything ends up in the right spot again (i.e. the offset issue disappears).
This is quite annoying, although not vital since it disappears after doing an edit and saving.
Zed: v1.6.3+stable.306.601ecb3ee5c16940191818ee7f244837abf6983c (Zed)
OS: Windows 10.0.26100
Memory: 31.7 GiB
Architecture: x86_64
- Dominant language
- Rust
- Stars
- 225
- Forks
- 47
- Avg merge
- 3h
- Merged PRs (30d)
- 5
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from zed-extensions/java
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
zed-extensions/java#325 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
zed-extensions/java#133 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
zed-extensions/java#324 · 1 comment ·
-
language-server
Difficulty 4/5 3-5 days Newbie friendliness 25/100
zed-extensions/java#246 · 4 comments ·
-
language-server
Difficulty 4/5 3-5 days Newbie friendliness 18/100
zed-extensions/java#233 · 16 comments ·
All issues in zed-extensions/java
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
`nsh-core` fails to compile when taffy's default `calc` feature is enabled elsewhere in the graphOpen
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
longbridge/nsh#966 ·
Maintainers usually reply within 1 day
-
Windows docs: pin a tested ConPTY version for Kitty graphics; 1.25.260930003 corrupts large uploadsOpen
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
raphamorim/rio#2021 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
hydro-project/infinity#187 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
near/near-sdk-rs#1676 ·
Maintainers usually reply within 2 days