HiPhish / rainbow-delimiters.nvim

Rainbow delimiters for Neovim with Tree-sitter
https://gitlab.com/HiPhish/rainbow-delimiters.nvim
Apache License 2.0
470 stars 35 forks source link

Use idiomatic setup function #44

Closed thetic closed 9 months ago

thetic commented 9 months ago

This permits simple integration with common plugin managers. With lazy.nvim, for example, one could use the following:

{
    'HiPhish/rainbow-delimiters.nvim',
    main = 'rainbow-delimiters.setup',
    opts = {
        strategy = {
            [''] = rainbow_delimiters.strategy['global'],
            vim = rainbow_delimiters.strategy['local'],
        },
        query = {
            [''] = 'rainbow-delimiters',
            lua = 'rainbow-blocks',
        },
        highlight = {
            'RainbowDelimiterRed',
            'RainbowDelimiterYellow',
            'RainbowDelimiterBlue',
            'RainbowDelimiterOrange',
            'RainbowDelimiterGreen',
            'RainbowDelimiterViolet',
            'RainbowDelimiterCyan',
        },
    },
}

Closes #4.

HiPhish commented 9 months ago

Thank you. I have also updated the text of the manual to be less... condescending.