nvim: move indent-blankline config to file

This commit is contained in:
Daniel Lundin 2022-12-28 13:32:15 +01:00
parent 6e6cdc261b
commit 71fb14c028
2 changed files with 44 additions and 20 deletions

View file

@ -0,0 +1,44 @@
local M = {
"lukas-reineke/indent-blankline.nvim",
event = "BufReadPre",
config = {
buftype_exclude = { "terminal", "nofile" },
filetype_exclude = {
"help",
"neogitstatus",
"NvimTree",
"neo-tree",
"Trouble",
},
char = "",
-- char = "┊",
char_highlight_list = { "Indent1", "Indent2", "Indent3", "Indent4", "Indent5", "Indent6" },
use_treesitter_scope = false,
show_trailing_blankline_indent = false,
show_current_context = true,
context_patterns = {
"class",
"return",
"function",
"method",
"^if",
"^while",
"jsx_element",
"^for",
"^object",
"^table",
"block",
"arguments",
"if_statement",
"else_clause",
"jsx_element",
"jsx_self_closing_element",
"try_statement",
"catch_clause",
"import_statement",
"operation_type",
},
},
}
return M

View file

@ -38,26 +38,6 @@ return {
end,
},
{
"lukas-reineke/indent-blankline.nvim",
branch = "master",
event = "VeryLazy",
init = function()
vim.g.indent_blankline_char = ""
vim.g.indent_blankline_space_char = ""
vim.g.indent_blankline_space_char_highlight_list = { "IndentSpace" }
-- vim.g.indent_blankline_char_list = {'|', '¦', '┆', '┊'}
vim.g.indent_blankline_buftype_exclude = { "help", "terminal" }
vim.g.indent_blankline_filetype_exclude = { "text", "markdown" }
-- vim.g.indent_blankline_show_end_of_line = true
vim.g.indent_blankline_show_first_indent_level = true
vim.g.indent_blankline_show_trailing_blankline_indent = true
vim.g.indent_blankline_char_highlight_list =
{ "Indent1", "Indent2", "Indent3", "Indent4", "Indent5", "Indent6" }
require("indent_blankline").setup({})
end,
},
{
"ray-x/go.nvim",
config = function()