valentjn / ltex-ls

LTeX Language Server: LSP language server for LanguageTool :mag::heavy_check_mark: with support for LaTeX :mortar_board:, Markdown :pencil:, and others
https://valentjn.github.io/ltex
Mozilla Public License 2.0
788 stars 38 forks source link

Ignore commented lines for `gitcommit` filetype #141

Closed mjlbach closed 1 year ago

mjlbach commented 2 years ago

Is your feature request related to a problem? Please describe.

I love ltex-ls, especially when writing git commit messages as it picks up on grammatical mistakes when spell checking that simple spellchecking would miss.

Right now, it appears the server sends diagnostics for the commented lines pre-populated in the commit messages template: image

Describe the solution you'd like Ignore the commented lines (or silence diagnostics for them).

Describe alternatives you've considered This could hypothetically be implemented client side as well, but I thought I would raise the issue :

valentjn commented 1 year ago

This was already fixed on develop in 1193c9959a.

github-actions[bot] commented 1 year ago

This issue is now fixed on develop. The fix will be included in the next release of LTEX.

If you don't want to wait, you can try out the nightly pre-release tomorrow. Nightly pre-releases are published every morning at around 4am UTC.

OopsYao commented 1 year ago

Hi, it seem like that the diff output in gitcommit file does not get ignored. ok

According to the doc of git,

this diff output doesn’t have its lines prefixed with #.

And normally the diff output goes after the line (not documented):

# ------------------------ >8 ------------------------

It would be nice if this can be solved.