From d7522a940d3f0eb5c0b7d2c591f7900d89170569 Mon Sep 17 00:00:00 2001 From: zbirenbaum Date: Fri, 8 Apr 2022 23:04:35 -0400 Subject: [PATCH] add disable option for statusline hide au --- lua/core/autocmds.lua | 4 +++- lua/core/default_config.lua | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/core/autocmds.lua b/lua/core/autocmds.lua index 362f0d3..7d83b74 100644 --- a/lua/core/autocmds.lua +++ b/lua/core/autocmds.lua @@ -12,7 +12,9 @@ if not settings.terminal_numbers then end -- Don't show status line on certain windows -vim.cmd [[ autocmd BufEnter,BufRead,BufWinEnter,FileType,WinEnter * lua require("core.utils").hide_statusline() ]] +if not require("core.utils").load_config().plugins.options.statusline.hide_disable then + vim.cmd [[ autocmd BufEnter,BufRead,BufWinEnter,FileType,WinEnter * lua require("core.utils").hide_statusline() ]] +end -- Open a file from its last left off position -- vim.cmd [[ au BufReadPost * if expand('%:p') !~# '\m/\.git/' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif ]] diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 2647d12..6fc3676 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -129,6 +129,7 @@ M.plugins = { snippet_path = {}, }, statusline = { + hide_disable = false, -- hide, show on specific filetypes hidden = { "help",