diff options
| author | jdhao <jdhao@hotmail.com> | 2023-09-28 23:37:35 +0200 |
|---|---|---|
| committer | jdhao <jdhao@hotmail.com> | 2023-09-28 23:41:42 +0200 |
| commit | 4d8ef868ad0ef7f6433d91332aa6649186d9a2fb (patch) | |
| tree | 0f0079632a0b88d4da690a631333394b507c6d14 /lua/config/indent-blankline.lua | |
| parent | 3137850db67b1b45111656e8749b60eb936dfa7d (diff) | |
upgrade indent-blankline to v3
Diffstat (limited to 'lua/config/indent-blankline.lua')
| -rw-r--r-- | lua/config/indent-blankline.lua | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/lua/config/indent-blankline.lua b/lua/config/indent-blankline.lua index 3c4a33d..3ddadbe 100644 --- a/lua/config/indent-blankline.lua +++ b/lua/config/indent-blankline.lua @@ -1,21 +1,29 @@ local api = vim.api -local exclude_ft = { "help", "git", "markdown", "snippets", "text", "gitconfig", "alpha" } -require("indent_blankline").setup { - -- U+2502 may also be a good choice, it will be on the middle of cursor. - -- U+250A is also a good choice - char = "▏", - show_end_of_line = false, +local exclude_ft = { "help", "git", "markdown", "snippets", "text", "gitconfig", "alpha", "dashboard" } + +require("ibl").setup { + indent = { + -- -- U+2502 may also be a good choice, it will be on the middle of cursor. + -- -- U+250A is also a good choice + char = "▏", + }, + scope = { + show_start = false, + show_end = false, + }, disable_with_nolist = true, - buftype_exclude = { "terminal" }, - filetype_exclude = exclude_ft, + exclude = { + filetypes = exclude_ft, + buftypes = { "terminal" }, + }, } local gid = api.nvim_create_augroup("indent_blankline", { clear = true }) api.nvim_create_autocmd("InsertEnter", { pattern = "*", group = gid, - command = "IndentBlanklineDisable", + command = "IBLDisable", }) api.nvim_create_autocmd("InsertLeave", { @@ -23,7 +31,7 @@ api.nvim_create_autocmd("InsertLeave", { group = gid, callback = function() if not vim.tbl_contains(exclude_ft, vim.bo.filetype) then - vim.cmd([[IndentBlanklineEnable]]) + vim.cmd([[IBLEnable]]) end end, }) |
