qmlls client: re-engage lsp semantic highlighting

Task-number: QTBUG-126550
Task-number: QTCREATORBUG-31102
Change-Id: I63c1ea4825ad5b8d71c4fd6c89b94ad90f127e4b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
Semih Yavuz
2024-07-11 16:48:52 +02:00
parent 8a119f7f09
commit b3b3595482
2 changed files with 4 additions and 10 deletions

View File

@@ -732,11 +732,10 @@ void QmlJSEditorDocumentPrivate::setSourcesWithCapabilities(
setSemanticWarningSource(QmllsStatus::Source::Qmlls); setSemanticWarningSource(QmllsStatus::Source::Qmlls);
else else
setSemanticWarningSource(QmllsStatus::Source::EmbeddedCodeModel); setSemanticWarningSource(QmllsStatus::Source::EmbeddedCodeModel);
// TODO: uncomment when qmlls semantic tokens reach a stable state if (cap.semanticTokensProvider())
// if (cap.semanticTokensProvider()) setSemanticHighlightSource(QmllsStatus::Source::Qmlls);
// setSemanticHighlightSource(QmllsStatus::Source::Qmlls); else
// else setSemanticHighlightSource(QmllsStatus::Source::EmbeddedCodeModel);
setSemanticHighlightSource(QmllsStatus::Source::EmbeddedCodeModel);
} }
static FilePath qmllsForFile(const FilePath &file, QmlJS::ModelManagerInterface *modelManager) static FilePath qmllsForFile(const FilePath &file, QmlJS::ModelManagerInterface *modelManager)

View File

@@ -85,11 +85,6 @@ QmllsClient::~QmllsClient()
void QmllsClient::startImpl() void QmllsClient::startImpl()
{ {
LanguageServerProtocol::Unregistration unregister;
unregister.setMethod("textDocument/semanticTokens");
unregister.setId({});
dynamicCapabilities().unregisterCapability({unregister});
Client::startImpl(); Client::startImpl();
} }