mirror of
https://github.com/LunarVim/LunarVim.git
synced 2024-09-20 18:45:08 +02:00
refactor(alpha): remove laststatus and tabline autocmds (#3809)
This commit is contained in:
parent
60c7ad77fd
commit
b9e1952421
2 changed files with 1 additions and 20 deletions
|
@ -66,24 +66,6 @@ local function resolve_config(theme_name)
|
||||||
return selected_theme.config
|
return selected_theme.config
|
||||||
end
|
end
|
||||||
|
|
||||||
local function configure_additional_autocmds()
|
|
||||||
local group = "_dashboard_settings"
|
|
||||||
vim.api.nvim_create_augroup(group, {})
|
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
|
||||||
group = group,
|
|
||||||
pattern = "alpha",
|
|
||||||
command = "set showtabline=0 | autocmd BufLeave <buffer> set showtabline=" .. vim.opt.showtabline._value,
|
|
||||||
})
|
|
||||||
if not lvim.builtin.lualine.options.globalstatus then
|
|
||||||
-- https://github.com/goolord/alpha-nvim/issues/42
|
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
|
||||||
group = group,
|
|
||||||
pattern = "alpha",
|
|
||||||
command = "set laststatus=0 | autocmd BufUnload <buffer> set laststatus=" .. vim.opt.laststatus._value,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function M.setup()
|
function M.setup()
|
||||||
local status_ok, alpha = pcall(require, "alpha")
|
local status_ok, alpha = pcall(require, "alpha")
|
||||||
if not status_ok then
|
if not status_ok then
|
||||||
|
@ -98,7 +80,6 @@ function M.setup()
|
||||||
end
|
end
|
||||||
|
|
||||||
alpha.setup(config)
|
alpha.setup(config)
|
||||||
configure_additional_autocmds()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -8,7 +8,7 @@ M.config = function()
|
||||||
component_separators = nil,
|
component_separators = nil,
|
||||||
section_separators = nil,
|
section_separators = nil,
|
||||||
theme = nil,
|
theme = nil,
|
||||||
disabled_filetypes = nil,
|
disabled_filetypes = { statusline = { "alpha" } },
|
||||||
globalstatus = true,
|
globalstatus = true,
|
||||||
},
|
},
|
||||||
sections = {
|
sections = {
|
||||||
|
|
Loading…
Reference in a new issue