2 ms·
Pruner – A recursive, Tree-sitter powered formatter
- julienvincent 8mo agoI've long been interested in using tree-sitter to highlight and format injected languages. For a while I maintained some custom formatter logic in Neovim, which uses tree-sitter, to scratch this itch of mine. I've since pulled this out into a standalone binary which is editor agnostic, and can be run during CI for linting. It turned into a really nice way to define formatting rules in a language agnostic way, and gives a lot of control to teams who want to enforce formatting for code that contains a lot of embedded languages. It's also extensible through WASM plugins. I hope you enjoy!