forked from qt-creator/qt-creator
LanguageClient: update semantic highlighting only if server supports it
Task-number: QTCREATORBUG-23599 Change-Id: I76c804b51362ad6ab2aecf0631a16289a33e4810 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -151,10 +151,12 @@ void applyHighlight(TextEditor::TextDocument *doc,
|
||||
}
|
||||
}
|
||||
|
||||
TextEditor::SemanticHighlighter::setExtraAdditionalFormats(
|
||||
doc->syntaxHighlighter(),
|
||||
results,
|
||||
scopesToFormatHash(highlightScopes(capabilities), doc->fontSettings()));
|
||||
if (capabilities.semanticHighlighting().has_value()) {
|
||||
TextEditor::SemanticHighlighter::setExtraAdditionalFormats(
|
||||
doc->syntaxHighlighter(),
|
||||
results,
|
||||
scopesToFormatHash(highlightScopes(capabilities), doc->fontSettings()));
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace SemanticHighligtingSupport
|
||||
|
||||
Reference in New Issue
Block a user