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
Thanks for the great plugin. I found out that if we don't call setup() function when configuring the plugin, then the buffers array in autosave is nil. This results in the following error whenever we try to invoke an action that access that variable:
E5108: Error executing lua: ...l/share/nvim/lazy/autosave.nvim/lua/autosave/actions.lua:61: attempt to index field 'buffers' (a nil value)
stack traceback:
...l/share/nvim/lazy/autosave.nvim/lua/autosave/actions.lua:61: in function 'buf_enable'
To replicate configure the plugin using Lazy.nvim with default values as below:
{
'nullishamy/autosave.nvim',
lazy=true
}
Open any document and try to enable autosave using the buf_enable() action:
:lua require('autosave.actions').buf_enable()
See the attempt to index field 'buffers' (a nil value)' appears. If we call setup({}) before calling the action then everything works as expected.
The text was updated successfully, but these errors were encountered:
Thanks for the great plugin. I found out that if we don't call
setup()
function when configuring the plugin, then the buffers array inautosave
is nil. This results in the following error whenever we try to invoke an action that access that variable:To replicate configure the plugin using Lazy.nvim with default values as below:
Open any document and try to enable autosave using the
buf_enable()
action:See the
attempt to index field 'buffers' (a nil value)'
appears. If we callsetup({})
before calling the action then everything works as expected.The text was updated successfully, but these errors were encountered: