summaryrefslogtreecommitdiff
path: root/modules/gdscript/language_server/gdscript_workspace.cpp
diff options
context:
space:
mode:
authorgeequlim <geequlim@gmail.com>2019-10-03 16:26:55 +0800
committergeequlim <geequlim@gmail.com>2019-10-03 18:51:03 +0800
commit6a8303f82f78646d77bc3f18b7083313005485c9 (patch)
tree121a0e02d66158c8bee22b25ad67c979c03b7eae /modules/gdscript/language_server/gdscript_workspace.cpp
parentd1a6964d3965ced647226e0489ca50f1f28aacd2 (diff)
Implement DocumentLink of GDScript LSP Server
Diffstat (limited to 'modules/gdscript/language_server/gdscript_workspace.cpp')
-rw-r--r--modules/gdscript/language_server/gdscript_workspace.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/gdscript/language_server/gdscript_workspace.cpp b/modules/gdscript/language_server/gdscript_workspace.cpp
index 1901daacff..b42464aa8a 100644
--- a/modules/gdscript/language_server/gdscript_workspace.cpp
+++ b/modules/gdscript/language_server/gdscript_workspace.cpp
@@ -475,6 +475,15 @@ void GDScriptWorkspace::resolve_related_symbols(const lsp::TextDocumentPositionP
}
}
+void GDScriptWorkspace::resolve_document_links(const String &p_uri, List<lsp::DocumentLink> &r_list) {
+ if (const ExtendGDScriptParser *parser = get_parse_successed_script(get_file_path(p_uri))) {
+ const List<lsp::DocumentLink> &links = parser->get_document_links();
+ for (const List<lsp::DocumentLink>::Element *E = links.front(); E; E = E->next()) {
+ r_list.push_back(E->get());
+ }
+ }
+}
+
Dictionary GDScriptWorkspace::generate_script_api(const String &p_path) {
Dictionary api;
if (const ExtendGDScriptParser *parser = get_parse_successed_script(p_path)) {