summaryrefslogtreecommitdiff
path: root/.config/nvim/plugins/indent_blankline.vim
diff options
context:
space:
mode:
authorDaniel Weipert <code@drogueronin.de>2023-10-12 19:08:36 +0200
committerDaniel Weipert <code@drogueronin.de>2023-10-30 09:52:23 +0100
commitd6f7ebd26324763dbea00dcc25cd0cceacba9673 (patch)
treeef1206359f733574fd063b7e1e021dddba886b2d /.config/nvim/plugins/indent_blankline.vim
parent1d4cc9308fe066a29e8951b0dee496375e9ef5da (diff)
[nvim] configure indent-blankline for new version
Diffstat (limited to '.config/nvim/plugins/indent_blankline.vim')
-rw-r--r--.config/nvim/plugins/indent_blankline.vim48
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