Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Error when triggering completion #61

Open
marekdedic opened this issue Dec 21, 2022 · 0 comments
Open

Error when triggering completion #61

marekdedic opened this issue Dec 21, 2022 · 0 comments

Comments

@marekdedic
Copy link

Result from CocInfo

## versions

vim version: NVIM v0.7.2
node version: v18.12.1
coc.nvim version: 0.0.82-75f2b7eb 2022-12-06 00:50:36 +0800
coc.nvim directory: /home/marekdedic/.local/share/nvim/plugged/coc.nvim
term: tmux
platform: linux

## Log of coc.nvim

2022-12-09T23:50:39.090 INFO (pid:230614) [plugin] - coc.nvim initialized with node: v18.12.1 after 216
2022-12-09T23:50:39.103 INFO (pid:230614) [language-client-index] - Language server "svelte" started with 230629
2022-12-09T23:50:39.343 INFO (pid:230614) [attach] - receive notification: highlight []
2022-12-09T23:50:40.405 INFO (pid:230614) [attach] - receive notification: highlight []
2022-12-09T23:50:44.019 INFO (pid:230614) [attach] - receive notification: showInfo []

Describe the bug

I get an error when CoC completion is triggered

[coc.nvim]: UnhandledRejection: Cannot read properties of null (reading 'word')
TypeError: Cannot read properties of null (reading 'word')
    at Ov.convertVimCompleteItem (/home/marekdedic/.local/share/nvim/plugged/coc.nvim/build/index.js:214:9521)
    at Ov.convertToDurationItem (/home/marekdedic/.local/share/nvim/plugged/coc.nvim/build/index.js:214:9418)
    at /home/marekdedic/.local/share/nvim/plugged/coc.nvim/build/index.js:257:38120
    at Array.map (<anonymous>)
    at /home/marekdedic/.local/share/nvim/plugged/coc.nvim/build/index.js:257:38104

(Happens with coc-svelte, but the backtrace points tot coc itself...)

Reproduce the bug

We will close your issue when you don't provide minimal vimrc and we can't
reproduce it

  • Create file mini.lua with:
local Plug = vim.fn['plug#']

vim.call('plug#begin', vim.fn.stdpath('data') .. '/plugged')

Plug('neoclide/coc.nvim', {branch = 'release'})
Plug('coc-extensions/coc-svelte', {['do'] = 'yarn install --frozen-lockfile'})

vim.call('plug#end')
  • Start (neo)vim with command: nvim -u mini.lua
  • Start any completion by typing a single letter
  • You get the error

Previously reported to CoC as neoclide/coc.nvim#4426

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant