iamcco / coc-vimlsp

viml language server
216 stars 7 forks source link

Invalid buffer id error messages when using fzf-lua #40

Closed shyun3 closed 3 years ago

shyun3 commented 3 years ago

Describe the bug Calling certain fzf-lua commands causes error messages such as the following to pop up:

[coc.nvim]: Error on BufEnter: request error nvim_buf_get_option - Invalid buffer id: 32
Error
    at ML.request (/home/shyun3/.config/nvim/bundle/coc.nvim/build/index.js:20:34604)
    at ML.getOption (/home/shyun3/.config/nvim/bundle/coc.nvim/build/index.js:20:35234)
    at Object.<anonymous> (/home/shyun3/.config/coc/extensions/node_modules/coc-vimlsp/out/index.js:2:1648)
    at /home/shyun3/.config/coc/extensions/node_modules/coc-vimlsp/out/index.js:2:5290
    at Object.next (/home/shyun3/.config/coc/extensions/node_modules/coc-vimlsp/out/index.js:2:5395)
    at /home/shyun3/.config/coc/extensions/node_modules/coc-vimlsp/out/index.js:2:4332
    at new Promise (<anonymous>)
    at Module.l (/home/shyun3/.config/coc/extensions/node_modules/coc-vimlsp/out/index.js:2:4077)
    at m (/home/shyun3/.config/coc/extensions/node_modules/coc-vimlsp/out/index.js:2:1531)
    at Object.<anonymous> (/home/shyun3/.config/coc/extensions/node_modules/coc-vimlsp/out/index.js:2:2094)

:CocInfo recorded the error as follows:

2021-09-25T23:44:26.562 ERROR (pid:5424) [node-client] - request error on "nvim_buf_get_option" [ 'iskeyword' ] Invalid buffer id: 32 Error
    at ML.request (/home/shyun3/.config/nvim/bundle/coc.nvim/build/index.js:20:34604)
    at ML.getOption (/home/shyun3/.config/nvim/bundle/coc.nvim/build/index.js:20:35234)
    at Object.<anonymous> (/home/shyun3/.config/coc/extensions/node_modules/coc-vimlsp/out/index.js:2:1648)
    at /home/shyun3/.config/coc/extensions/node_modules/coc-vimlsp/out/index.js:2:5290
    at Object.next (/home/shyun3/.config/coc/extensions/node_modules/coc-vimlsp/out/index.js:2:5395)
    at /home/shyun3/.config/coc/extensions/node_modules/coc-vimlsp/out/index.js:2:4332
    at new Promise (<anonymous>)
    at Module.l (/home/shyun3/.config/coc/extensions/node_modules/coc-vimlsp/out/index.js:2:4077)
    at m (/home/shyun3/.config/coc/extensions/node_modules/coc-vimlsp/out/index.js:2:1531)
    at Object.<anonymous> (/home/shyun3/.config/coc/extensions/node_modules/coc-vimlsp/out/index.js:2:2094)

To Reproduce Steps to reproduce the behavior:

  1. Open a .vim file.
  2. Execute :FzfLua help_tags. Other fzf-lua commands can also trigger the error but this may be the simplest.

Expected behavior No error message to appear.

Using coc-vimlsp v0.12.2 reduces the number of such errors but it is still possible to trigger.

Desktop (please complete the following information):

shyun3 commented 3 years ago

Fixed by #41