The init.lua file
Tree-sitter is a parsing tool/library that improves syntax highlighting in Neovim.
Tree-sitter comes built-in with Neovim, and is relatively easy to configure.
Configuring Tree-sitter
Add the following code to your configuration, e.g. in your init.lua
or in lua/treesitter=setup.lua
:
Replace the languages in ensure_installed
with the relevant languages you need. The full list of languages and additional configuration options are available here.
Tree-sitter and Colorschemes
When picking a Neovim colorscheme, ensure that it’s tree-sitter supported/compatible — Awesome Neovim provides a list of themes which you can use.
There is more information on setting up themes in the colorscheme section.