-
Notifications
You must be signed in to change notification settings - Fork 407
[Feature request] grammar analysis using textidote #1311
Description
So, this feature request may appear as premature, but I am posting it in case this could help motivate people to contribute on this. Textidote is a program that interfaces with language tool and preparses (removes) LaTex macros before passing the resulting text to LanguageTool. The final result displays in consistently regarding the initial LaTeX code and appears to be the most viable option (to this day and to the best of my knowledge) to get LaTeX grammar checks.
I have opened an issue on textidote's repository for a feature request that would enable output into parsable format. Once that would be implemented, Vimtex could follow by implementing grammar checks display into the quickfix (or location) window for example.
The only issue I see with implementing the plugin as part of Vimtex is that textidote also supports Markdown. Therefore, the grammar check error displaying plugin may have more sense as standalone. However, I don't think that textidote project will lead to support more languages other than that, so maybe it can still be considered as a LaTex only plugin check anyway if you will.
That being said, a LanguageTool Vim plugin already exists and does a good job of what I'd like to see in Vimtex. However, this plugin interfaces with LanguageTool directly and not with textidote, therefore it cannot support LaTeX.
Consequently, as I see it, the best course of action would be to extract relevant code from the LanguageTool plugin which should be written as a standalone grammar error display plugin (decoupled from LanguageTool or any language checker). Then, make VimTex use that code so that it interfaces with textidote's output.
Finally, I think that this can be reasonably easy to implement, considering the amount of code already existing and doing more or less what we want. That being said, I have not checked how the Vim plugin for LanguageTool works, so maybe the request for textidote to implement a parsable output is not needed at all. I'll have to dig into the plugin.
I'm eager to know what Vimtex's user think about that. I hope this idea appeals to many.