ray-x / lsp_signature.nvim

LSP signature hint as you type
Apache License 2.0
2.01k stars 56 forks source link

Error executing vim.schedule lua callback ... String cannot contain newlines #254

Closed RayJameson closed 1 year ago

RayJameson commented 1 year ago

Hello @ray-x! THanks for your wonderful plugin. I'm having this problem when I use signature help inside of python's asyncio.gather()

Some info: Action LSP lsp_signature.nvim Result
use vim.lsp.buf.signature_help() jedi_language_server disabled OK ✅
go insert mode or use vim.lsp.buf.signature_help() pylsp (python-language-server) enabled OK ✅
go insert mode or use vim.lsp.buf.signature_help() jedi_language_server enabled ERROR ❌
Error executing vim.schedule lua callback: ...lar/neovim/0.8.2/share/nvim/runtime/lua/vim/lsp/util.lua:1314: String cannot contain newlines
stack traceback:
        [C]: in function 'nvim_buf_set_lines'
        ...lar/neovim/0.8.2/share/nvim/runtime/lua/vim/lsp/util.lua:1314: in function 'stylize_markdown'
        ...lar/neovim/0.8.2/share/nvim/runtime/lua/vim/lsp/util.lua:1572: in function 'open_floating_preview'
        ...cker/start/lsp_signature.nvim/lua/lsp_signature/init.lua:517: in function 'handler'
        ...w/Cellar/neovim/0.8.2/share/nvim/runtime/lua/vim/lsp.lua:1383: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>

I have lsp_signature.log for both cases when plugin is enabled but I'm not comfortable sharing them here in open format. I can send them directly to you

ray-x commented 1 year ago

Thanks, I pushed a fix fir it. Could you check if it works for you?

RayJameson commented 1 year ago

Yes it's OK now, thanks a lot for fast response and fix!