You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(dev): allow the plugin to work with Lazy reload
## Details
Using `Lazy reload render-markdown.nvim` would be convenient for
development, however how lazy handles the reload results in any created
autocommands being deleted, which basically stops the plugin from
working.
To fix this we essentially need to re-run the plugin directory on
reload, which lazy does do, however the value of
`vim.g.loaded_render_markdown` persists which results in early termination.
To fix this use a lua variable, we'll call it enabled, which does
persist the value locally, but does get reverted back to `false` when
lazy does it's module unloading thing.
This will result in the autocommands being re-created solving the main
problem.
I've renamed the various `setup` functions to `init` to distinguish
better between initialization and configuration. The `log` module now
has an `init` and a `setup` function, with the autocommand being created
in the new `init` function.
Move all cache invalidation logic to `state` module, results in an even
more simplified `init` module and `state` is probably a more fitting
place for it.
0 commit comments