You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: set quote highlights for 6 levels of nesting
## Details
This is a follow up to highlighting block quote markers based on their
nesting level. While support was added for it, it was up to the user to
actually take advantage of the feature by setting highlights. Aside from
callouts which would use their highlight out of the box.
This change does not have any visual impact but does allow colorscheme
authors to set custom highlights for block quotes based on their level.
Rather than using the `RenderMarkdownQuote` highlight for all levels we
now set 6 highlights `RenderMarkdownQuote1`..`RenderMarkdownQuote6` for
the default value. All of these link to the original highlight
`RenderMarkdownQuote` if no custom value is set. That way there is no
change for colorschemes that did set a value for `RenderMarkdownQuote`,
but if colorschemes want to they can now configure each of the levels to
the desired value. It is recommended to set all 6 to some value if you
set any of them, but you can repeat say values for 1 through 3 for 4
through 6.
Users can also set the highlights using:
```lua
vim.api.nvim_set_hl(0, 'RenderMarkdownQuote1', { fg = .. })
vim.api.nvim_set_hl(0, 'RenderMarkdownQuote2', { fg = .. })
vim.api.nvim_set_hl(0, 'RenderMarkdownQuote3', { fg = .. })
vim.api.nvim_set_hl(0, 'RenderMarkdownQuote4', { fg = .. })
vim.api.nvim_set_hl(0, 'RenderMarkdownQuote5', { fg = .. })
vim.api.nvim_set_hl(0, 'RenderMarkdownQuote6', { fg = .. })
```
Without needing to actually configure custom highlights in the plugin
configuration. This is slightly more robust since it will be unaffected
if the plugin configuration changes in the future.
0 commit comments