GitHub Repo stars
GitHub
GitHub go.mod Go version
GitHub all releases
GitHub CI Status
GitHub Release Status

languagetool-lint

Lint tool for languagetool.

Requirements

languagetool.

Installation

$ go install github.com/skanehira/[email protected]

Use as a lint tool

  1. Run your languagetool server in local.
    NOTE: You can also use docker-languagetool to run languagetool server.
  2. Execute languagetool-lint like bellow.

    $ 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.

Use as a LSP Server

  1. Install efm-langserver
  2. 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
  3. Add your LSP client settings.
    e.g. coc.nvim

    call coc#config('languageserver', {
          \ 'efm': {
            \ 'command': 'efm-langserver',
            \ 'args': [],
            \ 'trace.server': 'verbose',
            \ 'filetypes': ['markdown']
            \ }
          \})
    

Author

skanehira

Thanks

GitHub

View Github