[BUG] checkhealth reports attempt to call field 'debug' and plugin doesn’t work
Describe the bug Healthcheck fails due to the plugin and the plugin does not work.
To Reproduce
Install with vim-plug on Neovim 0.11.0 and run :checkhealth
Expected behavior Successful healthcheck.
Checkhealth
auto-session: require("auto-session.health").check()
vim options ~
- OK vim.o.sessionoptions
Lazy.nvim settings ~
- Lazy.nvim not loaded
Config ~
- OK {}
General Info ~
- ERROR Failed to run healthcheck for "auto-session" plugin. Exception:
...hare/nvim/plugged/auto-session/lua/auto-session/init.lua:318: attempt to call field 'debug' (a nil value)
Baseline (please complete the following information):
- Result of
set sessionoptions?: sessionoptions=blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions - OS. e.g
uname -a: Darwin arm64 - Neovim version
nvim --version0.11.0 - URL to your current config (if public)
Additional context —
I'm not too familiar with vim-plug but the issue is happening because setup is not being called. You can call setup with something like:
call plug#begin()
Plug 'rmagatti/auto-session'
call plug#end()
" add any configuration here
lua require('auto-session').setup({})
I'll add a note to the readme about making sure setup is called.
Yup, that does it. Thank you!
Strangely, I think on an older installation my config did not have the setup line and worked, so it was confusing for a moment because other than plugin version everything was the same. Who knows…
Based on the code history, I think some versions from a few years ago that did some initialization in vimscript and may not have needed the setup call so maybe that was it?
Either way, glad it's working now!
Can close it I guess, but doc changes definitely make sense. Do you want keep it open until doc changes are merged in?
Yeah, let's keep it open until the doc/checkhealth changes are merged.