How do I set a custom background color for *Treesitter* *markdown_inline*? #617
-
I'm used to a different color when I write Markdown documents. How do I set a custom background color, just for Treesitter markdown_inline? |
Beta Was this translation helpful? Give feedback.
Answered by
stevenxxiu
Nov 21, 2023
Replies: 1 comment
-
I found Customizing highlighting of individual Neovim windows | by Caleb Taylor | Medium, which was fantastic and worked for me. The following sets the background color to the same as that in Sublime Text's MarkdownEditing's MarkdownEditor color scheme: vim.cmd('highlight MarkdownBackground guibg=#ECECEC')
vim.api.nvim_create_autocmd({ 'BufEnter' }, {
pattern = '*',
callback = function()
if vim.api.nvim_buf_get_option(0, 'filetype') == 'markdown' then
vim.opt_local.winhighlight = 'Normal:MarkdownBackground'
end
end,
}) If there's an answer specific to Catppuccin, please post it. I'm more than happy to accept that instead. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
stevenxxiu
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I found Customizing highlighting of individual Neovim windows | by Caleb Taylor | Medium, which was fantastic and worked for me.
The following sets the background color to the same as that in Sublime Text's MarkdownEditing's MarkdownEditor color scheme:
If there's an answer specific to Catppuccin, please post it. I'm more than happy to accept that instead.