Skip to content

Conversation

@mattserrano
Copy link

@mattserrano mattserrano commented Dec 29, 2025

#301

Selecting the "Sync on startup" setting and restarting Obsidian results in a "taking a long time to load" error. Currently the only workaround is to open the vault in safe mode, disable the option, and restart Obsidian.

This change moves the syncOnBoot logic to an onLayoutReady callback as described in Obsidian's best practices guide:

https://docs.obsidian.md/plugins/guides/load-time

If you have code that you want to run at startup, where should it go?
For most cases, you will want to wrap your code inside a onLayoutReady callback. These callbacks are deferred and are only called after Obsidian finishes loading.

With this change, Obsidian is able to load the vault as expected, and the highlight sync is performed in the background without pressing the "Sync..." button.

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.

1 participant