2020-10-03 10:55:51 -03:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2020, the SerenityOS developers.
|
|
|
|
|
*
|
2021-04-22 05:24:48 -03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-10-03 10:55:51 -03:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "AutoComplete.h"
|
2021-03-02 03:10:10 -03:00
|
|
|
#include <DevTools/HackStudio/LanguageServers/ClientConnection.h>
|
2020-10-03 10:55:51 -03:00
|
|
|
|
|
|
|
|
namespace LanguageServers::Shell {
|
|
|
|
|
|
2021-03-02 03:10:10 -03:00
|
|
|
class ClientConnection final : public LanguageServers::ClientConnection {
|
2020-10-03 10:55:51 -03:00
|
|
|
C_OBJECT(ClientConnection);
|
|
|
|
|
|
2021-03-02 03:10:10 -03:00
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
virtual ~ClientConnection() override = default;
|
2020-10-03 10:55:51 -03:00
|
|
|
|
|
|
|
|
private:
|
2021-05-02 14:54:34 -03:00
|
|
|
virtual void set_auto_complete_mode(String const&) override { }
|
2020-10-03 10:55:51 -03:00
|
|
|
};
|
|
|
|
|
}
|