diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-06-17 17:59:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-17 17:59:46 +0200 |
commit | 17ded9a152f41d3e9ef7aa567065fe13f8e0e33d (patch) | |
tree | 75bff87a9242360cfe8663094947ce96c252fc1c /modules/gdscript | |
parent | bf5fa0c77f57bcb0cf908f6cffa319f3beea8fa6 (diff) | |
parent | a56c2e459b40ba27f105754253994c63eab78db0 (diff) |
Merge pull request #49687 from Razoric480/lsp-symbol-translate
Translate file path to URI on LSP symbol requests
Diffstat (limited to 'modules/gdscript')
-rw-r--r-- | modules/gdscript/language_server/gdscript_workspace.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/gdscript/language_server/gdscript_workspace.cpp b/modules/gdscript/language_server/gdscript_workspace.cpp index 9b7b2b36b4..d83f77ed82 100644 --- a/modules/gdscript/language_server/gdscript_workspace.cpp +++ b/modules/gdscript/language_server/gdscript_workspace.cpp @@ -188,7 +188,9 @@ Array GDScriptWorkspace::symbol(const Dictionary &p_params) { E->get()->get_symbols().symbol_tree_as_list(E->key(), script_symbols); for (int i = 0; i < script_symbols.size(); ++i) { if (query.is_subsequence_ofi(script_symbols[i].name)) { - arr.push_back(script_symbols[i].to_json()); + lsp::DocumentedSymbolInformation symbol = script_symbols[i]; + symbol.location.uri = get_file_uri(symbol.location.uri); + arr.push_back(symbol.to_json()); } } } |