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

Config not working? #76

Open
superDuperCyberTechno opened this issue Apr 12, 2023 · 3 comments
Open

Config not working? #76

superDuperCyberTechno opened this issue Apr 12, 2023 · 3 comments

Comments

@superDuperCyberTechno
Copy link

I've tried multiple things so far, the config does not seem to be read.

Here's what I have in my init.lua:

require("auto-save").setup {
    enabled = false,
    trigger_events = {"FocusLost"}
}

It ignores both clauses (not only is it enabled, it also saves when exiting insert mode).

@primeapple
Copy link

Yes, this plugin doesn't read the configs correctly.
You could try out the maintained fork (still WIP, the API could change): https://github.com/okuuva/auto-save.nvim

It also does already incorporate the FocusLost event.

@superDuperCyberTechno
Copy link
Author

Thanks, I ended up just doing it manually:

vim.api.nvim_create_autocmd({'FocusLost'}, {
        command = 'silent! wa'
    })

kajirikajiri added a commit to kajirikajiri/dotfiles that referenced this issue Dec 12, 2023
メンテされていないようなので変更した。オプションがうまく読み込まれていなかったが読み込まれるようになった。
pocco81/auto-save.nvim#76 (comment)
@kqvanity
Copy link

Apparently, this plugin is no longer maintained. The author should at least signal that's it's now archived.

@superDuperCyberTechno
I think bufdo is more efficient

api.nvim_create_autocmd( "FocusLost" , { command = "silent bufdo update" })

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

No branches or pull requests

3 participants