mirror of
https://github.com/RGBCube/serenity
synced 2025-05-25 15:55:07 +00:00
HackStudio: Relay completions requests to the language server unfiltered
Previously, the client would decide when to ask the server for completions, and it would only do so for identifiers that had spans (determined via the highlighter!). Swap this around and make the server decide if it wants to complete something. This commit also adds a CompletionKind (which only has one value: Identifier), to work with other kinds of completions as well.
This commit is contained in:
parent
b42c6ea281
commit
9e73b0b696
12 changed files with 125 additions and 50 deletions
|
@ -61,7 +61,7 @@ void LanguageClient::request_autocomplete(const String& path, size_t cursor_line
|
|||
m_connection.post_message(Messages::LanguageServer::AutoCompleteSuggestions(path, cursor_line, cursor_column));
|
||||
}
|
||||
|
||||
void LanguageClient::provide_autocomplete_suggestions(const Vector<String>& suggestions)
|
||||
void LanguageClient::provide_autocomplete_suggestions(const Vector<AutoCompleteResponse>& suggestions)
|
||||
{
|
||||
if (on_autocomplete_suggestions)
|
||||
on_autocomplete_suggestions(suggestions);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue