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 autocompletions for functions and variables #28

Merged
merged 2 commits into from
Jul 22, 2024
Merged

Conversation

doonv
Copy link
Owner

@doonv doonv commented May 25, 2024

Objective

Fixes #26

Solution

There's a new command (UpdateAutoComplete) that the UI calls when the command is changed or when the cursor moves (currently does it every frame). Then the UpdateAutoComplete command calls CommandParser::completion which then makes the current command parser return a list of CompletionSuggestions, which is then displayed to user.


Changelog

  • Added autocompletions
    • The CommandParser trait has a new optional method: completion, every time the UI calls this method every time the command changes or the cursor changes.
    • The Builtin-parser now implements the new optional CommandParser method.
    • Added CompletionSuggestion, which represents a completion suggestion.
    • ...other stuff i probably forgot about

@doonv doonv added C-Enhancement New feature or request A-UI This is related to the User Interface A-Builtin-Parser This is related to the Built-in Parser labels May 25, 2024
@doonv doonv marked this pull request as ready for review July 2, 2024 13:40
@doonv doonv merged commit ee54960 into master Jul 22, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Builtin-Parser This is related to the Built-in Parser A-UI This is related to the User Interface C-Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auto-complete for registered functions
1 participant