From 52abfab8a44e7193fa57c331da14ea51ccde60c0 Mon Sep 17 00:00:00 2001 From: Semih Yavuz Date: Mon, 15 Jul 2024 13:13:59 +0200 Subject: [PATCH] qmlls client: Start with extended highlighting options Introduce the extendedHighlighting flag to let qmlls server know that this client is capable of consuming the extra token types. This is the first step to reach the embedded highlighter's parity. Qmlls will use this flag and send more detailed highlighting token. For example, instead of mapping to Property kind, qmlls will map a property to either ScopeProperty, RootProperty or ExternalProperty depending on the scope they are being used. Task-number: QTBUG-126550 Task-number: QTCREATORBUG-31102 Change-Id: I9cb4d86e4fccc7f8b9a4b7c5ee2a8f0fe9794127 Reviewed-by: Ulf Hermann --- src/plugins/qmljseditor/qmllsclient.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/qmljseditor/qmllsclient.cpp b/src/plugins/qmljseditor/qmllsclient.cpp index bb5195ce91d..ab239da5053 100644 --- a/src/plugins/qmljseditor/qmllsclient.cpp +++ b/src/plugins/qmljseditor/qmllsclient.cpp @@ -76,6 +76,10 @@ QmllsClient::QmllsClient(StdIOClientInterface *interface) &ProjectExplorer::BuildManager::buildQueueFinished, this, [this]() { LanguageClientManager::restartClient(this); }); + QJsonObject initializationOptions { + {"qtCreatorHighlighting", true} + }; + setInitializationOptions(initializationOptions); } QmllsClient::~QmllsClient()