plugins.treesitter.settings

Options provided to the require('nvim-treesitter.configs').setup function.

Type: attribute set of anything

Default: { }

Example:

{
  auto_install = false;
  ensure_installed = "all";
  highlight = {
    additional_vim_regex_highlighting = true;
    custom_captures = { };
    disable = [
      "rust"
    ];
    enable = true;
  };
  ignore_install = [
    "rust"
  ];
  incremental_selection = {
    enable = true;
    keymaps = {
      init_selection = false;
      node_decremental = "grm";
      node_incremental = "grn";
      scope_incremental = "grc";
    };
  };
  indent = {
    enable = true;
  };
  parser_install_dir = {
    __raw = "vim.fs.joinpath(vim.fn.stdpath('data'), 'treesitter')";
  };
  sync_install = false;
}

Declared by:

plugins.treesitter.settings.auto_install

Whether to automatically install missing parsers when entering a buffer.

Type: null or boolean or raw lua code

Default: null

Plugin default: false

Declared by:

plugins.treesitter.settings.ensure_installed

Either "all" or a list of languages to ensure installing.

Type: null or value “all” (singular enum) or list of (string or raw lua code) or raw lua code

Default: null

Plugin default: [ ]

Declared by:

plugins.treesitter.settings.ignore_install

List of parsers to ignore installing. Used when ensure_installed is set to "all".

Type: null or (list of (string or raw lua code))

Default: null

Plugin default: [ ]

Declared by:

plugins.treesitter.settings.parser_install_dir

Location of the parsers to be installed by the plugin (only needed when nixGrammars is disabled).

By default, parsers are installed to the “site” dir. If set to null the plugin default is used, which will not work on nix.

Type: null or string or raw lua code

Default:

{
  __raw = "vim.fs.joinpath(vim.fn.stdpath('data'), 'site')";
}

Plugin default: the plugin’s package directory

Declared by:

plugins.treesitter.settings.sync_install

Install parsers synchronously (only applied to ensure_installed).

Type: null or boolean or raw lua code

Default: null

Plugin default: false

Declared by: