forked from qt-creator/qt-creator
Export SemanticTokenSupport
This class manages the semantic token functionality for LSP clients. Since clients might need to modify or customize its internals, we should make it accessible to other libraries. Task-number: QTBUG-126550 Task-number: QTCREATORBUG-31102 Change-Id: I3957197ce48faac90efedac1a42b763ba2b7b4d1 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
This commit is contained in:
@@ -1815,6 +1815,11 @@ HoverHandler *Client::hoverHandler()
|
||||
return &d->m_hoverHandler;
|
||||
}
|
||||
|
||||
SemanticTokenSupport *Client::semanticTokenSupport()
|
||||
{
|
||||
return &d->m_tokenSupport;
|
||||
}
|
||||
|
||||
void ClientPrivate::log(const ShowMessageParams &message)
|
||||
{
|
||||
q->log(message.toString());
|
||||
|
@@ -165,6 +165,7 @@ public:
|
||||
LinkTarget target);
|
||||
DocumentSymbolCache *documentSymbolCache();
|
||||
HoverHandler *hoverHandler();
|
||||
SemanticTokenSupport *semanticTokenSupport();
|
||||
QList<LanguageServerProtocol::Diagnostic> diagnosticsAt(const Utils::FilePath &filePath,
|
||||
const QTextCursor &cursor) const;
|
||||
bool hasDiagnostic(const Utils::FilePath &filePath,
|
||||
|
@@ -39,7 +39,7 @@ public:
|
||||
using SemanticTokensHandler = std::function<void(TextEditor::TextDocument *,
|
||||
const QList<ExpandedSemanticToken> &, int, bool)>;
|
||||
|
||||
class SemanticTokenSupport : public QObject
|
||||
class LANGUAGECLIENT_EXPORT SemanticTokenSupport : public QObject
|
||||
{
|
||||
public:
|
||||
explicit SemanticTokenSupport(Client *client);
|
||||
|
Reference in New Issue
Block a user