summaryrefslogtreecommitdiff
path: root/Userland/DevTools/HackStudio/LanguageServers/Cpp/ClientConnection.h
diff options
context:
space:
mode:
authorItamar <itamar8910@gmail.com>2021-01-23 16:55:19 +0200
committerAndreas Kling <kling@serenityos.org>2021-01-27 21:10:57 +0100
commitfa18010477821f114953015677daa789580a4683 (patch)
tree8449129a0a08038cb261284e5754e0d0673dc070 /Userland/DevTools/HackStudio/LanguageServers/Cpp/ClientConnection.h
parent8ed96eb27c332bd86dafd3da78b362668e00e0b9 (diff)
downloadserenity-fa18010477821f114953015677daa789580a4683.zip
HackStudio: Integate with C++ parser-based autocomplete
By default, C++ auto completion will still be performed by the lexer-based logic. However, the parser-based logic can be switched on via the menubar.
Diffstat (limited to 'Userland/DevTools/HackStudio/LanguageServers/Cpp/ClientConnection.h')
-rw-r--r--Userland/DevTools/HackStudio/LanguageServers/Cpp/ClientConnection.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/Userland/DevTools/HackStudio/LanguageServers/Cpp/ClientConnection.h b/Userland/DevTools/HackStudio/LanguageServers/Cpp/ClientConnection.h
index d0a7b4558c..3389ba8231 100644
--- a/Userland/DevTools/HackStudio/LanguageServers/Cpp/ClientConnection.h
+++ b/Userland/DevTools/HackStudio/LanguageServers/Cpp/ClientConnection.h
@@ -55,10 +55,18 @@ private:
virtual void handle(const Messages::LanguageServer::FileEditRemoveText&) override;
virtual void handle(const Messages::LanguageServer::SetFileContent&) override;
virtual void handle(const Messages::LanguageServer::AutoCompleteSuggestions&) override;
+ virtual void handle(const Messages::LanguageServer::SetAutoCompleteMode&) override;
RefPtr<GUI::TextDocument> document_for(const String& file_name);
HashMap<String, NonnullRefPtr<GUI::TextDocument>> m_open_files;
+
+ enum class AutoCompleteMode {
+ Lexer,
+ Parser
+ };
+
+ AutoCompleteMode m_auto_complete_mode { AutoCompleteMode::Lexer };
};
}