-
Notifications
You must be signed in to change notification settings - Fork 6
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
Command tab completion #11
Comments
I'll take a crack at this. Fair warning- I think I will end up rewriting a large amount of the command processing if I get into this... |
Yeah, Offz and I talked about this probably requiring a rewrite of the command processor to a more standard OO pattern so go for it 👍 |
Yeah you could try but I have a specific idea in mind for the big rewrite, I'll outline it here at least: Basically in the DSL run things on an abstract Then we have two implementations of The structure analyzer gets instantiated, and has its own implementations for subcommands, arguments, etc.. which allow it to run through the entire structure and save them for later retrieval for tab completion. The Some extra info on why I like evaluating from scratch when executing commandsWe get a nice linear way of thinking about how the command runs. For instance, if a command fails, we stop its execution right there, or whatever arguments are within your scope will be required to pass. In general, I found that running through the command from scratch when we execute it makes things much simpler to think about in the backend. Plus, I don't think it's possible to implement arguments the way we do right now since the |
Seeing as you have a lot of thought into this, I'm going to take a step back. |
Closing to write an updated issue now that PaperMC is introducing a new Command API |
Somehow scan the entire command tree on startup to learn about the arguments being used. This is mainly useful for autocomplete.
We may need some files to provide descriptions for different languages, so it might be okay to force people to define tab completion information there, but this seems way more annoying for the end user.
The text was updated successfully, but these errors were encountered: