LanguageClient: use internal filtering if we got all completions

... at the current position. This reduces the amount of requested
completions.

Change-Id: I0fa35269bc123513217e3b3abd2c921bd92d8d10
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
David Schulz
2022-11-10 13:33:25 +01:00
parent 63a8218680
commit 5eca1ff873
4 changed files with 35 additions and 16 deletions

View File

@@ -68,9 +68,9 @@ bool IAssistProposal::isFragile() const
return m_isFragile;
}
bool IAssistProposal::supportsPrefix() const
bool IAssistProposal::supportsPrefixFiltering(const QString &prefix) const
{
return m_supportsPrefix;
return !m_prefixChecker || m_prefixChecker(prefix);
}
/*!
@@ -103,9 +103,9 @@ void IAssistProposal::setFragile(bool fragile)
m_isFragile = fragile;
}
void IAssistProposal::setSupportsPrefix(bool supportsPrefix)
void IAssistProposal::setPrefixChecker(const PrefixChecker checker)
{
m_supportsPrefix = supportsPrefix;
m_prefixChecker = checker;
}
/*!