Open hchmr opened 2 years ago
I agree. On top of that, replacing some environments and commands with "Dummy" or "Jimmy" is insufficient or can raise other problems related to genre (Jimmy is masculine), number (see PR https://github.com/valentjn/ltex-ls/pull/178), or just unknown words in some languages (example: commit https://github.com/valentjn/ltex-ls/commit/06b36051d28fd2c6ca832cd11880d1be1723c5c4 or issue https://github.com/valentjn/ltex-ls/issues/167).
Making dummy words (Dummy and Jimmy) configurable is a very simple, scalable, and durable solution. Let the user choose which word to use for which replacement. Then, language-specific placeholders could be added or configured by users.
Is your feature request related to a problem? Please describe. TeX has weird hyphenation rules that prevents it from breaking hyphenated compound words such as 'high-performance'. The
hyphenat
package is used to trick TeX into hyphenating the constituent words in a hyphenated compound word. In my LaTeX document, I can writehigh\hyp{}performance
and TeX will be able to hyphenate 'per·for·mance'. But because LTeX's parser replaces\hyp{}
by an empty string I get the following diagnostic in my document:In LTeX's settings,
ltex.latex.commands
can be used to change how the LaTeX parser should treat commands in the prose, but it is not expressive enough to give a rule for replacing\hyp{}
with '-'.Describe the solution you'd like Extend parser configuration to support arbitrary replacements, including replacing
\hyp{}
with '-'.Describe alternatives you've considered I tried adding the rule
"\\hyp{}": "dummy"
, but that prevents LanguageTool from checking the spelling of the individual words.