1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:38:12 +00:00

LanguageServers/Cpp: Update client asynchronously about symbols

As a document is parsed, the language server updates the client
asynchronously about symbol declarations it finds.
This commit is contained in:
Itamar 2021-02-27 09:42:57 +02:00 committed by Andreas Kling
parent 71c7597130
commit a94b5376bc
12 changed files with 83 additions and 19 deletions

View file

@ -26,11 +26,20 @@
#include "AutoCompleteEngine.h"
AutoCompleteEngine::AutoCompleteEngine(const FileDB& filedb)
: m_filedb(filedb)
namespace LanguageServers::Cpp {
AutoCompleteEngine::AutoCompleteEngine(ClientConnection& connection, const FileDB& filedb)
: m_connection(connection)
, m_filedb(filedb)
{
}
AutoCompleteEngine::~AutoCompleteEngine()
{
}
void AutoCompleteEngine::set_declarations_of_document(const String& filename, Vector<GUI::AutocompleteProvider::Declaration>&& declarations)
{
VERIFY(set_declarations_of_document_callback);
set_declarations_of_document_callback(m_connection, filename, move(declarations));
}
}