aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lua/startup/init.lua15
-rw-r--r--readme.md14
2 files changed, 23 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
diff --git a/readme.md b/readme.md
index bed57a7..d9e14dc 100644
--- a/readme.md
+++ b/readme.md
@@ -279,6 +279,20 @@ The same applies to headers.
Here you can use them with `require("startup.headers").header_name`.
They are documented in `:help startup_nvim.headers`.
A good tool to create your own headers is [image to braille](https://505e06b2.github.io/Image-to-Braille/).
+
+Conflicts with other plugins like auto-session
+----------------------------------------------
+If this plugin conflict with other plugins you can disable it on startup.
+For this you need to set `vim.g.startup_disable_on_startup` to `true`.
+You can do that like this:
+```lua
+config = function()
+ vim.g.startup_disable_on_startup = true
+ require("startup").setup(require("configs.startup_nvim"))
+end
+```
+
+You can still display it later then with `:Startup display`.
👀 Screenshots
--------------