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 intellisense for macros defined by \NewDocumentCommand #4126

Merged
merged 3 commits into from
Jan 5, 2024

Conversation

jlelong
Copy link
Collaborator

@jlelong jlelong commented Jan 5, 2024

This PR closes #3995 and adds (partial) intellisense support for macros defined by \ReNewDocumentCommand, \NewDocumentCommand, \ProvideDocumentCommand, \DeclareDocumentCommand from the xparse package.

These commands expect three arguments: {macro_name}, {args_list), {definition}. The argument list allows to define argument that have their own delimiters such as (...), <...>, or the same token used for opening and closing as in the \verb command. This is not supported for now as our CmdSignature interface only handles compulsory arguments {} or optional ones []. The current implementation only supports the following types in the argument list

  • m: a mandatory argument
  • o or O: an optional argument

Anything else is simply ignored.

@jlelong jlelong requested a review from James-Yu January 5, 2024 11:01
@jlelong jlelong merged commit d60203c into James-Yu:master Jan 5, 2024
7 checks passed
@jlelong jlelong deleted the jl_3995_NewDocumentCommand branch January 5, 2024 12:31
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Autocompletion of custom commands
2 participants