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

Make the script editor completion use better sorting/searching #1216

Closed
chucklepie opened this issue Jul 18, 2020 · 8 comments
Closed

Make the script editor completion use better sorting/searching #1216

chucklepie opened this issue Jul 18, 2020 · 8 comments

Comments

@chucklepie
Copy link

chucklepie commented Jul 18, 2020

Describe the feature / enhancement and how it helps to overcome the problem or limitation:
When using the '.' to expand the current object in the IDE it would be nice to be able to have the items sorted either alphabetically or using some kind of semi-intelligent ordering, instead of the current order which seems to list every single global first then everything else afterewards alphabetically. In addition, using the list to find items by typing is limited.

When you know what you want, you do not need the dropdown, so being confronted by an arbitrary sort containing first 3 pages of globals is pretty much pointless to anyone who actually needs the dropdown, as seen in the picture below.

I would suggest the following:

  1. The simplest approach is simply alphabetical, this is at least navigable.
  2. VSCode employs a much better (for some languages) approach in that it first lists all the current object's methods then everything else, alphabetical. Imagine on a Timer pressing '.' and getting all the actual timer methods/properties first :)

In addition, typing only works for the first letter. What if you don't know if it is 'is_deferred' or 'deferred'? in Visual Studio you can type a word and it finds everything with that word

Current system showing page after page of globals
image

This is how the VSCode plugin for GDScript works, it colour codes and sorts alphabetically.

image

In javascript it adds to this and finds inferred methods, etc. and creates a priority then alphabetical sort.

@Calinou Calinou changed the title Allow '.' dropdown to be sorted alphabetically Make the script editor completion dropdown use alphabetical sorting Jul 18, 2020
@chucklepie chucklepie changed the title Make the script editor completion dropdown use alphabetical sorting Make the script editor completion dropdown use better sorting Jul 19, 2020
@chucklepie chucklepie changed the title Make the script editor completion dropdown use better sorting Make the script editor completion use better sorting/searching Jul 19, 2020
@me2beats
Copy link

me2beats commented Jul 19, 2020

I actually dream of being able to access some autocompletion API
(get, filter, sort results etc)
then I could create my own sorting methods, which would be quite flexible.

For example, I would like to try sorting items by frequency of use.
Or hide some results, etc.

@me2beats
Copy link

or maybe even an ability to use custom autocompletion popup instead of default one.

recently I tried to get autocompletion popup from gdsript editor plugin — and it seems there is no way to do this.

@chucklepie
Copy link
Author

Yes, that's how Visual Studio does it, but I didn't want to go too far ;-)

I just think the default of having 3 pages of Global properties is silly in my humble opinion (as an average user who needs the dropdown to find things), and anything would be better even plain alphabetical.

@EricEzaM
Copy link

EricEzaM commented Aug 8, 2020

I made this... Unlikely it will get merged though. It will need to be remade after updates are done to the editor for 4.0.

godotengine/godot#38449 (comment)

@chucklepie
Copy link
Author

chucklepie commented Aug 8, 2020 via email

@AaronRecord
Copy link

Duplicate of #99?

@chucklepie
Copy link
Author

chucklepie commented Apr 8, 2021 via email

@YuriSizov
Copy link
Contributor

Duplicate of #99?

Thank you, indeed they are too close to keep both. Closing in favor of #99.

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

No branches or pull requests

6 participants