![Linting and style checking](https://github.com/nvim-treesitter/nvim-treesitter/workflows/Linting%20and%20style%20checking/badge.svg?branch=master) ![Check loading of syntax files](https://github.com/nvim-treesitter/nvim-treesitter/workflows/Check%20loading%20of%20syntax%20files/badge.svg) [Join us on Zulip !](https://nvim-treesitter.zulipchat.com/join/1twnvjqumn0t97p65eragu5o/) # nvim-treesitter Treesitter configurations and abstraction layer for Neovim. ![Nvim-treesitter](nvim-treesitter.png) Traditional highlighting (left) vs Treesitter-based highlighting (right). **Warning: Treesitter and Treesitter highlighting are an experimental feature of nightly versions of Neovim. Please consider the experience with this plug-in as experimental until Neovim 0.5 is released!** # Quickstart ## Requirements - Neovim [nightly](https://github.com/neovim/neovim#install-from-source) - `git` in your path. - A C compiler in your path. ## Installation You can install `nvim-treesitter` with your favorite package manager, or using the default `pack` feature of Neovim! ### Using a package manager Simply add these lines to your `init.vim` : ```vim Plug 'nvim-treesitter/nvim-treesitter' ``` ### Using Neovim `pack` feature We highly recommend reading `:h packages` to learn more about this feature, but you can still follow these steps: ```sh $ mkdir -p ~/.local/share/nvim/site/pack/nvim-treesitter/start $ cd ~/.local/share/nvim/site/pack/nvim-treesitter/start $ git clone https://github.com/nvim-treesitter/nvim-treesitter.git ``` ## Adding parsers Treesitter uses a different _parser_ for every language. It can be quite a pain to install, but fortunately `nvim-treesitter` provides two command to tackle this issue: - `TSInstall {language}` to install one or more parsers. `TSInstall ` will give you a list of supported languages, or select `all` to install them all. - `TSInstallInfo` to know which parser is installed. Let's say you need parsers for `lua`, this is how you do with these commands: ```vim :TSInstall lua Downloading... Compiling... Treesitter parser for lua has been installed ``` Cool, lets see which parsers are installed: ```vim :TSInstallInfo lua [✓] installed c [✗] installed html [✗] not installed typescript [✗] not installed ... ``` And now you should be ready to use every functionality `nvim-treesitter` provides! ## Setup All modules are disabled by default, so you'll need to activate them by putting this in your `init.vim`: ```lua lua <