summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2018-05-29 23:16:59 -0300
committerGeorge Marques <george@gmarqu.es>2018-07-20 21:55:17 -0300
commit75f395c2a0dd3d1af4f53585145dc22f76ecd134 (patch)
tree1ff13a6e4ade1c129dd6c4c01ed19388bfb03d41 /editor
parent95351ac867228774d455fe1e3de27d08d1f4f83a (diff)
Use type hints to improve completion
- Allow type hints to be completed. - Use type information to infer completion candidates. - Show typed function signature in tooltip. - Add type hints when completing declaration from virtual functions (optional).
Diffstat (limited to 'editor')
-rw-r--r--editor/connections_dialog.cpp4
-rw-r--r--editor/editor_settings.cpp1
2 files changed, 4 insertions, 1 deletions
diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp
index 8933fd7fe8..c4f4e28fec 100644
--- a/editor/connections_dialog.cpp
+++ b/editor/connections_dialog.cpp
@@ -820,7 +820,9 @@ void ConnectionsDock::update_tree() {
if (i > 0)
signaldesc += ", ";
String tname = "var";
- if (pi.type != Variant::NIL) {
+ if (pi.type == Variant::OBJECT && pi.class_name != StringName()) {
+ tname = pi.class_name.operator String();
+ } else if (pi.type != Variant::NIL) {
tname = Variant::get_type_name(pi.type);
}
signaldesc += tname + " " + (pi.name == "" ? String("arg " + itos(i)) : pi.name);
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index 4cfdb6f6d3..9736eb0969 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -404,6 +404,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("text_editor/completion/callhint_tooltip_offset", Vector2());
_initial_set("text_editor/files/restore_scripts_on_load", true);
_initial_set("text_editor/completion/complete_file_paths", true);
+ _initial_set("text_editor/completion/add_type_hints", false);
_initial_set("docks/scene_tree/start_create_dialog_fully_expanded", false);
_initial_set("docks/scene_tree/draw_relationship_lines", false);