Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

rainbow-delimiters

URL: https://gitlab.com/HiPhish/rainbow-delimiters.nvim


Rainbow delimiters for Neovim with Tree-sitter

plugins.rainbow-delimiters.enable

Whether to enable rainbow-delimiters.

Type: boolean

Default: false

Example: true

Declared by:

plugins.rainbow-delimiters.package

The rainbow-delimiters package to use.

Type: package

Default: pkgs.vimPlugins.rainbow-delimiters-nvim

Declared by:

plugins.rainbow-delimiters.autoLoad

Whether to automatically load rainbow-delimiters when neovim starts.

Type: boolean

Default: false when lazy-loading is enabled.

Example: false

Declared by:

plugins.rainbow-delimiters.settings

Options provided to the require('rainbow-delimiters').setup function.

Type: open submodule of attribute set of anything

Default: { }

Example:

{
  blacklist = [
    "json"
  ];
  highlight = [
    "RainbowDelimiterViolet"
    "RainbowDelimiterBlue"
    "RainbowDelimiterGreen"
  ];
  strategy = {
    "" = lib.nixvim.mkRaw "require 'rainbow-delimiters'.strategy['global']";
    nix = lib.nixvim.mkRaw "require 'rainbow-delimiters'.strategy['local']";
  };
}

Declared by:

plugins.rainbow-delimiters.strategy

Attrs mapping Tree-sitter language names to strategies. See |rb-delimiters-strategy| for more information about strategies. This option adds definitions to plugins.rainbow-delimiters.settings.strategy wrapped with required Lua code.

Type: null or (attribute set of (one of “global”, “local”, “noop” or raw lua code)) or raw lua code

Default: null

Plugin default:

{
  default = "global";
}

Example:

{
  # Use global strategy by default
  "" = "global";

  # Use local for HTML
  html = "local";

  # Pick the strategy for LaTeX dynamically based on the buffer size
  latex.__raw = ''
    function()
      -- Disabled for very large files, global strategy for large files,
      -- local strategy otherwise
      if vim.fn.line('$') > 10000 then
          return nil
      elseif vim.fn.line('$') > 1000 then
          return require 'rainbow-delimiters'.strategy['global']
      end
      return require 'rainbow-delimiters'.strategy['local']
    end
  '';
}

Declared by: