···120120121121If one of your favourite plugins isn't packaged, you can package it yourself:
122122123123-```
123123+```nix
124124{ config, pkgs, ... }:
125125126126let
···153153 ];
154154}
155155```
156156+157157+### Specificities for some plugins
158158+#### Tree sitter
159159+160160+By default `nvim-treesitter` encourages you to download, compile and install
161161+the required tree-sitter grammars at run time with `:TSInstall`. This works
162162+poorly on NixOS. Instead, to install the `nvim-treesitter` plugins with a set
163163+of precompiled grammars, you can use `nvim-treesitter.withPlugins` function:
164164+165165+```nix
166166+(pkgs.neovim.override {
167167+ configure = {
168168+ packages.myPlugins = with pkgs.vimPlugins; {
169169+ start = [
170170+ (nvim-treesitter.withPlugins (
171171+ plugins: with plugins; [
172172+ tree-sitter-nix
173173+ tree-sitter-python
174174+ ]
175175+ ))
176176+ ];
177177+ };
178178+ };
179179+})
180180+```
181181+182182+To enable all grammars packaged in nixpkgs, use `(pkgs.vimPlugins.nvim-treesitter.withPlugins (plugins: pkgs.tree-sitter.allGrammars))`.
156183157184## Managing plugins with vim-plug {#managing-plugins-with-vim-plug}
158185