LaTeX-Workshop icon indicating copy to clipboard operation
LaTeX-Workshop copied to clipboard

Completion for options of minted package

Open phdoerfler opened this issue 4 years ago • 3 comments

I have used this extension quite a lot in the past months and I'd like to give back a little! I'm still pretty new to VS Code extension development, so maybe I'm misjudging the scope of my idea. Please let me know your thoughts!

What I have in mind is completion support for the options of the minted package. I figured this might be an easy thing to contribute. I.e.,

\inputminted[firstli<ctrl+space>

would then offer to complete firstli to firstline= and do the same thing for the other macro options in the minted package.

Thanks for this wonderful extension and again, hit me with your feedback, please!

phdoerfler avatar May 18 '20 13:05 phdoerfler

Hmm, easier said than done unfortunately. There is currently no way to define a list of possible completion values for a command (optional) argument. That would be awsome!

jlelong avatar May 19 '20 08:05 jlelong

A list of options is available cwl files in the TexStudio repository.

  • https://github.com/texstudio-org/texstudio/blob/master/completion/minted.cwl

Notice that the license of TexStudio is GPL 3.0.

tamuratak avatar May 19 '20 09:05 tamuratak

Unfortunately, GPL 3.0 stuff cannot be included in a project with MIT licence. Yet, there is no licence on https://github.com/LaTeXing/LaTeX-cwl where the .cwl files we use come from and the commit message states they have been generated by the TexStudio project...

Anyway to go back to the original issue, my point was not to get the list of available values but rather to integrate this new mechanism inside LW. I have to think about it.

jlelong avatar May 19 '20 12:05 jlelong

Here we go with #3579. Finally returned to here.

Screenshot 2022-12-16 at 15 52 03

James-Yu avatar Dec 16 '22 07:12 James-Yu