onsails / lspkind.nvim

vscode-like pictograms for neovim lsp completion items
MIT License
1.47k stars 36 forks source link

`init` is now requiring to pass empty table #41

Closed VVKot closed 2 years ago

VVKot commented 2 years ago

After https://github.com/onsails/lspkind-nvim/commit/5cd692b43a401c9635cc9c5bdb7fe7c62733b41d, the below will no longer work:

local lspkind = require("lspkind")
lspkind.init()

and raise an error:

...
E5113: Error while calling lua chunk: ...site/pack/packer/start/lspkind-nvim/lua/lspkind/init.lua:122: attempt to index local 'opts' (a nil value)
stack traceback:
        ...site/pack/packer/start/lspkind-nvim/lua/lspkind/init.lua:122: in function 'init'
        $HOME/.config/nvim/after/plugin/cmp.lua:3: in main chunk

The fix is to change the code to below - but ideally users are not forced to do this:

local lspkind = require("lspkind")
lspkind.init({})
onsails commented 2 years ago

thanks for reporting, should be fixed by #40