forked from qt-creator/qt-creator
ClangCodeModel: Provide highlighting via clangd
Note that we lose the highlighting for virtual function calls. We need to amend clangd to add the respective information to its semantic tokens message. Also, Qt properties are no longer highlighted as class members. We'll investigate how to best restore this feature. Change-Id: I403712aada3d7a8e1c7b7c1277f43f7f64f8450b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -174,6 +174,7 @@ public:
|
||||
const LanguageServerProtocol::Diagnostic &diag) const;
|
||||
void setDiagnosticsHandlers(const TextMarkCreator &textMarkCreator,
|
||||
const HideDiagnosticsHandler &hideHandler);
|
||||
void setSemanticTokensHandler(const SemanticTokensHandler &handler);
|
||||
void setSymbolStringifier(const LanguageServerProtocol::SymbolStringifier &stringifier);
|
||||
LanguageServerProtocol::SymbolStringifier symbolStringifier() const;
|
||||
|
||||
@@ -226,6 +227,8 @@ private:
|
||||
void handleSemanticTokens(const LanguageServerProtocol::SemanticTokens &tokens);
|
||||
void rehighlight();
|
||||
|
||||
virtual void handleDocumentClosed(TextEditor::TextDocument *) {}
|
||||
|
||||
using ContentHandler = std::function<void(const QByteArray &, QTextCodec *, QString &,
|
||||
LanguageServerProtocol::ResponseHandlers,
|
||||
LanguageServerProtocol::MethodHandler)>;
|
||||
|
||||
Reference in New Issue
Block a user