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

The dim setting doesn't work when the plugin is lazy-loaded #26

Closed
jqno opened this issue Jun 28, 2023 · 2 comments · Fixed by #27
Closed

The dim setting doesn't work when the plugin is lazy-loaded #26

jqno opened this issue Jun 28, 2023 · 2 comments · Fixed by #27

Comments

@jqno
Copy link

jqno commented Jun 28, 2023

Here's my lazy.nvim config:

return {
    'okuuva/auto-save.nvim',
    event = 'BufRead',

    opts = {
        execution_message = {
            dim = 0.4,
            cleaning_interval = 1000
        }
    }
}

The value of the dim setting doesn't work. This is because it's only read when VimEnter, ColorScheme or UIEnter is triggered:

api.nvim_create_autocmd({ "VimEnter", "ColorScheme", "UIEnter" }, {

Since I'm loading the plugin at BufRead, this happens after any of these events (unless I manually change the colorscheme later).

Also, I can't manually set the AutoSaveText highlight as a workaround, because that's only configured when dim is read.

@primeapple
Copy link
Collaborator

Thanks for the Report.

You are indeed right with your assumptions. I'll provide a PR to fix this.

@jqno
Copy link
Author

jqno commented Jul 5, 2023

Awesome, it works perfectly now. Thank you!

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 a pull request may close this issue.

2 participants