valentjn / ltex-ls

LTeX Language Server: LSP language server for LanguageTool :mag::heavy_check_mark: with support for LaTeX :mortar_board:, Markdown :pencil:, and others
https://valentjn.github.io/ltex
Mozilla Public License 2.0
717 stars 33 forks source link

Specify LTeX commands through inline comments #284

Open thomwiggers opened 7 months ago

thomwiggers commented 7 months ago

Is your feature request related to a problem? Please describe.

Editing the LTeX settings for a project is a bit cumbersome when specifying many new document commands. It would be nice if I could use the % LTeX: macro to add new command recognitions.

Describe the solution you'd like

This might not be the best syntax, but something along the lines of:

% LTeX: command \SomeCommand{}=ignore
% LTeX: command \SomeOtherCommand{}=dummy

In an ideal world, LTeX would understand \newcommand and \NewDocumentCommand such that it can do:

% LTeX: command=ignore
\NewDocumentCommand{\somefoo}{m}{bar #1}