Skip to content

Completions: need new API to "update" completions #46

@diegoiast

Description

@diegoiast

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is neededquestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions