Skip to content

Commit

Permalink
refactor(nvim): adopt v3 indent-blankline
Browse files Browse the repository at this point in the history
  • Loading branch information
spywhere committed Oct 11, 2023
1 parent e224af5 commit 325ba2b
Showing 1 changed file with 49 additions and 13 deletions.
62 changes: 49 additions & 13 deletions configs/nvim/lua/plugin/visualization/indent-blankline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,57 @@ local registry = require('lib.registry')
registry.install {
'lukas-reineke/indent-blankline.nvim',
config = function ()
require('indent_blankline').setup {
char = '',
use_treesitter = true,
show_current_context = true,
filetype_exclude = {
'text', 'help', 'startify', 'alpha', 'packer', 'lazy', 'mason'
require('ibl').setup {
indent = {
char = '',
},
buftype_exclude = { 'terminal' },
-- better context scope highlight (https://github.com/lukas-reineke/indent-blankline.nvim/issues/61#issuecomment-803613439)
context_patterns = {
'class', 'function', 'method', '^if', '^while',
'^for', '^object', '^table', 'block', 'arguments'
scope = {
show_start = false,
show_end = false,
include = {
node_type = {
-- better scope highlight
-- https://github.com/lukas-reineke/indent-blankline.nvim/issues/632#issuecomment-1732366788
lua = {
'chunk',
'do_statement',
'while_statement',
'repeat_statement',
'if_statement',
'for_statement',
'function_declaration',
'function_definition',
'table_constructor',
'assignment_statement',
},
typescript = {
'statement_block',
'function',
'arrow_function',
'function_declaration',
'method_definition',
'for_statement',
'for_in_statement',
'catch_clause',
'object_pattern',
'arguments',
'switch_case',
'switch_statement',
'switch_default',
'object',
'object_type',
'ternary_expression',
},
}
}
},
space_char = ' ',
space_char_blankline = ' '
exclude = {
filetypes = {
'lspinfo', 'packer', 'lazy', 'checkhealth', 'help', 'man',
'TelescopePrompt', 'TelescopeResults', 'text',
'startify', 'alpha', 'mason'
},
}
}
end
}

0 comments on commit 325ba2b

Please sign in to comment.