Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coc-lua break with new language server #71

Closed
Maswor opened this issue Jul 3, 2021 · 8 comments
Closed

Coc-lua break with new language server #71

Maswor opened this issue Jul 3, 2021 · 8 comments

Comments

@Maswor
Copy link

Maswor commented Jul 3, 2021

When prompted for updating new version of lua language server, I processed and get the following errors:

[coc.nvim] [14:13:56.486][error][#0:script/library.lua:233]: script/library.lua:197: attempt to call a nil value (field 'get')
[coc.nvim] Server lua failed to start: Error: [14:13:56.486][error][#0:script/library.lua:233]: script/library.lua:197: attempt to call a nil value (field 'get')

cos-lua: 1.0.1
neovim: 0.5 stable

Thank you and best regards!

@numToStr
Copy link

numToStr commented Jul 3, 2021

The same is happening with me.

@lc9er
Copy link

lc9er commented Jul 4, 2021

Same here. Installed neovim 0.5, was prompted to run CocCommand lua.update. That failed. I uninstalled and resinstalled coc-lua and get the following:

[coc.nvim] [21:17:06.230][error][#0:script\library.lua:233]: script\library.lua:197: attempt to call a nil value (field 'get')
stack traceback:
        script\library.lua:233: in upvalue 'initFromMetaDoc'
        script\library.lua:237: in upvalue 'init'
        script\library.lua:241: in function 'library.init'
        script\provider\provider.lua:82: in function <script\provider\provider.lua:80>
        [C]: in function 'xpcall'
[coc.nvim] Server lua failed to start: Error: [21:17:06.230][error][#0:script\library.lua:233]: script\library.lua:197: attempt to call a nil value (field 'get')

@cjnucette
Copy link

I've got the same problem. As a workaround I did the following: first, I did a rm -rf sumneko-lua-ls in ~/.config/coc/extensions/coc-lua-data/, next I downloaded an previous version (2.0.5 in my case) from https://github.com/josa42/coc-lua-binaries/releases, then extracted it, and finally renamed it as sumneko-lua-ls. See #65 for clarification.
I hope this helps.

@lc9er
Copy link

lc9er commented Jul 5, 2021

I've got the same problem. As a workaround I did the following: first, I did a rm -rf sumneko-lua-ls in ~/.config/coc/extensions/coc-lua-data/, next I downloaded an previous version (2.0.5 in my case) from https://github.com/josa42/coc-lua-binaries/releases, then extracted it, and finally renamed it as sumneko-lua-ls. See #65 for clarification.
I hope this helps.

This worked perfectly. Thank you!

Note for Windows users, the path to the coc-lua-data dir is slightly different. You'll probably find the directory here: ~\AppData\Local\coc\extensions\coc-lua-data.

@oblitum
Copy link

oblitum commented Jul 6, 2021

Yep, this is actually a duplicate of #65. coc-lua just doesn't update coc-lua-binaries, if you scrap it and its coc-lua-data directory, it works fine.

@poetaman
Copy link

poetaman commented Jul 7, 2021

Same problem here!

@oblitum
Copy link

oblitum commented Jul 7, 2021

There's 5 issues currently open, 4 of them are about this update thing.

@oblitum
Copy link

oblitum commented Aug 1, 2021

I highly recommend coc-sumneko-lua over coc-lua, which currently is not being actively maintained.

@josa42 josa42 closed this as completed Feb 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants