mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
HackStudio: Add C++ Language Server
The language server keeps track of the content of currently edited files by receiving updates about edit actions. Also, C++ autocompletion is no longer tied to HackStudio itself and moved to be part of the language server.
This commit is contained in:
@@ -1254,14 +1254,7 @@ bool TextEditor::write_to_file(const StringView& path)
|
||||
|
||||
String TextEditor::text() const
|
||||
{
|
||||
StringBuilder builder;
|
||||
for (size_t i = 0; i < line_count(); ++i) {
|
||||
auto& line = this->line(i);
|
||||
builder.append(line.view());
|
||||
if (i != line_count() - 1)
|
||||
builder.append('\n');
|
||||
}
|
||||
return builder.to_string();
|
||||
return document().text();
|
||||
}
|
||||
|
||||
void TextEditor::clear()
|
||||
|
||||
Reference in New Issue
Block a user