mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-08-30 22:59:22 +02:00
feat: add indentlines (#3056)
This commit is contained in:
parent
8e1d3a2b47
commit
2ba566b0d8
4 changed files with 56 additions and 0 deletions
|
@ -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",
|
||||||
|
|
43
lua/lvim/core/indentlines.lua
Normal file
43
lua/lvim/core/indentlines.lua
Normal 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
|
|
@ -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",
|
||||||
|
|
|
@ -124,5 +124,8 @@
|
||||||
},
|
},
|
||||||
"which-key.nvim": {
|
"which-key.nvim": {
|
||||||
"commit": "d5f0c63"
|
"commit": "d5f0c63"
|
||||||
|
},
|
||||||
|
"indent-blankline.nvim": {
|
||||||
|
"commit": "db7cbcb"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue