mawkler / refjump.nvim

Jump to next/previous LSP reference for item under cursor with ]r/[r
MIT License
41 stars 1 forks source link

bug: cannot setup without providing empty table #1

Closed Quitlox closed 2 months ago

Quitlox commented 2 months ago

Setting up the plugin without providing arguments, like so:

require('refjump.nvim').setup()

results in the following error:

E5108: Error executing lua vim/shared.lua:0: after the second argument: expected table, got nil
stack traceback:
        [C]: in function 'error'
        vim/shared.lua: in function 'validate'
        vim/shared.lua: in function 'tbl_deep_extend'
        .../site/pack/rocks/start/refjump.nvim/lua/refjump/init.lua:45: in function 'setup'
        [string ":lua"]:1: in main chunk

It would be nice if the argument was optional, as this plays nicer with some plugin managers.

mawkler commented 2 months ago

Fixed in c630682f02d06552947578367034d9f9db500526! Thanks for reporting this. It's ironic because this annoys me a lot when plugins require an argument to .setup() but I completely forgot about when making this plugin lol.