summaryrefslogtreecommitdiff
path: root/Userland/DevTools/HackStudio/LanguageClient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/DevTools/HackStudio/LanguageClient.cpp')
-rw-r--r--Userland/DevTools/HackStudio/LanguageClient.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/Userland/DevTools/HackStudio/LanguageClient.cpp b/Userland/DevTools/HackStudio/LanguageClient.cpp
index 75833bbc2d..42aa25e3a9 100644
--- a/Userland/DevTools/HackStudio/LanguageClient.cpp
+++ b/Userland/DevTools/HackStudio/LanguageClient.cpp
@@ -14,7 +14,7 @@
namespace HackStudio {
-void ConnectionToServer::auto_complete_suggestions(const Vector<GUI::AutocompleteProvider::Entry>& suggestions)
+void ConnectionToServer::auto_complete_suggestions(Vector<GUI::AutocompleteProvider::Entry> const& suggestions)
{
if (!m_current_language_client) {
dbgln("Language Server connection has no attached language client");
@@ -60,35 +60,35 @@ void ConnectionToServer::die()
m_wrapper->on_crash();
}
-void LanguageClient::open_file(const String& path, int fd)
+void LanguageClient::open_file(String const& path, int fd)
{
if (!m_connection_wrapper.connection())
return;
m_connection_wrapper.connection()->async_file_opened(path, fd);
}
-void LanguageClient::set_file_content(const String& path, const String& content)
+void LanguageClient::set_file_content(String const& path, String const& content)
{
if (!m_connection_wrapper.connection())
return;
m_connection_wrapper.connection()->async_set_file_content(path, content);
}
-void LanguageClient::insert_text(const String& path, const String& text, size_t line, size_t column)
+void LanguageClient::insert_text(String const& path, String const& text, size_t line, size_t column)
{
if (!m_connection_wrapper.connection())
return;
m_connection_wrapper.connection()->async_file_edit_insert_text(path, text, line, column);
}
-void LanguageClient::remove_text(const String& path, size_t from_line, size_t from_column, size_t to_line, size_t to_column)
+void LanguageClient::remove_text(String const& path, size_t from_line, size_t from_column, size_t to_line, size_t to_column)
{
if (!m_connection_wrapper.connection())
return;
m_connection_wrapper.connection()->async_file_edit_remove_text(path, from_line, from_column, to_line, to_column);
}
-void LanguageClient::request_autocomplete(const String& path, size_t cursor_line, size_t cursor_column)
+void LanguageClient::request_autocomplete(String const& path, size_t cursor_line, size_t cursor_column)
{
if (!m_connection_wrapper.connection())
return;
@@ -96,7 +96,7 @@ void LanguageClient::request_autocomplete(const String& path, size_t cursor_line
m_connection_wrapper.connection()->async_auto_complete_suggestions(GUI::AutocompleteProvider::ProjectLocation { path, cursor_line, cursor_column });
}
-void LanguageClient::provide_autocomplete_suggestions(const Vector<GUI::AutocompleteProvider::Entry>& suggestions) const
+void LanguageClient::provide_autocomplete_suggestions(Vector<GUI::AutocompleteProvider::Entry> const& suggestions) const
{
if (on_autocomplete_suggestions)
on_autocomplete_suggestions(suggestions);
@@ -120,7 +120,7 @@ bool LanguageClient::is_active_client() const
HashMap<String, NonnullOwnPtr<ConnectionToServerWrapper>> ConnectionToServerInstances::s_instance_for_language;
-void ConnectionToServer::declarations_in_document(const String& filename, const Vector<GUI::AutocompleteProvider::Declaration>& declarations)
+void ConnectionToServer::declarations_in_document(String const& filename, Vector<GUI::AutocompleteProvider::Declaration> const& declarations)
{
ProjectDeclarations::the().set_declared_symbols(filename, declarations);
}
@@ -130,7 +130,7 @@ void ConnectionToServer::todo_entries_in_document(String const& filename, Vector
ToDoEntries::the().set_entries(filename, move(todo_entries));
}
-void LanguageClient::search_declaration(const String& path, size_t line, size_t column)
+void LanguageClient::search_declaration(String const& path, size_t line, size_t column)
{
if (!m_connection_wrapper.connection())
return;
@@ -138,7 +138,7 @@ void LanguageClient::search_declaration(const String& path, size_t line, size_t
m_connection_wrapper.connection()->async_find_declaration(GUI::AutocompleteProvider::ProjectLocation { path, line, column });
}
-void LanguageClient::get_parameters_hint(const String& path, size_t line, size_t column)
+void LanguageClient::get_parameters_hint(String const& path, size_t line, size_t column)
{
if (!m_connection_wrapper.connection())
return;
@@ -146,7 +146,7 @@ void LanguageClient::get_parameters_hint(const String& path, size_t line, size_t
m_connection_wrapper.connection()->async_get_parameters_hint(GUI::AutocompleteProvider::ProjectLocation { path, line, column });
}
-void LanguageClient::get_tokens_info(const String& filename)
+void LanguageClient::get_tokens_info(String const& filename)
{
if (!m_connection_wrapper.connection())
return;
@@ -154,7 +154,7 @@ void LanguageClient::get_tokens_info(const String& filename)
m_connection_wrapper.connection()->async_get_tokens_info(filename);
}
-void LanguageClient::declaration_found(const String& file, size_t line, size_t column) const
+void LanguageClient::declaration_found(String const& file, size_t line, size_t column) const
{
if (!on_declaration_found) {
dbgln("on_declaration_found callback is not set");
@@ -172,17 +172,17 @@ void LanguageClient::parameters_hint_result(Vector<String> const& params, size_t
on_function_parameters_hint_result(params, argument_index);
}
-void ConnectionToServerInstances::set_instance_for_language(const String& language_name, NonnullOwnPtr<ConnectionToServerWrapper>&& connection_wrapper)
+void ConnectionToServerInstances::set_instance_for_language(String const& language_name, NonnullOwnPtr<ConnectionToServerWrapper>&& connection_wrapper)
{
s_instance_for_language.set(language_name, move(connection_wrapper));
}
-void ConnectionToServerInstances::remove_instance_for_language(const String& language_name)
+void ConnectionToServerInstances::remove_instance_for_language(String const& language_name)
{
s_instance_for_language.remove(language_name);
}
-ConnectionToServerWrapper* ConnectionToServerInstances::get_instance_wrapper(const String& language_name)
+ConnectionToServerWrapper* ConnectionToServerInstances::get_instance_wrapper(String const& language_name)
{
if (auto instance = s_instance_for_language.get(language_name); instance.has_value()) {
return const_cast<ConnectionToServerWrapper*>(instance.value());
@@ -223,7 +223,7 @@ void ConnectionToServerWrapper::show_crash_notification() const
notification->show();
}
-ConnectionToServerWrapper::ConnectionToServerWrapper(const String& language_name, Function<NonnullRefPtr<ConnectionToServer>()> connection_creator)
+ConnectionToServerWrapper::ConnectionToServerWrapper(String const& language_name, Function<NonnullRefPtr<ConnectionToServer>()> connection_creator)
: m_language(language_from_name(language_name))
, m_connection_creator(move(connection_creator))
{
@@ -267,7 +267,7 @@ void ConnectionToServerWrapper::try_respawn_connection()
// After respawning the language-server, we have to send the content of open project files
// so the server's FileDB will be up-to-date.
- for_each_open_file([this](const ProjectFile& file) {
+ for_each_open_file([this](ProjectFile const& file) {
if (file.code_document().language() != m_language)
return;
m_connection->async_set_file_content(file.code_document().file_path(), file.document().text());