summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorItamar <itamar8910@gmail.com>2021-05-09 21:12:00 +0300
committerAndreas Kling <kling@serenityos.org>2021-05-15 23:28:50 +0200
commitf9b8e9c01c939f3680af5d5fb7821b57c0dafc95 (patch)
tree1d3f5bb52576b521e740c4ba8b730649fbd710f5
parentf89f4af0b3e5735307a0c201e8e05267f90cdd72 (diff)
downloadserenity-f9b8e9c01c939f3680af5d5fb7821b57c0dafc95.zip
CppLanguageServer: Autocomplete namespaces
-rw-r--r--Userland/DevTools/HackStudio/LanguageServers/Cpp/ParserAutoComplete.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/DevTools/HackStudio/LanguageServers/Cpp/ParserAutoComplete.cpp b/Userland/DevTools/HackStudio/LanguageServers/Cpp/ParserAutoComplete.cpp
index ff294b717f..7f956a1131 100644
--- a/Userland/DevTools/HackStudio/LanguageServers/Cpp/ParserAutoComplete.cpp
+++ b/Userland/DevTools/HackStudio/LanguageServers/Cpp/ParserAutoComplete.cpp
@@ -126,6 +126,9 @@ Vector<GUI::AutocompleteProvider::Entry> ParserAutoComplete::autocomplete_name(c
if (decl.is_function()) {
add_name(((Cpp::FunctionDeclaration&)decl).m_name);
}
+ if (decl.is_namespace()) {
+ add_name(((Cpp::NamespaceDeclaration&)decl).m_name);
+ }
}
Vector<GUI::AutocompleteProvider::Entry> suggestions;