emacs-languagetool / flymake-languagetool

Flymake support for LanguageTool
GNU General Public License v3.0
33 stars 11 forks source link

Option to ignore the error instead of correcting it #11

Closed andreyorst closed 1 year ago

andreyorst commented 2 years ago

In other implementations of language-tool packages for Emacs, it is possible to clear the highlighting, or dismiss the error entirely. For instance, this package has a menu entry for that:

image

Pressing C-i on the error will make langtool ignore it for the end of the session.

This package also has a similar feature, but assigns it to the i key in the menu.

With flymake-languagetool's flymake-languagetool-correct-at-point interface using completing read it is impossible to ignore some false positives that occur often in markup-based buffers, like Org mode.

E.g. here:

image

I can't make a correction and I can silence this particular case, which makes it harder to keep track of whether there are new errors

tpeacock19 commented 2 years ago

This is a good idea. Currently, you can add rules to flymake-languagetool-disabled-rules. But this would require users know the rules beforehand and also apply to the entire buffer. In this specific instance you would need to add DOUBLE_PUNCTUATION.

I'll look into adding options to ignore the specific error at point and/or ignoring the rule for the entire buffer. It will take me a bit to get to it, but when I do it'd be great to get feedback.

tpeacock19 commented 1 year ago

I've added an option to ignore a Rule or Category. It can only be temporary/buffer-local but I think it should work. Let me know if this works for you.

tpeacock19 commented 1 year ago

Closing this but still interested in your feedback if you have any.