forked from qt-creator/qt-creator
ClangCodeModel: Use clangd for completion and function hint
Change-Id: I80160f3a40da18ac178682afe6caba5e5af6e3eb Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -28,10 +28,14 @@
|
||||
#include <texteditor/codeassist/completionassistprovider.h>
|
||||
#include <utils/optional.h>
|
||||
|
||||
namespace TextEditor { class IAssistProposal; }
|
||||
|
||||
namespace LanguageClient {
|
||||
|
||||
class Client;
|
||||
|
||||
using ProposalHandler = std::function<void(TextEditor::IAssistProposal *)>;
|
||||
|
||||
class FunctionHintAssistProvider : public TextEditor::CompletionAssistProvider
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -47,8 +51,12 @@ public:
|
||||
bool isContinuationChar(const QChar &c) const override;
|
||||
|
||||
void setTriggerCharacters(const Utils::optional<QList<QString>> &triggerChars);
|
||||
|
||||
void setProposalHandler(const ProposalHandler &handler) { m_proposalHandler = handler; }
|
||||
|
||||
private:
|
||||
QList<QString> m_triggerChars;
|
||||
ProposalHandler m_proposalHandler;
|
||||
int m_activationCharSequenceLength = 0;
|
||||
Client *m_client = nullptr; // not owned
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user