dustinblackman / languagetool-code-comments

languagetool-code-comments integrates the LanguageTool API to parse, spell check, and correct the grammar of your code comments!
MIT License
31 stars 4 forks source link

Consider supporting `efm-langserver` as alternative to archived null-ls #5

Open ModProg opened 8 months ago

ModProg commented 8 months ago

This would be cross-editor compatible and even be a preliminary solution for #1 with https://marketplace.visualstudio.com/items?itemName=Matts966.efm-langserver-vscode.

null-ls appears to be discontinued

ModProg commented 8 months ago

This "support" would be similar to null-ls by just providing a config file.

ModProg commented 8 months ago
languages:
  rust:
    - lint-formats: ["%l,%c,%e,%k,%m"]
      lint-stdin: false
      lint-severity: 2
      lint-ignore-exit-code: true
      lint-command: |
        languagetool-code-comments check -f ${INPUT} -l en-US | jq -r '.[] | [.moreContext.line_number, .moreContext.line_offset + 1, .moreContext.line_number, .moreContext.line_offset + .context.length + 1, "\(.message) Try: \(.replacements | map(.value) | join(", "))"] | join(",")"'

This is diagnostics working, I might look at code actions as well at some point.

dustinblackman commented 8 months ago

Amazing! Great work!

I may try to chip in if I can allocate time, otherwise I'll gladly accept a PR. Thanks!