Skip to content

Commit

Permalink
fix: [editor] The highlighting effect is abnormal
Browse files Browse the repository at this point in the history
  • Loading branch information
Kakueeen authored and deepin-mozart committed Oct 31, 2024
1 parent c826c56 commit 76ab3f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion assets/configures/editorstyle_cpp.support
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"Foreground": "#808000"
},
"Operators": {
"Foreground": "#faebd7"
"Foreground": "#00677c"
},
"Number": {
"Foreground": "#000080"
Expand Down
5 changes: 5 additions & 0 deletions src/plugins/codeeditor/lsp/languageworker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ void LanguageWorker::handleDocumentSemanticTokens(const QList<lsp::Data> &tokens
QString sourceText = textEditor->text(startPos, endPos);
if (!sourceText.isEmpty()) {
QString tokenValue = clientHandler->tokenToDefine(val.tokenType);
if (tokenValue.startsWith("operator")) {
QRegularExpression re("^[A-Za-z]+$");
if (re.match(sourceText).hasMatch())
continue;
}
QColor color = clientHandler->symbolIndicColor(tokenValue, {});
#if 0
qInfo() << "line:" << cacheLine;
Expand Down

0 comments on commit 76ab3f2

Please sign in to comment.