How to create an auto-command to automatically load the session? #101
Replies: 2 comments 7 replies
-
vim.schedule(function()
require('persistence').load()
end) |
Beta Was this translation helpful? Give feedback.
6 replies
Answer selected by
gbroques
-
|
I have an issue in autocmd approach when I add a new plugin, on startup lazy runs a floating window, so either it loads a session into a floating window or I swap to a background window, load it and get back to lazy, but then lazy gets closed as soon as it's done with installation. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Can you help me write an auto-command to load the session automatically?
Here's what I tried:
This loads the session, but my syntax highlighting breaks.
I have treesitter lazy loaded on
{ 'BufReadPre', 'BufNewFile' }events.Users on Reddit reported a similar problem:
https://www.reddit.com/r/neovim/comments/111ne7r/having_trouble_autorestoring_sessions_using/
Beta Was this translation helpful? Give feedback.
All reactions