nvim-cmp source name "vim-dadbod-completion" causes error when trying to set the source name.
rajprakharpatel opened this issue · comments
Rajprakhar commented
when assigning name of source to vim-dadbod-completion
in nvim-cmp it causes errors.
In lua having dashed key in tables causes problems.
I have fixed it for myself by changing source name at vim-dadbod-completion.lua to vim_dadbod_completion
Rajprakhar commented
I just found out that there is a way to make dashedcase identifiers key in lua by not so good looking syntax, by enclosing it in quotes and square brackets.
such as
table = { ['vim-dadbod-completion'] = "[DB]" }
so sorry should have googled more.