diff options
author | BooksBaum <15612932+Booksbaum@users.noreply.github.com> | 2023-07-28 17:06:08 +0200 |
---|---|---|
committer | ryanabx <ryanbrue@hotmail.com> | 2023-09-11 09:46:34 -0500 |
commit | 0202a36a7a0eb76dec9814728e30e00074dc7bb2 (patch) | |
tree | 1628450e38be206c3b951652a7934f5a740c2888 /modules/gdscript/language_server/gdscript_workspace.h | |
parent | 221884e6bc260c38f16422081b7d4efd49a71375 (diff) | |
download | redot-engine-0202a36a7a0eb76dec9814728e30e00074dc7bb2.tar.gz |
Language Server: Improve hovered symbol resolution, fix renaming bugs, implement reference lookup
Co-Authored-By: Ryan Brue <56272643+ryanabx@users.noreply.github.com>
Co-Authored-By: BooksBaum <15612932+booksbaum@users.noreply.github.com>
Diffstat (limited to 'modules/gdscript/language_server/gdscript_workspace.h')
-rw-r--r-- | modules/gdscript/language_server/gdscript_workspace.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/gdscript/language_server/gdscript_workspace.h b/modules/gdscript/language_server/gdscript_workspace.h index 80653778fb..0b2d43b817 100644 --- a/modules/gdscript/language_server/gdscript_workspace.h +++ b/modules/gdscript/language_server/gdscript_workspace.h @@ -54,7 +54,7 @@ protected: const lsp::DocumentSymbol *get_native_symbol(const String &p_class, const String &p_member = "") const; const lsp::DocumentSymbol *get_script_symbol(const String &p_path) const; const lsp::DocumentSymbol *get_parameter_symbol(const lsp::DocumentSymbol *p_parent, const String &symbol_identifier); - const lsp::DocumentSymbol *get_local_symbol(const ExtendGDScriptParser *p_parser, const String &p_symbol_identifier); + const lsp::DocumentSymbol *get_local_symbol_at(const ExtendGDScriptParser *p_parser, const String &p_symbol_identifier, const lsp::Position p_position); void reload_all_workspace_scripts(); @@ -74,9 +74,6 @@ public: HashMap<StringName, ClassMembers> native_members; public: - Array symbol(const Dictionary &p_params); - -public: Error initialize(); Error parse_script(const String &p_path, const String &p_content); @@ -96,6 +93,9 @@ public: Error resolve_signature(const lsp::TextDocumentPositionParams &p_doc_pos, lsp::SignatureHelp &r_signature); void did_delete_files(const Dictionary &p_params); Dictionary rename(const lsp::TextDocumentPositionParams &p_doc_pos, const String &new_name); + bool can_rename(const lsp::TextDocumentPositionParams &p_doc_pos, lsp::DocumentSymbol &r_symbol, lsp::Range &r_range); + Vector<lsp::Location> find_usages_in_file(const lsp::DocumentSymbol &p_symbol, const String &p_file_path); + Vector<lsp::Location> find_all_usages(const lsp::DocumentSymbol &p_symbol); GDScriptWorkspace(); ~GDScriptWorkspace(); |