LSP: Fix file URI handling + warn about workspace project mismatch

This commit is contained in:
HolonProduction
2025-03-20 10:24:16 +01:00
parent 019ab8745f
commit d55883b4b1
7 changed files with 170 additions and 18 deletions
+5 -1
View File
@@ -334,7 +334,7 @@ void test_position_roundtrip(LSP::Position p_lsp, GodotPosition p_gd, const Pack
// * Line & Char:
// * LSP: both 0-based
// * Godot: both 1-based
TEST_SUITE("[Modules][GDScript][LSP]") {
TEST_SUITE("[Modules][GDScript][LSP][Editor]") {
TEST_CASE("Can convert positions to and from Godot") {
String code = R"(extends Node
@@ -405,6 +405,7 @@ func f():
}
}
TEST_CASE("[workspace][resolve_symbol]") {
EditorFileSystem *efs = memnew(EditorFileSystem);
GDScriptLanguageProtocol *proto = initialize(root);
REQUIRE(proto);
Ref<GDScriptWorkspace> workspace = GDScriptLanguageProtocol::get_singleton()->get_workspace();
@@ -485,9 +486,11 @@ func f():
}
memdelete(proto);
memdelete(efs);
finish_language();
}
TEST_CASE("[workspace][document_symbol]") {
EditorFileSystem *efs = memnew(EditorFileSystem);
GDScriptLanguageProtocol *proto = initialize(root);
REQUIRE(proto);
@@ -524,6 +527,7 @@ func f():
}
memdelete(proto);
memdelete(efs);
finish_language();
}
}