mhayashi1120/Emacs-langtool

Implement langtool-check for development language comments

rememberYou opened this issue · 2 comments

Recently, I've been using your package and one of the things that caught my attention. Currently this package is great if you want to check the grammar of a text. However, it can also be useful to check the grammar of any comment in any development language.

I was surprised to see that there is not yet a function that would allow langtool-check to run only in code comments. In fact, such a function would avoid adding various rules in langtool-disabled-rules in order to avoid errors related to the syntax of the programming language. In addition, these disabled rules are a disadvantage because you would like to activate them in most cases.

My idea is this: what do you think about implementing a function like flyspell-prog-mode that would enable langtool only in comments when langtool-check runs in a mode other than markdown-mode, org-mode, text-mode?

Thank you for your work.

Check my pull request at #43

It supports any major mode (e.g., org-mode, prog-mode).

Thank you for your pull request, this going to make my life easier ☺️

I hope that the merge won't take too much time to do.