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

Magic comments to specify blocks of text that LTeX can ignore? #67

Closed
ayala-io opened this issue Jun 27, 2020 · 5 comments
Closed

Magic comments to specify blocks of text that LTeX can ignore? #67

ayala-io opened this issue Jun 27, 2020 · 5 comments
Assignees
Labels
1-feature-request ✨ Issue type: Request for a desirable, nice-to-have feature 3-fixed Issue resolution: Issue has been fixed on the develop branch
Milestone

Comments

@ayala-io
Copy link

Is your feature request related to a problem? Please describe.
Love LTeX, but for large documents with large sections of code-like/computer-generated listings, LTeX goes crazy and flags many spelling/grammar problems. For me, going through the problems list and clicking "Ignore" for every single one is time consuming, or somewhat slow (i.e. after choosing to ignore one specific problem LTeX detected, it took a few seconds to register before the problem is removed from the list... now try to repeat that for 200+ problems).

Describe the solution you'd like
I noticed LTeX supports Magic comments. How about a way to specify via Magic Comments like "LTeX Ignore Start" and "LTeX Ignore end" between blocks of text where we want LTeX to completely ignore spelling/grammar checking. This solution would be sufficient for me. Others might want additional options to ignore certain rules for a particular block of text.

Describe alternatives you've considered
Going through the problem list and clicking ignore one-by-one. It takes way too much time, I often just don't bother with it anymore but it would good to see a clean file.

Additional context
None.

@ayala-io ayala-io added the 1-feature-request ✨ Issue type: Request for a desirable, nice-to-have feature label Jun 27, 2020
@valentjn valentjn self-assigned this Jun 27, 2020
@valentjn valentjn added this to the 6.0.0 milestone Jun 27, 2020
@valentjn
Copy link
Owner

Fixed. Out of curiosity, why couldn't you use ltex.environments.ignore (LATEX) or ltex.markdown.ignore (Markdown)? That would be the preferred way.

@valentjn valentjn added the 3-fixed Issue resolution: Issue has been fixed on the develop branch label Jun 27, 2020
@ayala-io
Copy link
Author

Thank you for your consideration.

Actually, I just didn't know about ltex.environments.ignore. This is a good temporary solution but even then I still would like LTeX to check some text and ignore other text that use the same environment. Having a blanket ignore environment rule wouldn't work in this case. Also my suggestion would be helpful in ignoring text in the preamble (unless there's an environment associated with that too?)

valentjn added a commit that referenced this issue Jun 28, 2020
@valentjn
Copy link
Owner

Ah, I see. It's definitely a good feature suggestion, thank you.

For most false positives in the preamble, ltex.commands.ignore can be used. A lot of common preamble commands are already ignored by default, so if you come across a command that you think is widely used but not ignored by default, feel free to suggest adding it to the default list.

@ayala-io
Copy link
Author

Thank you again for all of your efforts and for working on this feature. Will take a look at ltex.commands.ignore for the preamble commands and will make suggestions accordingly.

@valentjn
Copy link
Owner

Fix released in 6.0.0.

me-johnomar added a commit to me-johnomar/ltex-ls that referenced this issue Jan 31, 2024
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 3-fixed Issue resolution: Issue has been fixed on the develop branch
Projects
None yet
Development

No branches or pull requests

2 participants