E5108: Error executing lua /usr/share/nvim/runtime/lua/vim/lsp/handlers.lua:438: bad argument #2 to 'format' (number expected, got nil)
See original GitHub issuehello there!
sorry for the giant issue name. i wanted to make it easy to search for later (anyway i can edit it). and maybe this might be lsp problem itself and not kls (sorry again).
when using :lua vim.lsp.buf.implementation()
on a Kotlin interface, the output is: E5108: Error executing lua /usr/share/nvim/runtime/lua/vim/lsp/handlers.lua:438: bad argument #2 to 'format' (number expected, got nil)
. the same does not occur when using on a TypeScript interface (with tsserver obviously), and that’s why i am opening the issue here and not at lsp-config codebase.
i am running
- NVIM v0.6.0-dev+434-g7f93b2ab0
- kotlin-language-server 4963762 commit
am i missing anything? could anyone help me please?
EDIT 1 My lsp-config:
lua require'lspconfig'.kotlin_language_server.setup{ on_attach = require'completion'.on_attach }
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
bad argument #3 to 'format' (number expected, got nil) #3384
42: bad argument #3 to 'format' (number expected, got nil)] 06/Feb/2020 09:53:13 [LuaEngine.cpp:12472] WARNING: Script failure ...
Read more >Lua error: string expected, got nil --- bad argument #2
In your loop where you define questions add a line before "obj.answer =": obj.question = string.format("%s x %s", left, right).
Read more >Bad argument #2 (number expected, got nil) - Defold Forum
When I run the program, it shows the error: ERROR:SCRIPT: /main/test.script:112: bad argument #2 to 'find_in_string' (number expected, got ...
Read more >Runtime error Bad argument #-2 - Solar2D Forums
I'm getting this error when I try to use gotoScene Runtime error bad argument #-2 to 'insert' (Proxy expected, got nil) stack traceback:...
Read more >bad argument #1 to 'cos' (number expected, got nil) - LÖVE
Hello all. Call me stupid, but I now simplified my failure condition to a point where I cant understand the problem at all....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is now fixed in neovim
From what I can tell, this looks like a bug in the Neovim LSP client rather than a KLS bug. Looking at the corresponding line, it seems as if the
client_id
is missing. Googling the issue suggests that the problem is having multiple language servers attached to the buffer: