Closed NitroCao closed 6 months ago
Completion for Neovim Lua APIs doesn't work.
Add a line in createClient() function to check the value of variable library, it turns out that coc-semneko-lua uses nightly version instead of stable version.
createClient()
library
The line contains Promise { pending } is from console.log(await import_coc4.workspace.nvim.call('luaeval', 'vim.version().prerelease')); after printing the value of variable library. So we need to add await keyword in getTypesPath() function. https://github.com/xiyaowong/coc-sumneko-lua/blob/5f59b75e3d56c7bcef5d8c44b2828958a921bc69/src/neodev.ts#L33-L46
Promise { pending }
console.log(await import_coc4.workspace.nvim.call('luaeval', 'vim.version().prerelease'));
await
getTypesPath()
Environment
Describe the bug
Completion for Neovim Lua APIs doesn't work.
Debug
Add a line in
createClient()
function to check the value of variablelibrary
, it turns out that coc-semneko-lua uses nightly version instead of stable version.The line contains
Promise { pending }
is fromconsole.log(await import_coc4.workspace.nvim.call('luaeval', 'vim.version().prerelease'));
after printing the value of variablelibrary
. So we need to addawait
keyword ingetTypesPath()
function. https://github.com/xiyaowong/coc-sumneko-lua/blob/5f59b75e3d56c7bcef5d8c44b2828958a921bc69/src/neodev.ts#L33-L46