James-Yu / LaTeX-Workshop

Boost LaTeX typesetting efficiency with preview, compile, autocomplete, colorize, and more.
MIT License
10.55k stars 522 forks source link

Command suggestions do not include some commands, like \gls{} #4327

Closed Miguel-LlamasLanza closed 1 month ago

Miguel-LlamasLanza commented 1 month ago

Please fill the following fields with a star (*) and provide as much related information as possible.

Pre-checks*

Please change the following [ ] to [x] for confirmation.

  • [x] The feature request has not been suggested in this repository.

The Missed*

Is your feature request related to a problem? Please provide a clear and concise description of what the problem is.

  • when starting to write a command, such as \gls{} or \citep{}, I get suggestions for other commands but not those, even if I write the command completely. See the short video attached exemplifying this.

The Solution*

Please provide a solution you would like to have.

  • I would like to have suggesions and autocomplete of these commands as for others.

Anything Else?

Add any other context about the feature request below. Screencast from 31-07-2024 16:02:12.webm

James-Yu commented 1 month ago
image

You need to compile first.

Miguel-LlamasLanza commented 1 month ago

I have compiled it first and it does not work. Actually the issue seems to be related to the fact that I use a preamble.sty file which loads all the modules. See e.g. This website.

Because of this, the suggestions are not provided in the main.tex or other tex files

Miguel-LlamasLanza commented 1 month ago

So basically the request should be to include suggestions when the packages are loaded from a preamble file

James-Yu commented 1 month ago

It's not a preamble tex file: the tutorial you provide is creating a new package. You can use almost the same content in the .sty file but change the file extension to .tex, then \input it.

James-Yu commented 1 month ago

Another option is, you can force load package suggestions in intellisense.package.extra config.

Miguel-LlamasLanza commented 1 month ago

Thanks. That works :)