-
-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Editor Settings for autocomplete with StringNames and NodePaths #5496
Comments
That's the main thing the proposal aims to solve. I think the settings should be off by default. |
I'm currently working on this proposal btw, I think I'll be able to finish it. Edit: 🎉 |
@KoBeWi Didn't implement that, so the PR stays focused on more advanced autocompletion. I think removing the quotation marks would be controversial, or warrant a setting of its own. I would personally rather not be misguided about exactly what autocompletion will do. Only for things like braces after methods I think it's acceptable to not show the full thing, because they are in front of everything, so the user first autocompletes, then thinks about adding braces. But quotation marks are added first, not last. With your idea, I can see a lot of people adding strings thinking autocomplete won't sort it out for them. |
I mean, I attached an actual screenshot from 3.5. Signals display this way and so far no one complained. |
@Mickeon There is an autocompletion options struct, which has a string for what's shown and another string for what's gonna actually be filled. Idk how it's in 3.5 though. My PR dances around those areas of autocompletion, you can check it out. In code_edit.cpp specifically |
Oh that I'm aware. The question was more about, what actually assigns these specifically hardcoded options (e.g. the signals in 3.x, or a list of Nodepaths when inputting "$"). Because that part may be the one needing of some refactoring, to more tidily account for this Proposal's feature. |
Describe the project you are working on
A 2D platformer, recently started using NodePaths and StringNames where I can.
Describe the problem or limitation you are having in your project
Autocomplete tools and similar are not respectful of my wishes.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
After implementing godotengine/godot#66332 I realized we don't actually have any consistent way to tell the editor when we want to use NodePaths or StringNames.
Naturally, both should be editor settings. They would affect autocomplete and dropping properties in editor and cause them to use the NodePath literal
^
and StringName literal&
.Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Simply append the literals at the beginning of the string when the setting is enabled.
If this enhancement will not be used often, can it be worked around with a few lines of script?
Not possible
Is there a reason why this should be core and not an add-on in the asset library?
Dunno, seems too basic to not be in core, given NodePaths and StringNames are so easy to use.
The text was updated successfully, but these errors were encountered: