Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
Qt Creator 12.0.0, Qt Creator 14.0.0
Description
Issue
Semantic highlighting requests are not sent by QtCreator.
The semantic tokens endpoint of our custom language server (written in Python using the pygls library) works correctly with VSCode.
The capabilities are correctly detected by QtCreator.
Analysis
The filtering logic in `
SemanticTokenSupport::supportedSemanticRequests` seems to be inverted. A semantic token request will not be sent to a document matching the specified filter (MIME type, pattern, any) but will be sent to a non-matching document.
This has been verified by changing the documentSelector pattern on server side.
Also changing
if (docOptions.isValid()
&& docOptions.filterApplies(...))
to
if (!docOptions.isValid()
|| docOptions.filterApplies(...))
in the `supportedRequests` lambda seems to resolve the issue.