-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
6.10
-
None
We need a fallback for qmlls to provide a fallback for semantic highlighting on invalid documents. The problem is that the android studio and jetbrains (for the JAVA Qt bridge) LSP clients remove all the highlighting once qmlls reports that it can't update the highlighting, for example because the file is invalid.
This would solve the problem from QTTA-294 and would be a simpler alternative to the new parser (QTBUG-118053).
Ideas to try:
- find out if android studio can be argued with to keep the semantic highlighting as soon as the files become invalid (try using different error codes in qmlls when we report that a new semantic highlighting can't be produced, for example)
- implement some kind of fallback semantic highlighting (keep track of the file changes and "slide" the semantic tokens that occur after a changed section, so that the invalid code has no highlighting but all the unchanged code keeps its highlighting)
- implement a regexp based highlighting (or re-use the one from Qt Creator or the VS Code extension?) that has no semantic information but could be used as fallback.
- is required for
-
QTTA-294 QML LSP fails if syntax errors are found
-
- Reported
-