Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Synchronous session load on startup (#28) #117

Merged
merged 1 commit into from
May 5, 2024

Conversation

k1rowashere
Copy link
Contributor

Adds option to load session synchronously on startup to prevent flickering of the intro-screen.
(with readme changes to show how to make it fast)

Implements the solution shown in #28 (comment).

demo: (first run without option, second with)
Screencast from 2024-04-30 18-56-56.webm

@Shatur
Copy link
Owner

Shatur commented May 1, 2024

Thank you!
I tried it and it works just fine without any additional tweaking.
I think that we should make it a non-configurable default behavior.

@k1rowashere k1rowashere changed the title feat: autoload_sync fix: Synchronous session load on startup (#28) May 1, 2024
@k1rowashere
Copy link
Contributor Author

I think this should be labeled as a fix.

@Shatur
Copy link
Owner

Shatur commented May 1, 2024

Ah, sorry, I wanted to say that we don't need to vim.schedule at all 😄
I originally wrote this plugin long time ago and didn't have this knowledge back then, but there is a nice video from one of the Neovim main developers.
After looking at this code now, I think that we should just drop vim.schedule at all.

@Shatur Shatur linked an issue May 1, 2024 that may be closed by this pull request
@k1rowashere
Copy link
Contributor Author

I assumed there was a reason for the vim.schedule so I initially kept it lol.
I reverted everything and just removed vim.schedule from utils.load_session

@Shatur
Copy link
Owner

Shatur commented May 1, 2024

Thank you! Let me use this branch for a few days, maybe I will catch some issues.

@Shatur
Copy link
Owner

Shatur commented May 5, 2024

Works perfectly!

@Shatur Shatur merged commit 892c55f into Shatur:master May 5, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flickering and annoying experience during opening nvim
2 participants