Hacker News new | ask | show | jobs
by Sphax 856 days ago
I use neovim, the tree-sitter support is great especially with nvim-treesitter which means I can just run `TSInstall <parser name>` and I'm done.

Writing a tree-sitter parser is not that easy though. I wrote tree-sitter-templ to parse templ files and I still have a hard time identifying some parsing errors, especially since I had to implement a custom external scanner which in my experience was the source of a lot of bugs.

[0]: https://github.com/vrischmann/tree-sitter-templ

1 comments

It's not easy, but after a while it does become somewhat meditative. I think the TypeScript nature of it helps a lot.

I picked up Neovim at my last job and got a decent start on a Tree-sitter parser off hours for the WinSCP batch programming language of all things. But then I couldn't get it to actually install correctly into Neovim, and I switched jobs before I figured it out. :( EDIT: actually, hey, your instructions on installing are really clear! I wonder if I can use them here to help guide me again.

It was really cool, though! Love parsers. https://github.com/hiAndrewQuinn/tree-sitter-winscp