Add shortcut to show autocomplete

Currently, when autocomplete is enabled, it appears while typing. This often ends up being disruptive. For example, I might type,

type int = number

Then I would normally press enter to insert another line. However, autocomplete is opened while typing number, selecting NumberSequenceKeypoint as the first entry. Pressing enter then inserts this value by mistake. While there may be many ways to escape the autocomplete menu, all of them are irritating to use.

My workflow with autocomplete in other editors is to show it only when I press ctrl+space. Unfortunately, the only options in Studio are to either show it while typing, or disable it entirely. I propose to add an action that shows the autocomplete menu, allowing it to be assigned to a shortcut. Turning off the Studio.Enable Autocomplete setting would only prevent the menu from appearing while typing.

6 Likes

This is still not implemented. CTRL + Space is much more usable than CTRL + .
Studio has the settings ā€œEnable Autocompleteā€, and ā€œEnable On-Type Autocompleteā€.
If ā€œEnable On-Type Autocompleteā€ is unchecked but ā€œEnable Autocompleteā€ is still checked, autocomplete gets turned off without CTRL+Space functionality by default.

This functionality should be changed, similarly to Visual Studio, so that it only suggests things when a hotkey (CTRL+SPACE) is pressed.

Ever since the new Luau typechecking and autocomplete improvements, I have had the autocomplete menu popup constantly. Endlessly interrupting my work more than ever. I still want to autocomplete things however, so having it a hotkey is beneficial.

1 Like

This has been implemented, or rather, my issue has been resolved. Along with having ā€œEnable Autocompleteā€ checked and ā€œEnable On-Type Autocompleteā€ unchecked, thereā€™s an Invoke Autocomplete action in the shortcuts panel that you can assign to whatever you want.

If youā€™re looking for a default shortcut to be assigned to this action, I would recommend creating a new feature request.

2 Likes