kristijanhusak / vim-dadbod-completion

Database autocompletion powered by https://github.com/tpope/vim-dadbod

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nvim-cmp source name "vim-dadbod-completion" causes error when trying to set the source name.

rajprakharpatel opened this issue · comments

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

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.