Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use idiomatic setup function #44

Merged
merged 1 commit into from
Oct 15, 2023
Merged

Use idiomatic setup function #44

merged 1 commit into from
Oct 15, 2023

Conversation

thetic
Copy link
Contributor

@thetic thetic commented Oct 14, 2023

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.

This permits simple integration with common plugin managers.
With [lazy.nvim](https://github.com/folke/lazy.nvim), for example,
one could:

```lua
{
    '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 HiPhish#4.
@HiPhish
Copy link
Owner

HiPhish commented Oct 15, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Move to more standard .setup() function for configuration
2 participants