Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set ltex.dictionary and ltex.disabledRules in magic comments #271

Open
igordertigor opened this issue Sep 6, 2023 · 0 comments
Open

Set ltex.dictionary and ltex.disabledRules in magic comments #271

igordertigor opened this issue Sep 6, 2023 · 0 comments
Labels
1-feature-request ✨ Issue type: Request for a desirable, nice-to-have feature

Comments

@igordertigor
Copy link

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"] and ltex.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).

@igordertigor igordertigor added the 1-feature-request ✨ Issue type: Request for a desirable, nice-to-have feature label Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1-feature-request ✨ Issue type: Request for a desirable, nice-to-have feature
Projects
None yet
Development

No branches or pull requests

1 participant