diff options
author | Semih Yavuz <[email protected]> | 2025-06-24 17:03:40 +0200 |
---|---|---|
committer | Semih Yavuz <[email protected]> | 2025-06-27 15:01:49 +0000 |
commit | d8a56333bac3a9c74faf736a7f0e045c680a3e61 (patch) | |
tree | 545ee94b3936da65164d7b7f603b89e28a6b56ad | |
parent | 8524bb6c88c84d79dd9d5a207032797d77085cb2 (diff) |
qmlls adds FIELD and UNKNOWN highlight types. Be aligned with it.
Update the QmlExternalID description as language server sends it when id
is defined in the outer scope.
Task-number: QTBUG-137116
Change-Id: I0687b71b9984afe99a2182488f9491466252cd0e
Reviewed-by: Ulf Hermann <[email protected]>
-rw-r--r-- | src/plugins/qmljseditor/qmllsclient.cpp | 4 | ||||
-rw-r--r-- | src/plugins/qmljseditor/qmllsclient.h | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/qmljseditor/qmllsclient.cpp b/src/plugins/qmljseditor/qmllsclient.cpp index 47af1aed06c..6a181451903 100644 --- a/src/plugins/qmljseditor/qmllsclient.cpp +++ b/src/plugins/qmljseditor/qmllsclient.cpp @@ -197,6 +197,10 @@ QmllsClient::QmllsClient(StdIOClientInterface *interface) return C_JS_GLOBAL_VAR; case QmlSemanticTokens::QmlStateName: return C_QML_STATE_NAME; + case QmlSemanticTokens::Field: + return C_FIELD; + case QmlSemanticTokens::Unknown: + return C_TEXT; default: break; } diff --git a/src/plugins/qmljseditor/qmllsclient.h b/src/plugins/qmljseditor/qmllsclient.h index ee3d7fb8de8..e7a9492b885 100644 --- a/src/plugins/qmljseditor/qmllsclient.h +++ b/src/plugins/qmljseditor/qmllsclient.h @@ -42,14 +42,16 @@ public: // Additional token types for the extended semantic highlighting QmlLocalId, // object id within the same file - QmlExternalId, // object id defined in another file + QmlExternalId, // id from a different component, probably accessible via context hierarchy, but not guaranteed QmlRootObjectProperty, // qml property defined in the parent scopes QmlScopeObjectProperty, // qml property defined in the current scope QmlExternalObjectProperty, // qml property defined in the root object of another file JsScopeVar, // js variable defined in the current file JsImportVar, // js import name that is imported in the qml file JsGlobalVar, // js global variables - QmlStateName // name of a qml state + QmlStateName, // name of a qml state, + Field, // fields of the property chains + Unknown, // used for unresolved token types }; Q_ENUM(QmlSemanticTokens); explicit QmllsClient(LanguageClient::StdIOClientInterface *interface); |