diff options
author | Itamar <itamar8910@gmail.com> | 2021-05-14 10:20:17 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-14 13:27:47 +0200 |
commit | c49cf23a862cc9564ffaebc8e4dd1c6ef5506bc1 (patch) | |
tree | 1aec63178a99104c3bfe9ea0be0953c588151f7a /Userland/DevTools/HackStudio/LanguageServers/Shell/ClientConnection.h | |
parent | 687efe6dd6be37c0fef827180b8eccfc65ea12f5 (diff) | |
download | serenity-c49cf23a862cc9564ffaebc8e4dd1c6ef5506bc1.zip |
LanguageServers: Remove ClientConnection dependency
We now no longer need to provide a ClientConnection object to construct
AutoCompleteEngine.
Diffstat (limited to 'Userland/DevTools/HackStudio/LanguageServers/Shell/ClientConnection.h')
-rw-r--r-- | Userland/DevTools/HackStudio/LanguageServers/Shell/ClientConnection.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Userland/DevTools/HackStudio/LanguageServers/Shell/ClientConnection.h b/Userland/DevTools/HackStudio/LanguageServers/Shell/ClientConnection.h index 44899c658a..e359ba8497 100644 --- a/Userland/DevTools/HackStudio/LanguageServers/Shell/ClientConnection.h +++ b/Userland/DevTools/HackStudio/LanguageServers/Shell/ClientConnection.h @@ -17,8 +17,10 @@ class ClientConnection final : public LanguageServers::ClientConnection { ClientConnection(NonnullRefPtr<Core::LocalSocket> socket, int client_id) : LanguageServers::ClientConnection(move(socket), client_id) { - m_autocomplete_engine = make<AutoComplete>(*this, m_filedb); - m_autocomplete_engine->set_declarations_of_document_callback = &ClientConnection::set_declarations_of_document_callback; + m_autocomplete_engine = make<AutoComplete>(m_filedb); + m_autocomplete_engine->set_declarations_of_document_callback = [this](const String& filename, Vector<GUI::AutocompleteProvider::Declaration>&& declarations) { + async_declarations_in_document(filename, move(declarations)); + }; } virtual ~ClientConnection() override = default; |