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

Use @Spell and @NoSpell clusters #3

Open
Karmaki opened this issue Jan 18, 2017 · 5 comments
Open

Use @Spell and @NoSpell clusters #3

Karmaki opened this issue Jan 18, 2017 · 5 comments

Comments

@Karmaki
Copy link

Karmaki commented Jan 18, 2017

This tool is really great, but it could even be better if it could use the @Spell and @NoSpell clusters defined in some syntax files (same thing for vim-LanguageTool that is great too, but has the same default).

@dpelle
Copy link
Owner

dpelle commented Jan 18, 2017

I'm not sure where and why you would want to use @spell and @Nospell. The vim-Grammalecte plugin does not use vim spelling checker. All highlighting (grammar errors and spelling errors) come from Grammalecte (or from LanguageTool for vim-LanguageTool plugin). Please elaborate if I missed a valid use of @spell and @Nospell.

For French, using the spelling checker of Grammalecte of LanguageTool is an improvement over the spelling checker of Vim, as French vim spelling checker is stuck with a very old version, based on aspell. Vim French spelling checker cannot be easily upgraded to a more recent French dictionary because Vim does not understand latest Hunspell features used by the http://dicollecte.org French dictionary. Spell checking with the plugins vim-Grammalecte (or vim-LanguageTool) does not have this problem.

@Karmaki
Copy link
Author

Karmaki commented Jan 18, 2017

First, thanks for your very quick answer.

I would be interested by this feature because I write a lot of markdown with blocks of code inside. The spell checker is able to skip the code (@Nospell cluster), but I am getting a lot of errors about the punctuation in the code parts with the grammar checkers.

At the moment, I don't code a lot, but the contrary would occur on source files where the spell checker only works on the comments (@spell cluster), but not on the code itself.

But I understand that I might be difficult to do...

@dpelle
Copy link
Owner

dpelle commented Jan 18, 2017

I write a lot of markdown with blocks of code inside.

Oh I now see. Yes, checking only text with @spell would be very useful. Well, @spell may not be enough. Consider this:

  /*
   * A comment with
   * with an error on multiple lines (repeated word "with").
   */

The problem is that even if we feed the grammar checker with comments only (which have @spell), it will see a string with a star in the middle and that will prevent the grammar checker from analyzing properly i.e. it will not find the duplicated word in "with * with".

Despite this limitation, checking text with @spell (as an option), would be better than nothing. I'll see how it can be done.

@Karmaki
Copy link
Author

Karmaki commented Jan 18, 2017

At the moment, ignoring the text with @Nospell would be even more useful for me, and maybe easier to do...

@mokas01
Copy link

mokas01 commented Jun 14, 2018

Quick (although late) follow-up question : i use your plugin to check a 300 pages document in latex… all tex code (generally in the form \command[argument]{argument}) is in English and considered as incorrect. i have hundreds of false positives, which could be removed if i could have a nospell or any other way to exclude them

Thanks for the help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants