-
-
Notifications
You must be signed in to change notification settings - Fork 253
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(pack): added rainbow-delimiter.nvim integration for indent-blank…
…line.nvim (#899) * feat(indent): added bracker-pair-colorizer plugin * refactor(indent): simplify indent-blankline with rainbow-delimiters implementation --------- Co-authored-by: Micah Halter <[email protected]>
- Loading branch information
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
lua/astrocommunity/pack/rainbow-delimiter-indent-blankline/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# rainbow-delimiters.nvim integration for indent-blankline.nvim | ||
|
||
Provides rainbow indent guides that tie into their relevant bracket pairs, and a scope guide | ||
Provides `rainbow-delimiters.nvim` and configures `indent-blankline.nvim` as described in the [indent-blankline.nvim documentation](https://github.com/lukas-reineke/indent-blankline.nvim/tree/master?tab=readme-ov-file#rainbow-delimitersnvim-integration) | ||
|
||
**Repositores:** | ||
|
||
- <https://github.com/lukas-reineke/indent-blankline.nvim> | ||
- <https://gitlab.com/HiPhish/rainbow-delimiters.nvim> | ||
|
||
## Preview | ||
|
||
![indent-colorizer-preview](https://github.com/lukas-reineke/indent-blankline.nvim/assets/12900252/67707d8e-57d3-411c-8418-77908d8babd9) |
30 changes: 30 additions & 0 deletions
30
lua/astrocommunity/pack/rainbow-delimiter-indent-blankline/init.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
return { | ||
{ import = "astrocommunity.editing-support.rainbow-delimiters-nvim" }, | ||
{ | ||
"lukas-reineke/indent-blankline.nvim", | ||
main = "ibl", | ||
dependencies = { "HiPhish/rainbow-delimiters.nvim" }, | ||
opts = function(_, opts) | ||
if not opts.scope then opts.scope = {} end | ||
opts.scope.show_start = true | ||
opts.scope.show_end = true | ||
opts.scope.highlight = vim.tbl_get(vim.g, "rainbow_delimiters", "highlight") | ||
or { | ||
"RainbowDelimiterRed", | ||
"RainbowDelimiterYellow", | ||
"RainbowDelimiterBlue", | ||
"RainbowDelimiterOrange", | ||
"RainbowDelimiterGreen", | ||
"RainbowDelimiterViolet", | ||
"RainbowDelimiterCyan", | ||
} | ||
end, | ||
|
||
config = function(plugin, opts) | ||
require(plugin.main).setup(opts) | ||
|
||
local hooks = require "ibl.hooks" | ||
hooks.register(hooks.type.SCOPE_HIGHLIGHT, hooks.builtin.scope_highlight_from_extmark) | ||
end, | ||
}, | ||
} |