back to TILs

Neovim :InspectTree Tree-sitter

I had assumed that to interact with Tree-sitter in Neovim, you still needed to use the utilities from nvim-treesitter. Apparently that’s not the case — Neovim has had a builtin :InspectTree command that brings up the AST from Tree-sitter in a split window, which is scrollbound to the original window and highlights the selected node in both windows.

It also has a query editor, which I haven’t yet had the need for, but it’s good to know it exists.