-
Notifications
You must be signed in to change notification settings - Fork 44
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
Change code and quote line colors #77
Comments
I believe the issue is somehow related to The vertical line can for the blockquote can be configured using |
Hmm, looks like the
The I suppose you'd need to invert the |
I finally figured it out, this patch is needed to respect the color scheme when diff --git a/lua/render-markdown/colors.lua b/lua/render-markdown/colors.lua
index dd90b6b..7de03f2 100644
--- a/lua/render-markdown/colors.lua
+++ b/lua/render-markdown/colors.lua
@@ -80,7 +80,12 @@ M.inverse = function(highlight)
local name = string.format('%s_Inverse_%s', M.prefix, highlight)
if not vim.tbl_contains(cache.highlights, name) then
local hl = M.get_hl(highlight)
- vim.api.nvim_set_hl(0, name, { fg = hl.bg, bg = hl.fg })
+ vim.api.nvim_set_hl(0, name, {
+ fg = hl.bg,
+ bg = hl.fg,
+ ctermbg = hl.ctermfg,
+ ctermfg = hl.ctermbg,
+ })
table.insert(cache.highlights, name)
end
return name |
And it looks like there's a bug in lua type definitions in neovim API: --- @class vim.api.keyset.hl_info.cterm : vim.api.keyset.hl_info.base
--- @field ctermfg? integer
--- @field ctermbg? integer
--- @field foreground? integer
--- @field background? integer
--- @class vim.api.keyset.hl_info : vim.api.keyset.hl_info.base
--- @field fg? integer
--- @field bg? integer
--- @field sp? integer
--- @field default? true
--- @field link? string
--- @field blend? integer
--- @field cterm? vim.api.keyset.hl_info.cterm The Opened a bug neovim/neovim#29815 |
Is your feature request related to a problem? Please describe.
I'd like to change the color of the concealed line used for the code blocks, as well as the
>
replacement character in blockquotes.Describe the solution you'd like
A designated highlight group for changing the block character for code blocks.
Describe alternatives you've considered
Not really a Neovim theming expert, but I noticed that the color changes with different
ctermfg
/ctermbg
values set inhi Normal
. Haven't figured out how to change the color of the quote blocks yet. SettingRenderMarkdownCode
highlight only seems to affect the rendering of actual code; it also disables treesitter's syntax highlighting when set.Additional information
No response
The text was updated successfully, but these errors were encountered: