1
0
Fork 0
dotfiles/.config/nvim/lua/plugins/misc/indent-blankline.lua
2023-11-23 21:27:43 +01:00

53 lines
1 KiB
Lua

local M = { "lukas-reineke/indent-blankline.nvim" }
M.main = "ibl"
M.event = { "BufReadPre", "BufNewFile" }
M.keys = {
{
"<c-c>",
function()
local ok, start = require("indent_blankline.utils").get_current_context(
vim.g.indent_blankline_context_patterns,
vim.g.indent_blankline_use_treesitter_scope
)
if ok then
vim.api.nvim_win_set_cursor(vim.api.nvim_get_current_win(), { start, 0 })
vim.cmd [[normal! _]]
end
end,
desc = "Jump to context",
},
}
M.dependencies = {
"nvim-treesitter",
}
M.opts = {
indent = {
char = "",
tab_char = "",
},
scope = {
char = "",
enabled = true,
show_start = false,
show_end = false,
},
exclude = {
filetypes = {
"help",
"packer",
"NvimTree",
},
buftypes = {
"terminal",
"nofile",
},
},
}
return M