mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 22:21:18 +00:00
Add identifier completion for custom classes.
Previously, custom class would only auto-complete for types in GDScript. This applies it to identifiers as well.
This commit is contained in:
parent
bc5d67c613
commit
aa4bceff3e
1 changed files with 8 additions and 0 deletions
|
|
@ -1271,6 +1271,14 @@ static void _find_identifiers(const GDScriptParser::CompletionContext &p_context
|
||||||
}
|
}
|
||||||
r_result.insert(option.display, option);
|
r_result.insert(option.display, option);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Global classes
|
||||||
|
List<StringName> global_classes;
|
||||||
|
ScriptServer::get_global_class_list(&global_classes);
|
||||||
|
for (const StringName &E : global_classes) {
|
||||||
|
ScriptLanguage::CodeCompletionOption option(E, ScriptLanguage::CODE_COMPLETION_KIND_CLASS, ScriptLanguage::LOCATION_OTHER_USER_CODE);
|
||||||
|
r_result.insert(option.display, option);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static GDScriptCompletionIdentifier _type_from_variant(const Variant &p_value) {
|
static GDScriptCompletionIdentifier _type_from_variant(const Variant &p_value) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue