From aa68902b62a0ea9d5de916d22c0297908a93c8ba Mon Sep 17 00:00:00 2001 From: Alexis Murzeau Date: Sun, 26 Apr 2020 23:29:46 +0200 Subject: [PATCH] LSP: update semantic highlighting to use more colors The actual highlighting of the C++ code using clangd doesn't use many colors to differentiate symbols (for example, fields of a class). This commit makes symbols more visible for these categories: - static methods - preprocessor macros - struct and class fields - static fields Change-Id: I001325cf5e48aa07d7397b2b7ac98a65501e1d5d Reviewed-by: David Schulz --- src/plugins/languageclient/semantichighlightsupport.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/languageclient/semantichighlightsupport.cpp b/src/plugins/languageclient/semantichighlightsupport.cpp index 8f333ea1838..591280fa34f 100644 --- a/src/plugins/languageclient/semantichighlightsupport.cpp +++ b/src/plugins/languageclient/semantichighlightsupport.cpp @@ -66,6 +66,8 @@ static Utils::optional styleForScopes(const QList styleForScopes = { {"entity.name", TextEditor::C_TYPE}, {"entity.name.function", TextEditor::C_FUNCTION}, + {"entity.name.function.method.static", TextEditor::C_GLOBAL}, + {"entity.name.function.preprocessor", TextEditor::C_PREPROCESSOR}, {"entity.name.label", TextEditor::C_LABEL}, {"keyword", TextEditor::C_KEYWORD}, {"storage.type", TextEditor::C_KEYWORD}, @@ -76,6 +78,8 @@ static Utils::optional styleForScopes(const QList