Forked from hlchunk. Indent has been removed (but if you want to use it, try indent-blankline). Chunk, context and line_num have been retained. It is simple, fast and cool.
This plugin now has some functions, which include:
- chunk
- line_num (support highlight context and chunk range)
- context
- textobject (support context textobject and chunk textobject)
- jump (support jump to context start and end)
neovim version >= 0.9.0
With Lazy
{
"Mr-LLLLL/cool-chunk.nvim",
event = { "CursorHold", "CursorHoldI" },
dependencies = {
"nvim-treesitter/nvim-treesitter",
},
config = function()
require("cool-chunk").setup({})
end
},
The script comes with the following defaults:
Click this Dropdown to see default setttings.
{
chunk = {
notify = true,
support_filetypes = ft.support_filetypes, -- ft = require("cool-chunk.utils.filetype").support_filetypes
exclude_filetypes = ft.exclude_filetypes,
hl_group = {
chunk = "CursorLineNr",
error = "Error",
},
chars = {
horizontal_line = "─",
vertical_line = "│",
left_top = "╭",
left_bottom = "╰",
left_arrow = "<",
bottom_arrow = "v",
right_arrow = ">",
},
textobject = "ah",
animate_duration = 200, -- if don't want to animation, set to 0.
fire_event = { "CursorHold", "CursorHoldI" },
},
context = {
notify = true,
chars = {
"│",
},
hl_group = {
context = "LineNr",
},
exclude_filetypes = ft.exclude_filetypes,
support_filetypes = ft.support_filetypes,
textobject = "ih",
jump_support_filetypes = { "lua", "python" },
jump_start = "[{",
jump_end = "]}",
fire_event = { "CursorHold", "CursorHoldI" },
},
line_num = {
notify = true,
hl_group = {
chunk = "CursorLineNr",
context = "LineNr",
error = "Error",
},
support_filetypes = ft.support_filetypes,
exclude_filetypes = ft.exclude_filetypes,
fire_event = { "CursorHold", "CursorHoldI" },
}
}
Click this Dropdown to see Available Commands
This plugin provides some commands to switch plugin status, which are listed below:
- EnableCC
- DisableCC
- EnableCCChunk
- DisableCCChunk
- EnableCCContext
- DisableCCContext
- EnableCCLineNum
- DisableCCLineNum