Tree-Sitter For Dummies

  • Video date Feb. 7, 2021

  • Decent high level into to tree-sitter

  • Not really necessary to watch if you read these notes

  • It's from GitHub

  • It's language agnostic

  • You write a grammar for languages

  • Does pretty well at parsing small incremental sections

  • pretty good at not choking on intermediat things (e.g. when you're tying a string but haven't closed the quotes yet)

  • There's a query language built in

  • video shows a basic parsing example

  • Command to turn it on is

    :TSBufEneable highlight

  • There's a Tree-Sitter playground that can be useful for developing


  • Can power code folding too

  • Can be used to power selecitions like getting parents

  • Tree-Sitter is also very fast

  • Tree-Sitter tends to be faster than LSPs for some internal single file operations.