Introducing tree-sitter-purescript

Recently there’s been some work going on Tree-sitter grammar for PureScript. It is now finished and a Neovim (and some other editors) integration is available.

Guides (really simple) on how to install it for different editors are available here. VS Code currently has no official support for Tree-sitter, but Microsoft are working on it.

What is this for?

Primarily, editors integration. A tree-sitter grammar is a CST parser, and as such offers editors fairly deep insight into the text they’re rendering, which in turn enables features like “smarter” and faster highlighting and code navigation.

10 Likes

This is awesome! The output has less false positives than regexes for Vim. I’ll need to loads this into my Neovim config. I’ve found that with the advent of formatters being the norm, a lot of what Vim plugins offered got in the way of just wanting syntax highlighting which Tree-sitter provides.