diff options
author | Daniel Weipert <code@drogueronin.de> | 2023-10-12 19:08:36 +0200 |
---|---|---|
committer | Daniel Weipert <code@drogueronin.de> | 2023-10-30 09:52:23 +0100 |
commit | d6f7ebd26324763dbea00dcc25cd0cceacba9673 (patch) | |
tree | ef1206359f733574fd063b7e1e021dddba886b2d /.config | |
parent | 1d4cc9308fe066a29e8951b0dee496375e9ef5da (diff) |
[nvim] configure indent-blankline for new version
Diffstat (limited to '.config')
-rw-r--r-- | .config/nvim/plugins/indent_blankline.vim | 48 |
1 files changed, 40 insertions, 8 deletions
diff --git a/.config/nvim/plugins/indent_blankline.vim b/.config/nvim/plugins/indent_blankline.vim index 227ac86..2702b4f 100644 --- a/.config/nvim/plugins/indent_blankline.vim +++ b/.config/nvim/plugins/indent_blankline.vim @@ -1,11 +1,43 @@ lua <<EOF -vim.api.nvim_set_hl(0, 'IndentBlanklineChar', { fg = '#303030', nocombine = true }) -vim.api.nvim_set_hl(0, 'IndentBlanklineContextChar', { fg = '#404040', nocombine = true }) - -require('indent_blankline').setup { - use_treesitter = true, - show_first_indent_level = false, - show_trailing_blankline_indent = false, - show_current_context = true, + +local hooks = require('ibl.hooks') + +hooks.register( + hooks.type.WHITESPACE, + hooks.builtin.hide_first_space_indent_level +) + +hooks.register( + hooks.type.WHITESPACE, + hooks.builtin.hide_first_tab_indent_level +) + +hooks.register( + hooks.type.HIGHLIGHT_SETUP, + function() + vim.api.nvim_set_hl(0, 'IndentBlanklineChar', { fg = '#303030', nocombine = true }) + vim.api.nvim_set_hl(0, 'IndentBlanklineContextChar', { fg = '#404040', nocombine = true }) + end +) + + +require('ibl').setup { + indent = { + highlight = { + 'IndentBlanklineChar', + }, + }, + + whitespace = { + remove_blankline_trail = true, + }, + + scope = { + enabled = false, + + highlight = { + 'IndentBlanklineContextChar', + }, + }, } EOF |