Highlights and inlay hints randomly get offset

オープン
#272 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
java
領域
tooling

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
Rust
スター
225
フォーク
47
平均マージ
3時間 51分
マージ済み PR(30日)
7

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

zed-extensions/java のほかの issue

zed-extensions/java の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。