voldikss / coc-dash-complete

See https://github.com/voldikss/coc-extensions
5 stars 0 forks source link

Recent coc.nvim master branch change broke plugin #2

Open timtyrrell opened 2 years ago

timtyrrell commented 2 years ago

I could be mistaken, but I believe a commit to the master branch of coc.nvim broke completion for this plugin.

2022-04-18T07:37:52.458 INFO (pid:39091) [coc-git] - Looking for git in: git
2022-04-18T07:37:53.023 INFO (pid:39091) [services] - registered service "stylelintplus"
2022-04-18T07:37:53.217 INFO (pid:39091) [plugin] - coc.nvim initialized with node: v16.13.1 after 1152ms
2022-04-18T07:37:53.316 INFO (pid:39091) [core-watchman] - watchman watching project: /Users/timothy.tyrrell/code/timtyrrell/dotfiles
2022-04-18T07:37:53.364 INFO (pid:39091) [attach] - receive notification: highlight []
2022-04-18T07:37:53.418 INFO (pid:39091) [services] - registered service "vimlsp"
2022-04-18T07:37:53.418 INFO (pid:39091) [services] - vim language server state change: stopped => starting
2022-04-18T07:37:53.653 INFO (pid:39091) [services] - vim language server state change: starting => running
2022-04-18T07:37:53.659 INFO (pid:39091) [services] - service vimlsp started
2022-04-18T07:37:54.523 INFO (pid:39091) [attach] - receive notification: highlight []
2022-04-18T07:37:55.132 INFO (pid:39091) [attach] - receive notification: highlight []
2022-04-18T07:37:55.894 ERROR (pid:39091) [node-client] - TypeError: t.words is not iterable Error
    at NeovimClient2.echoError (/Users/timothy.tyrrell/.config/nvim/plugged/coc.nvim/build/index.js:11322:41)
    at Complete.completeSource (/Users/timothy.tyrrell/.config/nvim/plugged/coc.nvim/build/index.js:67509:17)
    at async Promise.all (index 4)
    at async Complete.completeSources (/Users/timothy.tyrrell/.config/nvim/plugged/coc.nvim/build/index.js:67437:5)
    at async Complete.doComplete (/Users/timothy.tyrrell/.config/nvim/plugged/coc.nvim/build/index.js:67408:5)
    at async Completion.startCompletion (/Users/timothy.tyrrell/.config/nvim/plugged/coc.nvim/build/index.js:68002:23)
    at async Completion.triggerCompletion (/Users/timothy.tyrrell/.config/nvim/plugged/coc.nvim/build/index.js:68193:5)
    at async Completion.onTextChangedI (/Users/timothy.tyrrell/.config/nvim/plugged/coc.nvim/build/index.js:68132:7)
2022-04-18T07:37:55.895 ERROR (pid:39091) [completion-complete] - Complete error: coc-dash-complete TypeError: t.words is not iterable
    at /Users/timothy.tyrrell/.config/coc/extensions/node_modules/coc-dash-complete/lib/index.js:1:1264
    at Array.forEach (<anonymous>)
    at i.gatherWords (/Users/timothy.tyrrell/.config/coc/extensions/node_modules/coc-dash-complete/lib/index.js:1:1218)
    at i.provideCompletionItems (/Users/timothy.tyrrell/.config/coc/extensions/node_modules/coc-dash-complete/lib/index.js:1:1030)
    at LanguageSource.doComplete (/Users/timothy.tyrrell/.config/nvim/plugged/coc.nvim/build/index.js:66125:58)
    at /Users/timothy.tyrrell/.config/nvim/plugged/coc.nvim/build/index.js:67474:32
    at new Promise (<anonymous>)
    at Complete.completeSource (/Users/timothy.tyrrell/.config/nvim/plugged/coc.nvim/build/index.js:67473:13)
    at /Users/timothy.tyrrell/.config/nvim/plugged/coc.nvim/build/index.js:67439:43
    at Array.map (<anonymous>)
</details>

mini.vim:

set nocompatible
filetype plugin indent on
syntax on
set hidden

let mapleader = ','

" https://github.com/junegunn/vim-plug#installation
call plug#begin('~/.config/nvim/plugged')

Plug 'neoclide/coc.nvim', {'branch': 'master', 'do': 'yarn install --frozen-lockfile'} |
           \ Plug 'antoinemadec/coc-fzf' |
           \ Plug 'wellle/tmux-complete.vim' " coc completion from open tmux panes
let g:coc_enable_locationlist = 0
          " \ 'coc-dash-complete',
let g:coc_global_extensions = [
          \ 'coc-coverage',
          \ 'coc-css',
          \ 'coc-cssmodules',
          \ 'coc-dash-complete',
          \ 'coc-db',
          \ 'coc-docker',
          \ 'coc-emmet',
          \ 'coc-emoji',
          \ 'coc-eslint',
          \ 'coc-git',
          \ 'coc-html',
          \ 'coc-import-cost',
          \ 'coc-jest',
          \ 'coc-json',
          \ 'coc-just-complete',
          \ 'coc-lists',
          \ 'coc-lua',
          \ 'coc-markdownlint',
          \ 'coc-marketplace',
          \ 'coc-pairs',
          \ 'coc-prettier',
          \ 'coc-pyright',
          \ 'coc-react-refactor',
          \ 'coc-sh',
          \ 'coc-snippets',
          \ 'coc-solargraph',
          \ 'coc-spell-checker',
          \ 'coc-styled-components',
          \ 'coc-stylelintplus',
          \ 'coc-svg',
          \ 'coc-swagger',
          \ 'coc-tsserver',
          \ 'coc-vimlsp',
          \ 'coc-webpack',
          \ 'coc-yaml',
          \ 'coc-yank'
          \ ]
call plug#end()

typing something like test- in various filetypes triggered it

Screen Shot 2022-04-18 at 7 39 50 AM

Also, I have seen:

Screen Shot 2022-04-18 at 7 36 34 AM
2022-04-18T07:26:40.072 WARN (pid:37665) [attach] - Plugin not ready when received "highlight" []
2022-04-18T07:26:40.379 INFO (pid:37665) [coc-git] - Looking for git in: git
2022-04-18T07:26:41.017 INFO (pid:37665) [services] - registered service "stylelintplus"
2022-04-18T07:26:41.204 INFO (pid:37665) [plugin] - coc.nvim initialized with node: v16.13.1 after 1223ms
2022-04-18T07:26:41.208 INFO (pid:37665) [attach] - receive notification: highlight []
2022-04-18T07:26:41.209 INFO (pid:37665) [attach] - receive notification: highlight []
2022-04-18T07:26:41.217 WARN (pid:37665) [workspace] - workspace.createStatusBarItem is deprecated, please use window.createStatusBarItem instead. 
    at Object.t.initStatusBar (/Users/timothy.tyrrell/.config/coc/extensions/node_modules/coc-spell-checker/out/index.js:1:155873)
    at Object.t.activate (/Users/timothy.tyrrell/.config/coc/extensions/node_modules/coc-spell-checker/out/index.js:1:23099)
2022-04-18T07:26:41.308 INFO (pid:37665) [core-watchman] - watchman watching project: /Users/timothy.tyrrell/code/timtyrrell/dotfiles
2022-04-18T07:26:41.419 INFO (pid:37665) [attach] - receive notification: highlight []
2022-04-18T07:26:41.431 INFO (pid:37665) [services] - registered service "vimlsp"
2022-04-18T07:26:41.431 INFO (pid:37665) [services] - vim language server state change: stopped => starting
2022-04-18T07:26:41.891 INFO (pid:37665) [attach] - receive notification: highlight []
2022-04-18T07:26:41.943 INFO (pid:37665) [services] - vim language server state change: starting => running
2022-04-18T07:26:41.949 INFO (pid:37665) [services] - service vimlsp started
2022-04-18T07:26:42.257 INFO (pid:37665) [attach] - receive notification: highlight []
2022-04-18T07:26:42.466 INFO (pid:37665) [attach] - receive notification: highlight []
2022-04-18T07:26:42.714 INFO (pid:37665) [attach] - receive notification: highlight []
2022-04-18T07:26:42.891 INFO (pid:37665) [attach] - receive notification: highlight []
2022-04-18T07:26:44.237 ERROR (pid:37665) [node-client] - Cannot read properties of undefined (reading 'charCodeAt') TypeError: Cannot read properties of undefined (reading 'charCodeAt')
    at Chars.isKeywordChar (/Users/timothy.tyrrell/.config/nvim/plugged/coc.nvim/build/index.js:28165:20)
    at Document.getWordRangeAtPosition (/Users/timothy.tyrrell/.config/nvim/plugged/coc.nvim/build/index.js:28714:20)
    at i.provideCompletionItems (/Users/timothy.tyrrell/.config/coc/extensions/node_modules/coc-dash-complete/lib/index.js:1:918)
    at LanguageSource.doComplete (/Users/timothy.tyrrell/.config/nvim/plugged/coc.nvim/build/index.js:66125:58)
    at /Users/timothy.tyrrell/.config/nvim/plugged/coc.nvim/build/index.js:67474:32
    at new Promise (<anonymous>)
    at Complete.completeSource (/Users/timothy.tyrrell/.config/nvim/plugged/coc.nvim/build/index.js:67473:13)
    at /Users/timothy.tyrrell/.config/nvim/plugged/coc.nvim/build/index.js:67439:43
    at Array.map (<anonymous>)
    at Complete.completeSources (/Users/timothy.tyrrell/.config/nvim/plugged/coc.nvim/build/index.js:67439:27)
2022-04-18T07:26:44.237 ERROR (pid:37665) [completion-complete] - Complete error: coc-dash-complete TypeError: Cannot read properties of undefined (reading 'charCodeAt')
    at Chars.isKeywordChar (/Users/timothy.tyrrell/.config/nvim/plugged/coc.nvim/build/index.js:28165:20)
    at Document.getWordRangeAtPosition (/Users/timothy.tyrrell/.config/nvim/plugged/coc.nvim/build/index.js:28714:20)
    at i.provideCompletionItems (/Users/timothy.tyrrell/.config/coc/extensions/node_modules/coc-dash-complete/lib/index.js:1:918)
    at LanguageSource.doComplete (/Users/timothy.tyrrell/.config/nvim/plugged/coc.nvim/build/index.js:66125:58)
    at /Users/timothy.tyrrell/.config/nvim/plugged/coc.nvim/build/index.js:67474:32
    at new Promise (<anonymous>)
    at Complete.completeSource (/Users/timothy.tyrrell/.config/nvim/plugged/coc.nvim/build/index.js:67473:13)
    at /Users/timothy.tyrrell/.config/nvim/plugged/coc.nvim/build/index.js:67439:43
    at Array.map (<anonymous>)
    at Complete.completeSources (/Users/timothy.tyrrell/.config/nvim/plugged/coc.nvim/build/index.js:67439:27)
2022-04-18T07:26:54.662 INFO (pid:37665) [attach] - receive notification: highlight []
2022-04-18T07:26:55.270 INFO (pid:37665) [attach] - receive notification: highlight []
2022-04-18T07:26:57.784 INFO (pid:37665) [attach] - receive notification: doAutocmd [ 2 ]
2022-04-18T07:26:59.093 INFO (pid:37665) [attach] - receive notification: openLog []
2022-04-18T07:26:59.196 INFO (pid:37665) [attach] - receive notification: doAutocmd [ 2 ]
2022-04-18T07:26:59.221 ERROR (pid:37665) [core-editors] - document not found for window: 1000
2022-04-18T07:26:59.330 INFO (pid:37665) [attach] - receive notification: highlight []

When I uninstall the coc-spell-check I still had the issues. When I kept coc-spell-check and only uninstalled coc-dash-complete, I continued to get the errors.

CocInfo:

## versions

vim version: NVIM v0.8.0-dev+9-g1facad234
node version: v16.13.1
coc.nvim version: 0.0.80-master
coc.nvim directory: /Users/timothy.tyrrell/.config/nvim/plugged/coc.nvim
term: tmux
platform: darwin

## Log of coc.nvim

2022-04-18T07:29:56.341 WARN (pid:38353) [attach] - Plugin not ready when received "highlight" []
2022-04-18T07:29:56.611 INFO (pid:38353) [coc-git] - Looking for git in: git
2022-04-18T07:29:57.236 INFO (pid:38353) [services] - registered service "stylelintplus"
2022-04-18T07:29:57.438 INFO (pid:38353) [plugin] - coc.nvim initialized with node: v16.13.1 after 3490ms
2022-04-18T07:29:57.442 INFO (pid:38353) [attach] - receive notification: highlight []
2022-04-18T07:29:57.524 INFO (pid:38353) [core-watchman] - watchman watching project: /Users/timothy.tyrrell/code/timtyrrell/dotfiles
2022-04-18T07:29:57.616 INFO (pid:38353) [attach] - receive notification: highlight []
2022-04-18T07:29:57.620 INFO (pid:38353) [services] - registered service "vimlsp"
2022-04-18T07:29:57.620 INFO (pid:38353) [services] - vim language server state change: stopped => starting
2022-04-18T07:29:57.850 INFO (pid:38353) [services] - vim language server state change: starting => running
2022-04-18T07:29:57.856 INFO (pid:38353) [services] - service vimlsp started
2022-04-18T07:29:58.115 INFO (pid:38353) [attach] - receive notification: highlight []
2022-04-18T07:29:59.413 INFO (pid:38353) [attach] - receive notification: highlight []
2022-04-18T07:29:59.822 INFO (pid:38353) [attach] - receive notification: highlight []
2022-04-18T07:30:01.081 INFO (pid:38353) [attach] - receive notification: highlight []
2022-04-18T07:30:01.530 INFO (pid:38353) [attach] - receive notification: highlight []
2022-04-18T07:30:04.421 INFO (pid:38353) [attach] - receive notification: highlight []
2022-04-18T07:30:04.813 INFO (pid:38353) [attach] - receive notification: highlight []
2022-04-18T07:30:07.047 WARN (pid:38353) [completion] - Suggest not triggered with input "", minimal trigger input length: 1
2022-04-18T07:30:07.710 INFO (pid:38353) [attach] - receive notification: highlight []
2022-04-18T07:30:07.888 INFO (pid:38353) [attach] - receive notification: highlight []
2022-04-18T07:30:09.407 INFO (pid:38353) [attach] - receive notification: highlight []
2022-04-18T07:30:09.740 INFO (pid:38353) [attach] - receive notification: highlight []
2022-04-18T07:30:18.311 INFO (pid:38353) [attach] - receive notification: showInfo []

I am at this sha

luisdavim commented 2 years ago

I have the same issue.

timtyrrell commented 2 years ago

https://github.com/neoclide/coc.nvim/issues/3778

timtyrrell commented 2 years ago

Maybe it was this commit? https://github.com/neoclide/coc.nvim/commit/9b5f9ec48edd876da5bfe775377ece28e0b8be36#diff-77d8897d9691d166262c50728155ab5b378ee97ef88efe75e7014a7e4337ad0aL127

timtyrrell commented 2 years ago

I still get errors https://github.com/neoclide/coc.nvim/issues/3821