Open javiertury opened 3 years ago
Autodetect on the command line doesn't seem a usual use case. Do you really need to do it? preferredVariants
is not implemented, but it could be done.
Now, you could check a paragraph, extract the language and then run again with the full language code you want.
I'm not sure what to answer. I use coc-diagnostic for vim which calls languagetool
, which is just a wrapper for languagetool-commandline.jar
.
I wanted the linter to work with three languages, so I added --autoDetect
("args": ["--autoDetect","-"]
). But maybe you are right and I should use another LSP client that works with languagetool-server instead of languagetool-commandline.
For many languages,
languagetool-commandline.jar --autoDetect
provides significantly fewer suggestions. The documentation says thatpreferredVariants
must be somehow specified to solve this problem, but currently there is no way to specify this option from the command line.