feat: more languages supported
I'd like to expand the number of languages supported for comment checking. There are a number of additional considerations for structured comments (like JavaDoc), but some should be pretty straightforward.
Running list:
- Bash
- YAML
- HTML
- Java
- Groovy
- Git commit buffers (filetype
gitcommit) - PowerShell
In addition to adding language parsers to the tree-sitter code, we would also need to open pull requests for nvim-lspconfig, mason and fix harper-ls to announce support for the capability.
Feel free to add suggestions to this list.
Alright. At the time of writing, we've got JavaDoc, HTML, and Bash supported, as well as gitcommit buffers.
If you could add php to the list as well, it would be great
Adding dart would be great as well.
Hey, markdown support seems pretty advanced. :+1: But are there plans to also support other markup languages, such as djot, with the same level of functionality? Or will only markdown be seen as a first-class citizen in the near future?
Either way, I am thrilled about the project and being able to use a solid spell-checker LSP :partying_face: :
PS: Are you planning on adding a sponsoring option?
Coming back to this issue after a solid period of stagnation, to give an update.
#332 has added Haskell support, #354 is adding Vimscript, and #353 is adding cmake support. These will all be considered "rough" until someone has the time to go in and touch them up (which is a good first issue to tackle, if anyone is interested).
I plan on adding PHP and potentially PowerShell later today.
But are there plans to also support other markup languages, such as djot, with the same level of functionality?
We've got an open PR for Typst support: #302. I do not personally have time in the near future to add similar levels of polish to a new language as the Markdown parser. That said, we are entirely open to PRs on the topic, and I can answer any questions you may have. I'm not sure how complex djot is, but it may be as simple as importing the right Treesitter parser.
Either way, I am thrilled about the project and being able to use a solid spell-checker LSP 🥳
That's great to hear! I aim to please.
PS: Are you planning on adding a sponsoring option?
Emacs org-mode support would be rad
I just had a peep at the supported languages and here are some I note to be missing:
- Assembly
- Elixir
- Kotlin
- Odin
- Zig
I've never used Elixir. Kotlin probably requires the least effort, possibly none. Zig and Odin from memory both also just have C-like comments. Assembly uses ; to introduce comments, at least the common ones.
Glad to see PowerShell is on the running list!
mail support isn't great right now. Since it uses the PlainEnglish parser, it also applies rules to the headers and metadata of the file which isn't ideal. I'm working on a tree-sitter parser for the mail format atm, I'm wondering if it would be possible to only apply harper's rules to contents of the (body) node, or something like that?
Yeah! Using the masker in harper-tree-sitter you can select by node label.
sounds great. I will give that a shot when I'm able.
It would be nice to have support for jujutsu commits just like git-commit.
update: implemented in #2082
Re: a discussion in the discord, we could look into supporting Quatro and RMarkdown. They're both extensions of markdown. RMarkdown has a very solid tree-sitter parser available. Quatro has one too but I haven't been able to verify if it still works. Using these parser and the Masker we should be able to support them. For the time being, they could be treated the same as regular Markdown files; after a brief test, this generally works fine at the cost of some false positives on certain syntax elements.
I use VSCode to edit LaTeX documents, so having support for that would be nice!
It looks like @grantlemons has started work on a Quatro parser. He previously attempted LaTeX, but it never made it in.
Yep, Quatro overall seems pretty easy to mask, but it extends Markdown in a few ways that make it non-trivial. (#749)
It looks like @grantlemons has started work on a Quatro parser. He previously attempted LaTeX, but it never made it in.
Masking Latex would definitely be non-trivial considering Latex's complexity and the turing-complete syntax. This is also why writing a tree-sitter parser that will correctly parse all possible Latex files is basically impossible.
I messed around with Latex parsing a while ago. Using the tree-sitter parser wouldn't be very consistent for masking because a lot of (text) nodes are actually the inputs to functions. It's pretty damn hard to consistently decide whether a given node or section of text should be checked or not.
Ltex-ls is a project that does manage to do it, however. We could look at their implementation for some ideas; although I imagine adding LaTeX support would be no small feat.
Support for the asciidoc markup language would be really helpful.
I would love to have support for Scala and YAML. Thank you for such a great tool!
Please add MDX support: https://mdxjs.com/docs/what-is-mdx/