Skip to content

Latest commit

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

HIGHLIGHT MARKDOWN CODEBLOCK

JUST DO HIGHLIGHT MARKDOWN CODEBLOCK

show

REQUIRE

  1. nvim version >= 0.11.0
  2. nvim-treesitter

USAGE

-- packerrequire('packer').startup({
-- ...use {
'yaocccc/nvim-hl-mdcodeblock.lua',
after='nvim-treesitter',
config=function ()
require('hl-mdcodeblock').setup({
-- option
})
end
}
})
-- lazy
{
"yaocccc/nvim-hl-mdcodeblock.lua",
dependencies= { 'nvim-treesitter/nvim-treesitter' },
ft='markdown',
opts= {}
}

OPTIONS

 {
hl_group="MDCodeBlock", -- default highlight groupbg="#282828" -- default bg if you never set hl configevents= { -- refresh event"FileChangedShellPost",
"Syntax",
"TextChanged",
"TextChangedI",
"InsertLeave",
"WinScrolled",
"BufEnter",
},
padding_right=4, -- always append 4 space at line endtimer_delay=20, -- refresh delay(ms)query_by_ft= { -- special parser query by filetypemarkdown= { -- filetype'markdown', -- parser'(fenced_code_block) @codeblock', -- query
},
rmd= { -- filetype'markdown', -- parser'(fenced_code_block) @codeblock', -- query
},
},
minumum_len=60, -- minimum len to highlight (number | function)-- minumum_len = function () return math.max(math.floor(vim.api.nvim_win_get_width(0) * 0.8), 100) end
}

About

a nvim plugin for hignlight markdown codeblock.

Resources

Stars

36 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages