Godot: Autocomplete does not work reliably with built-in singletons (Engine, OS, etc.)

Created on 23 Feb 2019  路  12Comments  路  Source: godotengine/godot

Godot version:
3.1 beta 6 (also seems to be broken in beta 4)

OS/device including version:
Windows 10

Issue description:
Autocomplete does not complete some things like it could in the past. This includes enums, and some built-in variables like Engine.editor_hint.

bug editor

Most helpful comment

Autocomplete is totally broken, agree!

All 12 comments

Autocomplete is totally broken, agree!

Variables like Engine.editor_hint work for me. But yeah, the named enums aren't autocompleting. Unnamed enums do still autocomplete though.

Probably i was very dramatic with the "totally"... the most breaked thing for me is not exactly the autocomplete, is the "tooltip" of the autocomplete, that works sometimes and this is work disruptive, because without know the parameters, autocomplete doesn麓t have meaning for call functions... Other thing that is breaked is access dictionary members, once you put the dot, only the "Dictionary class" functions apears, but if is a declarated dictionary (explicit typed as dictionary) you should want members autocomplete.

About Engine.editor_hint #26114

@Ranoller I agree with you - autocomplete should work better. But I think we should create concrete issues here, with specific examples (not very abstract one like "nothing works"), because it is easier to understand and to fix.

var stringWithApostrophe = " ' " == $
var stringWithApostrophe = " ' " == $"
var stringWithApostrophe = " ' " == $'

Autocomplete doesn't trigger. To parser there's no difference between " and '. It treats them same. This is why it can't tell what characters are inside quotes in above lines.

file: text_edit.cpp
function: TextEdit::_update_completion_candidates()
code fragment:

if (l[c] == '"' || l[c] == '\'') {
    inquote = !inquote;

@hilfazer Has it always failed that? This issue has more to do with autocompletion that used to work not working now, than autocomplete issues that have always been there (otherwise this issue would basically never close).

@11clock I don't know if always but in 3.0 it was already broken. Same in 3.0.6.

Yes has quite a few difficulties since I moved from 2.1 to 3.1. It can become a hindrance at times, so I use an external editor more often as of late.

Reported at least one: https://github.com/godotengine/godot/issues/22121

Something I've just found:
print(OS. shows no autocomplete. But if you type print() and then ad OS. it does show autocomplete. This also happens with Engine and doesn't happen with Input for example, which shows autocomplete either way.

Tested in 3.1.1 and fa5cc1d

I just found an old related issue: #22333

Tested in the current master branch and Engine or OS autocompletion works kind of OK, apart from the issue tracked in #26114. So I'll close this issue, the other one is scheduled to be fixed in 4.0.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bojidar-bg picture bojidar-bg  路  3Comments

timoschwarzer picture timoschwarzer  路  3Comments

blurymind picture blurymind  路  3Comments

RebelliousX picture RebelliousX  路  3Comments

n-pigeon picture n-pigeon  路  3Comments