Skip to content
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

Add editor settings for autocompletion with NodePath and StringName #66481

Merged
1 commit merged into from
Mar 24, 2024

Conversation

MewPurPur
Copy link
Contributor

@MewPurPur MewPurPur commented Sep 27, 2022

Closes godotengine/godot-proposals#5496

This is built into the autocompletion algorithm – if you're in a function and autocompletion gives a string, it checks whether the editor setting is on. If it is, it adds the literals & or ^ as prefixes, based on if the argument is a NodePath or a StringName. Works in any situation, no adaptation is needed to specific functions.

autocomplete.stonks.mp4

@MewPurPur MewPurPur requested review from a team as code owners September 27, 2022 02:45
@MewPurPur MewPurPur force-pushed the auto-stringname-nodepath branch 2 times, most recently from d09451a to 9a1f33b Compare September 27, 2022 03:36
@Chaosus Chaosus added this to the 4.x milestone Sep 28, 2022
Paulb23
Paulb23 previously requested changes Oct 4, 2022
scene/gui/code_edit.cpp Outdated Show resolved Hide resolved
@MewPurPur MewPurPur requested a review from a team as a code owner October 6, 2022 19:43
@MewPurPur
Copy link
Contributor Author

MewPurPur commented Oct 6, 2022

Messed up the rebase.......

Edit: Ok I think I didn't nuke my PR while trying to fix it. Should be good again?

@MewPurPur MewPurPur force-pushed the auto-stringname-nodepath branch 11 times, most recently from 6d75275 to d2aba36 Compare October 8, 2022 22:18
Copy link
Member

@KoBeWi KoBeWi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok, except 1 description.

@Mickeon
Copy link
Contributor

Mickeon commented Jan 4, 2024

May I poke in?

This PR has been good for a whole year and it's only missing @Paulb23 's approval and a conflict merge.

Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation seems fine. I'm not sure the feature will actually be used by anyone though, as those literals don't seem to make much difference to performance. But it makes sense a priori.

@Mickeon
Copy link
Contributor

Mickeon commented Jan 4, 2024

This feature was suggested by Calinou in another PR, hence my poking.

@Mickeon
Copy link
Contributor

Mickeon commented Feb 29, 2024

I'd like to ping @Paulb23 one more time for good measure to make sure there are no issues with the PR as is (minus the fact that it needs to be rebased again)

scene/gui/code_edit.cpp Outdated Show resolved Hide resolved
@akien-mga akien-mga dismissed Paulb23’s stale review March 1, 2024 14:26

Changes made to address that review.

@akien-mga akien-mga modified the milestones: 4.x, 4.3 Mar 1, 2024
@Paulb23
Copy link
Member

Paulb23 commented Mar 10, 2024

If this feature is desired, apart from a rebase, updated changes look okay to me.

akien-mga added a commit that referenced this pull request Mar 24, 2024
Add editor settings for autocompletion with NodePath and StringName
@akien-mga akien-mga closed this pull request by merging all changes into godotengine:master in 06abc86 Mar 24, 2024
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Editor Settings for autocomplete with StringNames and NodePaths
7 participants