Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
When a user is typing, sometimes it is useful to arrange the autocomplete results so the ones they are most likely to use are displayed first. For example, here we would like findNearestEnemey to display before findNearestItem, as it is the more common use case.
To change it’s position, we can add an Autocomplete Priority in the Components editor. Find the component that provides the function you wish to change and tab to its settings. Using the add attributes button you can add the property.
The default autocomplete priority is 1. This value acts as a multiplier, normally a value of 1.2 is enough to boost a method enough relative to closely matching peers.
Automatic Variable Capture
Automatic variable capture can be enabled for functions. When this function is autocompleted as the first expression on a line, an assignment to the named variable is inserted in front of it.
This feature is best enabled for functions with no side effects, where calling it without using its value makes no sense.