1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-15 06:44:58 +00:00

HackStudio: Integrate with C++ Language Server

Editors now communicate with the c++ language server when openning and
editing c++ source files, and go through the language server to get
autocomplete suggestions.
This commit is contained in:
Itamar 2020-09-27 00:11:15 +03:00 committed by Andreas Kling
parent 863f14788f
commit a39c4cc340
13 changed files with 197 additions and 34 deletions

View file

@ -131,8 +131,8 @@ public:
void do_delete();
void delete_current_line();
void select_all();
void undo() { document().undo(); }
void redo() { document().redo(); }
virtual void undo() { document().undo(); }
virtual void redo() { document().redo(); }
Function<void()> on_change;
Function<void()> on_mousedown;
@ -263,10 +263,13 @@ private:
inline void execute(Args&&... args)
{
auto command = make<T>(*m_document, forward<Args>(args)...);
on_edit_action(*command);
command->execute_from(*this);
m_document->add_to_undo_stack(move(command));
}
virtual void on_edit_action(const Command&) { }
Type m_type { MultiLine };
Mode m_mode { Editable };