anuvyklack / pretty-fold.nvim

Foldtext customization in Neovim
Apache License 2.0
441 stars 21 forks source link

Getting error `attempt to index local 'config' (a nil value)` #11

Closed farzadmf closed 2 years ago

farzadmf commented 2 years ago

Hi, I have a specific setup when doing diff comparisons, and when doing diffs, they have a fold for the parts the are the same between the two splits.

I'm getting an error:

...d/.vim/plugged/pretty-fold.nvim/lua/pretty-fold/init.lua:76: attempt to index local 'config' (a nil value)
stack traceback:
^I...d/.vim/plugged/pretty-fold.nvim/lua/pretty-fold/init.lua:76: in function <...d/.vim/plugged/pretty-fold.nvim/lua/pretty-fold/init.lua:69> function: builtin#18 ...d/.vim/plugged/pretty-fold.nvim/lua/pretty-fold/init.lua:76: attempt to index local 'config' (a nil value
)
stack traceback:
^I...d/.vim/plugged/pretty-fold.nvim/lua/pretty-fold/init.lua:76: in function <...d/.vim/plugged/pretty-fold.nvim/lua/pretty-fold/init.lua:69> function: builtin#18 ...d/.vim/plugged/pretty-fold.nvim/lua/pretty-fold/init.lua:76: attempt to index local 'config' (a nil value
)
stack traceback:
^I...d/.vim/plugged/pretty-fold.nvim/lua/pretty-fold/init.lua:76: in function <...d/.vim/plugged/pretty-fold.nvim/lua/pretty-fold/init.lua:69> function: builtin#18 ...d/.vim/plugged/pretty-fold.nvim/lua/pretty-fold/init.lua:76: attempt to index local 'config' (a nil value
)
...

and it keeps repeating and repeating. Unfortunately, I'm not exactly sure under what circumstances I'm getting the error, but I know it's in the context of comparing 2 diff splits.

My setup is from the README:

Plug 'anuvyklack/pretty-fold.nvim'

And:

require('pretty-fold').setup{}
require('pretty-fold.preview').setup_keybinding()

Please tell me if there's any additional information I can provide