Set ltex.dictionary
and ltex.disabledRules
in magic comments
#271
Labels
1-feature-request ✨
Issue type: Request for a desirable, nice-to-have feature
I occasionally use files in which I have tables or uncommon acronyms. In these files, ltex complains: For tables, it warns me about having too many spaces, for acronyms, it believes that I have a spelling mistake.
I could address both of these issues by globally setting
ltex.disabledRules = ["WHITESPACE_RULE"]
andltex.dictionary = {"en-US": ["ACNY"]}
. However, that would mean that multiple whitespaces will never be detected, which I want to avoid. Similarly, it would mean that my acronym is always accepted, although it would likely be a spelling mistake in almost all other contexts. As a result, I keep getting tons of error messages from ltex that I try to ignore and as a result I occasionally ignore something that I shouldn't have ignored.For me it seems that the most straight forward solution here would be to allow more (all?) options to be set in magic comments. This would allow inserting a comment to disable the whitespace rule right before a table and revert to the old behaviour right after. It would also allow setting acronyms that only make sense in some documents but not in others.
For the whitespace behaviour, I could also see that attempting to detect tables and accepting whitespace in tables automatically would be an option, but that doesn't solve the other use case (or for example a case where one has item lists with non-sentence bullet points that should start lowercase).
The text was updated successfully, but these errors were encountered: