From 71fb14c028db198b539e9217c92747295738c13f Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Wed, 28 Dec 2022 13:32:15 +0100 Subject: [PATCH] nvim: move indent-blankline config to file --- .../lua/config/plugins/indent-blankline.lua | 44 +++++++++++++++++++ .config/nvim/lua/config/plugins/init.lua | 20 --------- 2 files changed, 44 insertions(+), 20 deletions(-) create mode 100644 .config/nvim/lua/config/plugins/indent-blankline.lua diff --git a/.config/nvim/lua/config/plugins/indent-blankline.lua b/.config/nvim/lua/config/plugins/indent-blankline.lua new file mode 100644 index 0000000..b9f11e1 --- /dev/null +++ b/.config/nvim/lua/config/plugins/indent-blankline.lua @@ -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 diff --git a/.config/nvim/lua/config/plugins/init.lua b/.config/nvim/lua/config/plugins/init.lua index 51468c8..de3527e 100644 --- a/.config/nvim/lua/config/plugins/init.lua +++ b/.config/nvim/lua/config/plugins/init.lua @@ -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()