rust-lang / rust-lang/rust-analyzer

RA duplicates subdiagnostics as top-level diagnostics making the list less readable in Kate

Open
#14,934 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-diagnostics A-vscode C-bug
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

rust-analyzer version: should be rust-analyzer 1.69.0 (84c898d 2023-04-16)

rustc version: rustc 1.69.0 (84c898d65 2023-04-16)

Kate is a KDE code editor and has a basic LSP support including listing emitted diagnostics. As it emits them as a tree with diagnostics and subdiagnostics, the duplication done by RA does not do the right thing in this case (see example screenshot below).

image

I haven't studied this in detail recently, but I believe RA has been doing that to workaround VSCode not displaying subdiagnostics in a reasonable way and I feel that making protocol-level information incorrect to trigger specific handling in a specific consumer is kinda wrong.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by reproducing the diagnostic tree in Kate and comparing rust-analyzer's LSP diagnostics with the reported subdiagnostic duplication; done means the protocol output no longer duplicates subdiagnostics while preserving expected diagnostic display behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.