-
Notifications
You must be signed in to change notification settings - Fork 90
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
fix "error executing lua callback ... attempt to concatenate local 'method' (a table value)" #211
Conversation
…ethod' (a table value)" After updating my plugins I his this error, while editing a shell script. Other LSPs seem to work fine. ``` Error detected while processing InsertLeave Autocommands for "*": Error executing lua callback: .../.local/share/nvim/lazy/none-ls.nvim/lua/null-ls/rpc.lua:131: attempt to concatenate local 'method' (a table value) stack traceback: .../.local/share/nvim/lazy/none-ls.nvim/lua/null-ls/rpc.lua:131: in function 'notify' ...art/usr/neovim/share/nvim/runtime/lua/vim/lsp/client.lua:784: in function 'notify' ...ocal/share/nvim/lazy/none-ls.nvim/lua/null-ls/client.lua:205: in function 'notify_client' .../.local/share/nvim/lazy/none-ls.nvim/lua/null-ls/rpc.lua:149: in function 'flush' ....local/share/nvim/lazy/none-ls.nvim/lua/null-ls/init.lua:49: in function <....local/share/nvim/lazy/none-ls.nvim/lua/null-ls/init.lua:48> ``` It would seem that the `method` passed to `dispatchers.notify()` method is a table, not a string. I have used `vim.inspect(method)` to convert that `method` table to a string before concatenation. Problem went away, LSP working fine in bash.
I believe this is likely the same issue with #209. Are you using nightly? |
I could not reproduce this (both on nightly and stable). Can you attach an example of the table in question? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
method
MUST be a string. see :h vim.lsp.rpc.start()
.
none-ls.nvim/lua/null-ls/client.lua Lines 204 to 209 in 8fd7b29
I met the same problem. I changed the line 205
|
hi @jiangyinzuo, what neovim commit are you on? |
Oh, I updated to the latest commit and then no error occurred. Thanks. |
tldr: update to latest nightly. |
I updated nvim and none-ls.nvim to latest commits, and problem went away. thank you. |
After updating my plugins I his this error, while editing a shell script. Other LSPs seem to work fine.
It would seem that the
method
passed todispatchers.notify()
method is a table, not a string.I have used
vim.inspect(method)
to convert thatmethod
table to a string before concatenation.Problem went away, LSP working fine in bash.