ray-x / lsp_signature.nvim

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

[Bug] Error executing vim.schedule #250

Closed YuCao16 closed 1 year ago

YuCao16 commented 1 year ago

This bug may not be a problem with lsp_signature.nvim, but I still hope you can take a look at it.

Reproduce:

  1. Install pandas and pandas-stubs library (python and pip)
  2. create a python script with following code (put cursor inside quote)
    import pandas as pd
    pd.read_csv("")

    Then following error appear:

    Error executing vim.schedule lua callback: ...lar/neovim/0.8.1/share/nvim/runtime/lua/vim/lsp/util.lua:1577: String cannot contain newlines                                                                          
    stack traceback:                                                                                                                                                                                                     
        [C]: in function 'nvim_buf_set_lines'                                                                                                                                                                        
        ...lar/neovim/0.8.1/share/nvim/runtime/lua/vim/lsp/util.lua:1577: in function 'open_floating_preview'                                                                                                        
        ...packer/opt/lsp_signature.nvim/lua/lsp_signature/init.lua:520: in function 'handler'                                                                                                                       
        ...w/Cellar/neovim/0.8.1/share/nvim/runtime/lua/vim/lsp.lua:1383: in function ''                                                                                                                             
        vim/_editor.lua: in function <vim/_editor.lua:0>   

If I uninstall pandas-stubs, then the error will not arise.

ray-x commented 1 year ago

Could you check if it still occurs in the latest version?

kasfil commented 1 year ago

i had similar issue while using pytest updated to the master branch. i can confirm this issue already fixed