forked from qt-creator/qt-creator
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:
@@ -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)
|
||||||
|
@@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user