mirror of
https://github.com/godotengine/godot.git
synced 2025-10-26 19:24:18 +00:00
LSP: Fix file URI handling + warn about workspace project mismatch
This commit is contained in:
parent
019ab8745f
commit
d55883b4b1
7 changed files with 170 additions and 18 deletions
|
|
@ -494,12 +494,14 @@ Array GDScriptTextDocument::find_symbols(const LSP::TextDocumentPositionParams &
|
|||
if (symbol) {
|
||||
LSP::Location location;
|
||||
location.uri = symbol->uri;
|
||||
location.range = symbol->selectionRange;
|
||||
const String &path = GDScriptLanguageProtocol::get_singleton()->get_workspace()->get_file_path(symbol->uri);
|
||||
if (file_checker->file_exists(path)) {
|
||||
arr.push_back(location.to_json());
|
||||
if (!location.uri.is_empty()) {
|
||||
location.range = symbol->selectionRange;
|
||||
const String &path = GDScriptLanguageProtocol::get_singleton()->get_workspace()->get_file_path(symbol->uri);
|
||||
if (file_checker->file_exists(path)) {
|
||||
arr.push_back(location.to_json());
|
||||
}
|
||||
r_list.push_back(symbol);
|
||||
}
|
||||
r_list.push_back(symbol);
|
||||
} else if (GDScriptLanguageProtocol::get_singleton()->is_smart_resolve_enabled()) {
|
||||
List<const LSP::DocumentSymbol *> list;
|
||||
GDScriptLanguageProtocol::get_singleton()->get_workspace()->resolve_related_symbols(p_location, list);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue