ray-x / lsp_signature.nvim

LSP signature hint as you type
Apache License 2.0
2.02k stars 57 forks source link

"Vim:E36: Not enough room" Error on trigger #216

Closed hahuang65 closed 1 year ago

hahuang65 commented 2 years ago

Happens with sumneko_lua LSP:

E36: Not enough room
Error executing vim.schedule lua callback: ...m/HEAD-0c6b398_1/share/nvim/runtime/lua/vim/lsp/util.lua:1569: Vim(append):Error executing lua callback: vim/_meta.lua:0: Vim:E36: Not enough room
stack traceback:
        [C]: in function 'nvim_set_option_value'
        vim/_meta.lua: in function '_set'
        vim/_meta.lua: in function '__newindex'
        /Users/hhhuang/.config/nvim/lua/autocommands.lua:68: in function </Users/hhhuang/.config/nvim/lua/autocommands.lua:53>
        [C]: in function 'nvim_open_win'
        ...m/HEAD-0c6b398_1/share/nvim/runtime/lua/vim/lsp/util.lua:1569: in function 'open_floating_preview'
        ...cker/start/lsp_signature.nvim/lua/lsp_signature/init.lua:471: in function 'handler'
        ...neovim/HEAD-0c6b398_1/share/nvim/runtime/lua/vim/lsp.lua:1389: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>
stack traceback:
        [C]: in function 'nvim_open_win'
        ...m/HEAD-0c6b398_1/share/nvim/runtime/lua/vim/lsp/util.lua:1569: in function 'open_floating_preview'
        ...cker/start/lsp_signature.nvim/lua/lsp_signature/init.lua:471: in function 'handler'
        ...neovim/HEAD-0c6b398_1/share/nvim/runtime/lua/vim/lsp.lua:1389: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>
hahuang65 commented 1 year ago

This is happening because I'm trying to set vim.opt_local.winbar on BufWinEnter, and I guess it's trying to do so on the signature float.

This is not an issue for this project. Thank you!

ray-x commented 1 year ago

FYI, the 'filetype' of the signature floating window will be empty (unset), and the bufnr will be stored in global _LSP_SIG_CFG.bufnr. You can update your autocmd hook functions by filtering those out.

hahuang65 commented 1 year ago

Awesome! Thanks for the info!