Lint CLI for languagetool.
$ go install github.com/skanehira/languagetool-lint@latest
- Run your
languagetool server
in local.
NOTE: You can use docker-languagetool to runlanguagetool server
.$ docker run -d -p 8010:8010 erikvl87/languagetool
- Execute
languagetool-lint
like bellow.$ cat your_text_file When you type |:write|, then it would be executed in terminal, and you can choose any options(e.g add labels). $ languagetool-lint -a http://localhost:8081 -l "en-US" your_text_file your_text_file:2:27: The abbreviation “e.g.” (= for example) requires two periods.
- You can also use from stdin.
$ echo "this is a pen." | languagetool-lint stdin:1:0: This sentence does not start with an uppercase letter.
- Install efm-langserver
- Add config as bellow.
version: 2 tools: languagetool-lint: &languagetool-lint lint-command: 'languagetool-lint' lint-ignore-exit-code: true lint-stdin: true lint-formats: - '%f:%l:%c: %m' languages: markdown: - <<: *languagetool-lint
- Add your Language Client settings.
e.g. coc.nvimcall coc#config('languageserver', { \ 'efm': { \ 'command': 'efm-langserver', \ 'args': [], \ 'trace.server': 'verbose', \ 'filetypes': ['markdown'] \ } \})
skanehira