Highlights and inlay hints randomly get offset

Ouverte
#272 6 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
30/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
java
Domaine
tooling

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

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:
Image
And what it should look like:
Image

And here for highlights (I have the cursor inside lastName here):
Image

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

Langage dominant
Rust
Étoiles
225
Forks
47
Merge moyen
3 h 51 min
PR mergées (30 j)
7

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de zed-extensions/java

Toutes les issues de zed-extensions/java

Issues similaires

Plus d'issues Rust

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.