summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/language_server/gdscript_workspace.h
diff options
context:
space:
mode:
authorgeequlim <geequlim@gmail.com>2019-06-23 21:10:28 +0800
committergeequlim <geequlim@gmail.com>2019-08-11 13:30:15 +0800
commitfa6d6a329c93224b5454b17603284913da0472a3 (patch)
tree6247b59ba4313cb1af1b80efbf45fab2bff10dba /modules/gdscript/language_server/gdscript_workspace.h
parent37aafaaa9cc7d66c85fd9395e46b2386d899ba12 (diff)
downloadredot-engine-fa6d6a329c93224b5454b17603284913da0472a3.tar.gz
Add optional smart resolve sulotion
The smart resolvaion can guess most symbols but it might be slow so disabled by default users can turn on it in the editor setting
Diffstat (limited to 'modules/gdscript/language_server/gdscript_workspace.h')
-rw-r--r--modules/gdscript/language_server/gdscript_workspace.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/modules/gdscript/language_server/gdscript_workspace.h b/modules/gdscript/language_server/gdscript_workspace.h
index ebefd12587..2ae488b451 100644
--- a/modules/gdscript/language_server/gdscript_workspace.h
+++ b/modules/gdscript/language_server/gdscript_workspace.h
@@ -50,27 +50,37 @@ protected:
void reload_all_workspace_scripts();
- void list_script_files(const String &p_root_dir, List<String> &r_files);
ExtendGDScriptParser *get_parse_successed_script(const String &p_path);
ExtendGDScriptParser *get_parse_result(const String &p_path);
+ void strip_flat_symbols(const String &p_branch);
+ void list_script_files(const String &p_root_dir, List<String> &r_files);
+
public:
String root;
+
Map<String, ExtendGDScriptParser *> scripts;
Map<String, ExtendGDScriptParser *> parse_results;
+ Map<String, const lsp::DocumentSymbol *> flat_symbols;
public:
Array symbol(const Dictionary &p_params);
public:
Error initialize();
+
Error parse_script(const String &p_path, const String &p_content);
Error parse_local_script(const String &p_path);
+
String get_file_path(const String &p_uri) const;
String get_file_uri(const String &p_path) const;
+
void publish_diagnostics(const String &p_path);
void completion(const lsp::CompletionParams &p_params, List<ScriptCodeCompletionOption> *r_options);
+
const lsp::DocumentSymbol *resolve_symbol(const lsp::TextDocumentPositionParams &p_doc_pos, const String &p_symbol_name = "", bool p_func_requred = false);
+ void resolve_related_symbols(const lsp::TextDocumentPositionParams &p_doc_pos, List<const lsp::DocumentSymbol *> &r_list);
+
static String marked_documentation(const String &p_bbcode);
GDScriptWorkspace();