1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:27:45 +00:00

CppLanguageServer+LibGUI: Autocomplete #include paths

The C++ language-server can now autocomplete include paths.

Paths that start with '<' will be searched in /usr/include, and paths
that start with '"' will be searched in the project's root directory.
This commit is contained in:
Itamar 2021-05-22 11:27:54 +03:00 committed by Andreas Kling
parent ccd491594f
commit c003c3c76d
4 changed files with 64 additions and 1 deletions

View file

@ -103,6 +103,7 @@ private:
OwnPtr<DocumentData> create_document_data(String&& text, const String& filename);
Optional<Vector<GUI::AutocompleteProvider::Entry>> try_autocomplete_property(const DocumentData&, const ASTNode&, Optional<Token> containing_token) const;
Optional<Vector<GUI::AutocompleteProvider::Entry>> try_autocomplete_name(const DocumentData&, const ASTNode&, Optional<Token> containing_token) const;
Optional<Vector<GUI::AutocompleteProvider::Entry>> try_autocomplete_include(const DocumentData&, Token include_path_token);
HashMap<String, OwnPtr<DocumentData>> m_documents;
};