Closed eloraiby closed 1 year ago
I can't reproduce this issue.
vim version: NVIM v0.6.1
I don't know this related or not, try upgrade your nvim and try again.
what version do you recommend? according to the doc, it should work:
Neovim >= 0.4.0.
Yes, coc should work on nvim 0.4.0+. I'm using 0.8.2. I'll try with 0.6.
Thanks, tried version 0.8.2, same issue:
## versions
vim version: NVIM v0.8.2
node version: v18.13.0
coc.nvim version: 0.0.82-b7375d5 2023-01-30 05:09:03 +0800
coc.nvim directory: /home/redacted/.local/share/nvim/plugged/coc.nvim
term: xterm-256color
platform: linux
## Log of coc.nvim
2023-01-31T21:13:52.682 INFO (pid:170497) [plugin] - coc.nvim initialized with node: v18.13.0 after 76
2023-01-31T21:14:12.409 INFO (pid:170497) [attach] - receive notification: installExtensions [ 'coc-json' ]
2023-01-31T21:14:12.978 INFO (pid:170497) [extension-installer] - Fetched info of coc-json {
'dist.tarball': 'https://registry.npmjs.org/coc-json/-/coc-json-1.8.0.tgz',
'engines.coc': '>= 0.0.80',
version: '1.8.0',
name: 'coc-json'
}
2023-01-31T21:14:12.988 ERROR (pid:170497) [extensions-index] - Error on install coc-json Error: Invalid dest path: .config/coc/extensions/node_modules/coc-json-5a9626df-6167-4d59-81af-b624cebfdb51
at download (/home/redacted/.local/share/nvim/plugged/coc.nvim/build/index.js:58680:11)
at Installer.download (/home/redacted/.local/share/nvim/plugged/coc.nvim/build/index.js:59066:22)
at Installer.doInstall (/home/redacted/.local/share/nvim/plugged/coc.nvim/build/index.js:59044:22)
at Installer.install (/home/redacted/.local/share/nvim/plugged/coc.nvim/build/index.js:58949:34)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async fn (/home/redacted/.local/share/nvim/plugged/coc.nvim/build/index.js:72884:26)
2023-01-31T21:14:25.306 INFO (pid:170497) [attach] - receive notification: showInfo []
I know it's more work, but you might be able to reproduce it on a clean ubuntu 22.04 with neovim, latest nodejs and npm (downloaded)
Tested with nvim 0.6.1, on macOS, still can't reproduce.
2023-02-01T10:18:26.395 INFO (pid:2080) [extension-installer] - Fetched info of coc-json {
'dist.tarball': 'https://registry.npmjs.org/coc-json/-/coc-json-1.8.0.tgz',
'engines.coc': '>= 0.0.80',
version: '1.8.0',
name: 'coc-json'
}
2023-02-01T10:18:26.543 INFO (pid:2080) [model-download] - Download completed: URL {
href: 'https://registry.npmjs.org/coc-json/-/coc-json-1.8.0.tgz',
origin: 'https://registry.npmjs.org',
protocol: 'https:',
username: '',
password: '',
host: 'registry.npmjs.org',
hostname: 'registry.npmjs.org',
port: '',
pathname: '/coc-json/-/coc-json-1.8.0.tgz',
search: '',
searchParams: URLSearchParams {},
hash: ''
}
2023-02-01T10:18:26.545 INFO (pid:2080) [model-download] - Downloaded https://registry.npmjs.org/coc-json/-/coc-json-1.8.0.tgz => /Users/fannheyward/.config/coc/extensions/node_modules/coc-json-3df0221b-ffb3-47d5-a827-9993370340e8
anything special to env variables you use?
Debuging on this.
Do you have set g:coc_data_home
?
Found it!
Ubuntu or rather Kubuntu 22.04 doesn't add XDG_CONFIG_HOME
env variable, we need to set it manuall to ~/.config
Thanks @fannheyward , closing it!
What's the output of :echo exists('$XDG_CONFIG_HOME')
, :echo $XDG_CONFIG_HOME
and :echo len($XDG_CONFIG_HOME)
?
Testing before manually set.
they were set to .config
, changed to /home/redacted/.config
and now they work
Yes, after you set it to .config
coc works as expected.
I want to debug the checking of $XDG_CONFIG_HOME
. coc check $XDG_CONFIG_HOME
exists but still failed on your env. Looks like $XDG_CONFIG_HOME
in your env is exists but set to empty, so please help me to debug this.
.config
2.:echo exists('$XDG_CONFIG_HOME')
, :echo $XDG_CONFIG_HOME
and :echo len($XDG_CONFIG_HOME)
0
, nothing, `0' respectively
they were set to
.config
, changed to/home/redacted/.config
and now they work
Got the problem.
if exists('$XDG_CONFIG_HOME')
let dir = resolve($XDG_CONFIG_HOME."/coc")
$XDG_CONFIG_HOME
is set to .config
, but incorrect, can't resolve to correct dir.
yep
Result from CocInfo
Describe the bug
All installs are following the same error message: tried with both stable and build using yarn
Reproduce the bug
We will close your issue when you don't provide minimal vimrc and we can't reproduce it
mini.vim
with:Start (neo)vim with command:
vim -u mini.vim
Operate vim.
Screenshots (optional)
If applicable, add screenshots to help explain your problem.