Merge pull request #49687 from Razoric480/lsp-symbol-translate

Translate file path to URI on LSP symbol requests
This commit is contained in:
Rémi Verschelde 2021-06-17 17:59:46 +02:00 committed by GitHub
commit 17ded9a152
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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());
}
}
}