I have installed both LaTeXTools and LaTeX-cwl. I would like to add a couple of commands to auto completion, such as \textcite{}
and \parencite{}
. What is the best way to do this?
LaTeX - Add commands to autocompletion
The best way is to reference required package via \usepackage{biblatex}
in your document.
@deathaxe, thank you for letting me know! I was not aware that autocompletion would be able to get commands from loaded packages. I use \usepackage{biblatex-chicago}
, an alternative to usepackage{biblatex}
that follows the Chicago Manual of Style. I cannot load both packages, otherwise I get several errors, which makes sense. Unfortunately, \usepackage{biblatex-chicago}
does not add the \textcite{}
and \parencite{}
commands to autocompletion.
On the LaTeXTools manual, it seems I could create a cwl file and put it in my Packages/User/cwl
folder, but I am not sure what the syntax would be.
LaTeXTools analyses which packages are imported and tries to load corresponding *.cwl files to provide completions.
A description of that file format can be found in TeXStudio manual.
Ideally, you’d be able to re-use those shipped with TeXStudio. Writing your own should probably be the last option.
see: https://github.com/texstudio-org/texstudio/tree/master/completion