redhat-developer / redhat-developer/lsp4ij

Syntax Highlighting breaks since Jetbrains version 2024.2.1 on error

Open
#780 15 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug semantic tokens
Dominant language
Java
Stars
344
Forks
113
Avg merge
5h 22m
Merged PRs (30d)
15

Description

Hello.
I'm developing a plugin for the QML Language Server for Android Studio. I get syntax highlighting out of the box using LSP4IJ as shown below.

Image

However, starting from Android Studio Ladybug (Jetbrains 2024.2.1), the syntax highlighting breaks whenever there is an error in the code. It returns back to normal if the error is fixed.

Error in code before Android Studio Ladybug:
Image

Error in code after Android Studio Ladybug:
Image

Tested this bug on regular IntelliJ IDEA and was able to reproduce starting with 2024.2.1 and above. It is configured like this:
Image
Image

Errors in Trace Logs:
[Trace - 12:58:37] Received response 'textDocument/semanticTokens/full - (20)' in 1ms. No response returned. Error: { "code": -32800, "message": "Cannot proceed: current QML document is invalid!" }

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

Reproduce the issue in IntelliJ IDEA or Android Studio 2024.2.1 and later with the QML Language Server configured through LSP4IJ. Start by examining the semantic-token trace when the QML document is invalid; done means syntax highlighting remains available while the document contains an error.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.