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 <david.schulz@qt.io>
This commit is contained in:
Alexis Murzeau
2020-04-26 23:29:46 +02:00
parent 6118463d39
commit aa68902b62

View File

@@ -66,6 +66,8 @@ static Utils::optional<TextEditor::TextStyle> styleForScopes(const QList<QString
static const QMap<QString, TextEditor::TextStyle> 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<TextEditor::TextStyle> styleForScopes(const QList<QString
{"variable.function", TextEditor::C_FUNCTION},
{"variable.other", TextEditor::C_LOCAL},
{"variable.other.member", TextEditor::C_FIELD},
{"variable.other.field", TextEditor::C_FIELD},
{"variable.other.field.static", TextEditor::C_GLOBAL},
{"variable.parameter", TextEditor::C_LOCAL},
};