-
Notifications
You must be signed in to change notification settings - Fork 536
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
Intellisense completions of LaTeX3-style interfaces provided by LaTeX2e #4478
Comments
@muzimuzhi I opened texstudio-org/texstudio#3896. If that is added then I can make the cwl with arguments. |
Resolved in #4476? Correct me if I'm wrong. |
@James-Yu Nope. #4476 updates the completions for For instance |
I see. There is no plan to parse dtx files of latex2e packages for macro definitions. We will stick to the cwl solution. |
See texstudio-org/texstudio#3915 and texstudio-org/texstudio#3916. I added argument specs for expl3 commands and the expl3 LaTeX interfaces. |
Pre-checks*
The Missed*
In LaTeX2e, recently added modules are written in LaTeX3/expl3, which then may provide both traditional LaTeX2e-style user interfaces and the LaTeX3-style ones. For example, the hook management module provides both
(see docs
texdoc lthooks-doc
andtexdoc lthooks-code
).Currently only the LaTeX2e-style interfaces have Intellisense completions, but not the LaTeX3-style ones.
The Solution*
I've tried something in
muzimuzhi/James-Yu:feat/latex2e-expl3-entries
, by extendingdev/latex3command.py
andparse-cwl.ts
:But I know nothing about how the
data/package/*.json
are bundled in the extension and when the completions entries in them are enabled.Anything Else?
In general, not only the LaTeX kernel, but also any packages and classes may provide public and documented LaTeX3 functions and variables. For instance,
fontspec
package provides\fontspec_font_if_exist:nTF
and several more, see sec. VIII.5 "Programming interface" in its doc.It needs to be decided whether to record LaTeX3 entries in the same
<package>.json
along with the existing LaTeX2e ones and only show them in completion list when in LaTeX3 coding style, or to record them in separate files, for example<package>.expl3.json
(less likely to encounter naming clashes) or<package>-expl3.json
.Ideally auto-completion for LaTeX3-style functions should provide corresponding argument descriptions too, but currently that's missing from TeXstudio cwl files. Maybe there was a feature request for that in TeXstudio, but I cannot find it for now.
Cc @mbertucci47
The text was updated successfully, but these errors were encountered: