James-Yu / LaTeX-Workshop

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

Allow customisation for the regex to decide if a completion should be triggered. #4268

Closed Guscccc closed 4 months ago

Guscccc commented 4 months 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.

  • Yes, custom commands won't trigger intellisense if the command name doesn't match predefined regex. For example, \let\ci\cite and \ci won't trigger the citation hover.

The Solution*

Please provide a solution you would like to have.

  • Allow customisation of the regex to trigger intellisense.

Anything Else?

Add any other context about the feature request below.

  • Related: James-Yu/LaTeX-Workshop/issues/4200
James-Yu commented 4 months ago

Honestly, I am highly hesitated to expose the internal regexs to the end-user, as I can foresee the flood of issues due to improper definition of them. I would recommend you to adhere to the pattern requiring cite end.