diff options
author | max397574 <[email protected]> | 2022-01-31 10:41:31 +0100 |
---|---|---|
committer | max397574 <[email protected]> | 2022-01-31 10:41:31 +0100 |
commit | 177af37a9066c08236f3e68d36307ca8f7c704e6 (patch) | |
tree | ee6a2bf7e2bbcb29368043d129229f3e5fefcabf /lua | |
parent | 4e8d8c513d5d00d670d375970c540a640ad69f1e (diff) |
feat(init): allow to disable on startup with variable
Diffstat (limited to 'lua')
-rw-r--r-- | lua/startup/init.lua | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lua/startup/init.lua b/lua/startup/init.lua index 3fa0cc1..2227555 100644 --- a/lua/startup/init.lua +++ b/lua/startup/init.lua @@ -545,14 +545,17 @@ function startup.setup(update) vim.cmd( [[command! -nargs=* Startup :lua require'startup'.commands('<args>')]] ) - vim.cmd( - [[autocmd VimEnter * lua if vim.fn.argc() == 0 then require("startup").display() end + if not vim.g.startup_disable_on_startup then + print("yes") + vim.cmd( + [[autocmd VimEnter * lua if vim.fn.argc() == 0 then require("startup").display() end autocmd BufRead * lua if vim.fn.argc() == 0 then require("startup").display() end]] - ) - vim.cmd( - [[autocmd VimResized * lua if vim.bo.ft == "startup" then require"startup".redraw() end + ) + vim.cmd( + [[autocmd VimResized * lua if vim.bo.ft == "startup" then require"startup".redraw() end autocmd BufEnter * lua if vim.bo.ft == "startup" then require"startup".redraw() end]] - ) + ) + end end ---Clears the screen and redraws the whole startup screen |