diff --git a/lua/modules/configs/editor/bigfile.lua b/lua/modules/configs/editor/bigfile.lua index f5f0ae46d..b13d736dd 100644 --- a/lua/modules/configs/editor/bigfile.lua +++ b/lua/modules/configs/editor/bigfile.lua @@ -19,7 +19,6 @@ return function() filesize = 1, -- size of the file in MiB pattern = { "*" }, -- autocmd pattern features = { -- features to disable - "indent_blankline", "lsp", "illuminate", "treesitter", diff --git a/lua/modules/configs/ui/catppuccin.lua b/lua/modules/configs/ui/catppuccin.lua index c4f1ae033..5248c873a 100644 --- a/lua/modules/configs/ui/catppuccin.lua +++ b/lua/modules/configs/ui/catppuccin.lua @@ -118,8 +118,8 @@ return function() MasonNormal = { link = "NormalFloat" }, -- For indent-blankline - IndentBlanklineChar = { fg = cp.surface0 }, - IndentBlanklineContextChar = { fg = cp.surface2, style = { "bold" } }, + IblIndent = { fg = cp.surface0 }, + IblScope = { fg = cp.surface2, style = { "bold" } }, -- For nvim-cmp and wilder.nvim Pmenu = { fg = cp.overlay2, bg = transparent_background and cp.none or cp.base }, diff --git a/lua/modules/configs/ui/indent-blankline.lua b/lua/modules/configs/ui/indent-blankline.lua index 1fe3797be..0b7e3b440 100644 --- a/lua/modules/configs/ui/indent-blankline.lua +++ b/lua/modules/configs/ui/indent-blankline.lua @@ -1,50 +1,95 @@ return function() - require("modules.utils").load_plugin("indent_blankline", { - char = "│", - context_char = "┃", - show_first_indent_level = true, - filetype_exclude = { - "", -- for all buffers without a file type - "alpha", - "dashboard", - "dotooagenda", - "flutterToolsOutline", - "fugitive", - "git", - "gitcommit", - "help", - "json", - "log", - "markdown", - "NvimTree", - "peekaboo", - "startify", - "TelescopePrompt", - "todoist", - "txt", - "undotree", - "vimwiki", - "vista", + require("modules.utils").load_plugin("ibl", { + enabled = true, + debounce = 200, + indent = { + char = "│", + tab_char = "│", + smart_indent_cap = true, + priority = 2, }, - buftype_exclude = { "terminal", "nofile" }, - show_trailing_blankline_indent = false, - show_current_context = true, - context_patterns = { - "^if", - "^table", - "block", - "class", - "for", - "function", - "if_statement", - "import", - "list_literal", - "method", - "selector", - "type", - "var", - "while", + whitespace = { remove_blankline_trail = true }, + -- Note: The `scope` field requires treesitter to be set up + scope = { + enabled = true, + char = "┃", + show_start = false, + show_end = false, + injected_languages = true, + priority = 1000, + include = { + node_type = { + ["*"] = { + "argument_list", + "arguments", + "assignment_statement", + "Block", + "chunk", + "class", + "ContainerDecl", + "dictionary", + "do_block", + "do_statement", + "element", + "except", + "FnCallArguments", + "for", + "for_statement", + "function", + "function_declaration", + "function_definition", + "if_statement", + "IfExpr", + "IfStatement", + "import", + "InitList", + "list_literal", + "method", + "object", + "ParamDeclList", + "repeat_statement", + "selector", + "SwitchExpr", + "table", + "table_constructor", + "try", + "tuple", + "type", + "var", + "while", + "while_statement", + "with", + }, + }, + }, + }, + exclude = { + filetypes = { + "", -- for all buffers without a file type + "alpha", + "big_file_disabled_ft", + "dashboard", + "dotooagenda", + "flutterToolsOutline", + "fugitive", + "git", + "gitcommit", + "help", + "json", + "log", + "markdown", + "NvimTree", + "Outline", + "peekaboo", + "startify", + "TelescopePrompt", + "todoist", + "txt", + "undotree", + "vimwiki", + "vista", + }, + buftypes = { "terminal", "nofile", "quickfix", "prompt" }, }, - space_char_blankline = " ", }) end diff --git a/lua/modules/plugins/ui.lua b/lua/modules/plugins/ui.lua index 789e5bd69..c7aa694f0 100644 --- a/lua/modules/plugins/ui.lua +++ b/lua/modules/plugins/ui.lua @@ -29,7 +29,6 @@ ui["lewis6991/gitsigns.nvim"] = { } ui["lukas-reineke/indent-blankline.nvim"] = { lazy = true, - commit = "9637670", event = { "CursorHold", "CursorHoldI" }, config = require("ui.indent-blankline"), }