forked from ayamir/nvimdots
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ibl): support
indent-blankline
v3 (ayamir#1011)
* migrate(ibl): `indent-blankline` to v3 * migrate(ibl): draft v3 config * feat(ibl): plugins support & misc updates * fix merge conflicts --------- Co-authored-by: Jint-lzxy <[email protected]>
- Loading branch information
1 parent
cb50973
commit 8943ca9
Showing
4 changed files
with
93 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters