-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Added ability to filter code complete options by type (function, class, const, signal, etc) #38449
Added ability to filter code complete options by type (function, class, const, signal, etc) #38449
Conversation
250bc9d
to
a9a0ce9
Compare
While this is pretty cool, keep in mind there's a long-term goal to refactor TextEdit to make it easier to maintain: #31739 |
This looks nice, but is there a way to access different tabs with a keyboard? Code completion is a poweruser tool, and switching to a mouse to use this functionality is not desirable. |
@pycbouh Oh yeah! I thought of that but totally forgot before making the PR. |
a9a0ce9
to
47e3d37
Compare
@Calinou Yeah I saw the PR that was made for that earlier today. I would be interested in 'porting' this feature to that implementation if those changes in 31739 are merged first. Especially if it is cleaner to do so. text_edit.cpp is almost 8k lines now! @pycbouh I added shortcuts like in Visual Studio, e.g. Alt + F = functions, Alt + S = signals, Alt + C = constants, etc. Also Alt PgUp/PgDn to cycle right/left through the tabs. |
47e3d37
to
e5c7863
Compare
While the feature looks cool, I don't see much use for it. The autocompletion should just accurately suggest the identifier you are trying to write (see #21726), the amount of options doesn't matter. |
…s, const, signal, etc)
e5c7863
to
794233c
Compare
@KoBeWi The situation where I use this is where I am looking for a function/property/etc on an object, but don't remember it's exact name. So I can use this to quickly find what I need instead of going to the source script/docs. |
This is probably better to be implemented at some point in the future, maybe 4.1, when the api for script/code/text editor is finalised. Closing for now, and would submit as a separate PR in the future if I were still to implement. |
Like the Visual Studio implementation.
You can filter completion options by type. Sometimes you only want to see functions, etc but you get a huge list of everything. Now you can filter just for those! Hurrah!
Also fixed a bug where clicking + dragging (even just for 1 pixel) on the code completion box started selecting text. See below... hard to show clicking and dragging though!