Mark treesitter node to enhance context changes in your buffer.
Change background colors of ...
- Markdown code blocks
- Nested functions
With folke/lazy.nvim, and with an example setup to highlight markdown code blocks.
require("lazy").setup({
{
"atusy/tsnode-marker.nvim",
lazy = true,
init = function()
vim.api.nvim_create_autocmd("FileType", {
group = vim.api.nvim_create_augroup("tsnode-marker-markdown", {}),
pattern = "markdown",
callback = function(ctx)
require("tsnode-marker").set_automark(ctx.buf, {
target = { "code_fence_content" }, -- list of target node types
hl_group = "CursorLine", -- highlight group
})
end,
})
end,
},
}, {})