vscode-languagetool-linter
vscode-languagetool-linter copied to clipboard
Latex Support
Is your feature request related to a problem? Please describe.
I have installed this extension because it was exactly that I was looking for! Support to use languagetool in VSCode using a server that I run.
Most of the other similar extensions fail to let you use your own languagetool server, and force to use the public one or the extension itself bundles one that it starts. Since I like to customize some parameters (like adding ngram data), this feature is a must for me.
Unfortunately this extension does not support my main use-case, Latex language! Latex support would be greatly appreciated.
Describe the solution you'd like
Maybe in a initial version simply transform \<command>{<text>} -> text and handling everything as plaintext is good enough?
Thank you for considering if this feature is worth pursuing.
Glad you like the external feature! It was something I also needed as I customize as well. I will explore adding latex as a supported language. I'll need to do some research on a good parser and probably write another JS module to handle converting to annotated text for LT, so I have no idea how long it'll take. But, I will keep you posted.
For my reference - possible parser: https://github.com/tamuratak/latex-utensils
@eSoares - would you be able to provide a basic LaTeX document for me to use as a test? I'm not a LaTeX user, otherwise I'd write one myself.
Sure @davidlday , where is a example that I think captures some of the nuances of latex files: https://gist.github.com/eSoares/48f3d95ef6028b0adb125a25d91f7489
Fell free to ask questions.
Perfect - thank you!
@davidlday Do you have already some code for latex support? Otherwise i will look if i find some time in the next weeks to look into it.
@davidlday Do you have already some code for latex support? Otherwise i will look if i find some time in the next weeks to look into it.
@Spiderschwein - I started experimenting with latex-utensils but haven't made any significant progress. I also started drafting a doc on Language ID Support, but also didn't make too much progress.
Help would be greatly appreciated. I'm usually pretty good about responding to questions if you have any. Thank you!
Chiming in to also express support for LaTeX... support.
I maintain a template/cookbook which you might be interested in using for examples. @eSoares ' example is very good and close to what a real-world document would also look like. The template's repository also contains "real-world" source code, see for example this chapter.
Now, the problem with LaTeX is its macro expansions. That's a very core language feature and unavoidable. The trouble with macros is that they can be kind of anything...
\newcommand{\test}{Hello}
\test{} World!
is straight-forward to human readers but already quite challenging I can imagine. But it can get impossibly complex. Some expansions cannot be known until runtime.
Unluckily, as of right now Latex is the main thing I would write prose (as opposed to code) in. The occasional Markdown README doesn't warrant LT.
So let it be known this feature would be appreciated, but probably challenging! Maybe it could work on a "best-effort" basis. I'd be fine with some breakage and false-positives/negatives and the like if it worked for most of it.