feat: add indentlines (#3056)

This commit is contained in:
Christian Chiarulli 2022-09-21 10:48:15 -04:00 committed by GitHub
parent 8e1d3a2b47
commit 2ba566b0d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 56 additions and 0 deletions

View file

@ -12,6 +12,7 @@ local builtins = {
"lvim.core.nvimtree", "lvim.core.nvimtree",
"lvim.core.lir", "lvim.core.lir",
"lvim.core.illuminate", "lvim.core.illuminate",
"lvim.core.indentlines",
"lvim.core.breadcrumbs", "lvim.core.breadcrumbs",
"lvim.core.project", "lvim.core.project",
"lvim.core.bufferline", "lvim.core.bufferline",

View file

@ -0,0 +1,43 @@
local M = {}
M.config = function()
vim.g.indent_blankline_buftype_exclude = { "terminal", "nofile" }
vim.g.indent_blankline_filetype_exclude = {
"help",
"startify",
"dashboard",
"packer",
"neogitstatus",
"NvimTree",
"Trouble",
"text",
}
vim.g.indentLine_enabled = 1
vim.g.indent_blankline_char = ""
vim.g.indent_blankline_show_trailing_blankline_indent = false
vim.g.indent_blankline_show_first_indent_level = true
vim.g.indent_blankline_use_treesitter = false
vim.g.indent_blankline_show_current_context = true
lvim.builtin.indentlines = {
active = true,
on_config_done = nil,
options = {
show_current_context = true,
},
}
end
M.setup = function()
local status_ok, indent_blankline = pcall(require, "indent_blankline")
if not status_ok then
return
end
indent_blankline.configure(lvim.builtin.indentlines.options)
if lvim.builtin.indentlines.on_config_done then
lvim.builtin.indentlines.on_config_done()
end
end
return M

View file

@ -267,6 +267,15 @@ local core_plugins = {
end, end,
disable = not lvim.builtin.illuminate.active, disable = not lvim.builtin.illuminate.active,
}, },
{
"lukas-reineke/indent-blankline.nvim",
config = function()
require("lvim.core.indent-blankline").setup()
end,
disable = not lvim.builtin.indentlines.active,
},
{ {
"lunarvim/onedarker.nvim", "lunarvim/onedarker.nvim",
branch = "freeze", branch = "freeze",

View file

@ -124,5 +124,8 @@
}, },
"which-key.nvim": { "which-key.nvim": {
"commit": "d5f0c63" "commit": "d5f0c63"
},
"indent-blankline.nvim": {
"commit": "db7cbcb"
} }
} }