The code has a function to ask for completions.
|
inline void setCompletionCallback(CompletionCallback callback) { |
And specially here, which actually blocks the main thread:
|
auto completions = completionCallback_(currentWord); |
|
if (!completions.isEmpty()) { |
|
completer_->setCustomCompletions(completions); |
|
} |
|
} |
|
completer_->invokeCompletionIfAvailable(false); |
However, this API is synchroneous and blocking. While working with a language server we will need an async version. Maybe using a QFuture. Maybe still using a callback. Need to research how this API works before this is decided.
The code has a function to ask for completions.
qutepart-cpp/include/qutepart/qutepart.h
Line 370 in 76a8479
And specially here, which actually blocks the main thread:
qutepart-cpp/src/qutepart.cpp
Lines 990 to 995 in 76a8479
However, this API is synchroneous and blocking. While working with a language server we will need an async version. Maybe using a QFuture. Maybe still using a callback. Need to research how this API works before this is decided.