Manually manage Tree-sitter for Neovim.
Tree-sitter CLI.
Apparently there's an issue in the official Haskell parser now, so we use the fork tree-sitter-grammars/tree-sitter-haskell instead.
git clone https://github.com/tree-sitter-grammars/tree-sitter-haskell
cd tree-sitter-haskell
tree-sitter build
Copy the resulted haskell.so to
~/.config/nvim/parser/.
We still use the query files from the archived nvim-treesitter repo.
git clone https://github.com/nvim-treesitter/nvim-treesitter
cd nvim-treesitter/runtime/queries/haskell
We should see four .scm files there. Copy them to
~/.config/nvim/queries/haskell/.
We now need to tell Neovim to start Tree-sitter. This could be added as an
auto command or just a filetype plugin. We demonstrate the latter here.
Just put vim.treesitter.start() in
~/.config/nvim/ftplugin/haskell.lua. Now our Haskell files
should be very colorful!