neoclide / coc.nvim

Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers.
Other
24.15k stars 953 forks source link

URL of document link shouldn't contain some special character #4876

Closed Freed-Wu closed 4 months ago

Freed-Wu commented 5 months ago

Result from CocInfo

## versions

vim version: NVIM v0.9.5
node version: v20.10.0
coc.nvim version: 0.0.82-d1568d56 2023-09-29 19:43:34 +0800
coc.nvim directory: /home/wzy/.local/share/nvim/repos/github.com/neoclide/coc.nvim_release
term: tmux
platform: linux

## Log of coc.nvim

2024-01-30T11:53:21.895 ERROR (pid:503009) [extensions-index] - Error on load package.json of coc-cl Error: main file lib/index.js not found, you may need to build the project.
    at z7 (/home/wzy/.local/share/nvim/repos/github.com/neoclide/coc.nvim_release/build/index.js:251:21268)
    at async gF.globalExtensions (/home/wzy/.local/share/nvim/repos/github.com/neoclide/coc.nvim_release/build/index.js:252:7107)
2024-01-30T11:53:24.684 INFO (pid:503009) [extension:coc-git] - Looking for git in: git
2024-01-30T11:53:25.060 INFO (pid:503009) [extension:coc-tabnine] - Using tabnine from /home/wzy/.config/coc/extensions/coc-tabnine-data/binaries/4.86.0/x86_64-unknown-linux-musl/TabNine
2024-01-30T11:53:25.143 WARN (pid:503009) [workspace] - workspace.createStatusBarItem is deprecated, please use window.createStatusBarItem instead. 
    at c.init (/home/wzy/.config/coc/extensions/node_modules/coc-leetcode/out/index.js:1:12315)
    at new c (/home/wzy/.config/coc/extensions/node_modules/coc-leetcode/out/index.js:1:12274)
2024-01-30T11:53:26.708 INFO (pid:503009) [plugin] - coc.nvim initialized with node: v20.10.0 after 5097
2024-01-30T11:53:26.710 INFO (pid:503009) [services] - LanguageClient jedi-language-server state change: stopped => starting
2024-01-30T11:53:26.711 INFO (pid:503009) [services] - LanguageClient ruff-lsp state change: stopped => starting
2024-01-30T11:53:26.761 INFO (pid:503009) [language-client-index] - Language server "jedi" started with 503181
2024-01-30T11:53:26.785 INFO (pid:503009) [language-client-index] - Language server "ruff" started with 503182
2024-01-30T11:53:26.861 INFO (pid:503009) [language-client-index] - Language server "cSpell" started with 503183
2024-01-30T11:53:27.167 WARN (pid:503009) [core-watchman] - opendir(/home/wzy/.local/share/waydroid/data/misc/profiles/cur/0/com.android.providers.telephony) -> Permission denied. Marking this portion of the tree deleted
To clear this warning, run:
`watchman watch-del '/home/wzy' ; watchman watch-project '/home/wzy'`

2024-01-30T11:53:27.167 INFO (pid:503009) [core-watchman] - watchman watching project: /home/wzy/Desktop/bitbake-language-server
2024-01-30T11:53:28.692 INFO (pid:503009) [services] - LanguageClient ruff-lsp state change: starting => running
2024-01-30T11:53:28.702 INFO (pid:503009) [services] - service ruff started
2024-01-30T11:53:28.880 INFO (pid:503009) [services] - LanguageClient jedi-language-server state change: starting => running
2024-01-30T11:53:28.896 INFO (pid:503009) [services] - service jedi started
2024-01-30T11:54:12.156 ERROR (pid:503009) [completion-complete] - Complete error: coc-dot-complete TypeError: e.words is not iterable
    at /home/wzy/.config/coc/extensions/node_modules/coc-dot-complete/lib/index.js:1:1261
    at Array.forEach (<anonymous>)
    at i.gatherWords (/home/wzy/.config/coc/extensions/node_modules/coc-dot-complete/lib/index.js:1:1215)
    at i.provideCompletionItems (/home/wzy/.config/coc/extensions/node_modules/coc-dot-complete/lib/index.js:1:1027)
    at iy.doComplete (/home/wzy/.local/share/nvim/repos/github.com/neoclide/coc.nvim_release/build/index.js:253:6447)
    at runNextTicks (node:internal/process/task_queues:60:5)
    at process.processImmediate (node:internal/timers:449:9)
2024-01-30T11:54:12.158 ERROR (pid:503009) [completion-complete] - Complete error: coc-dash-complete TypeError: t.words is not iterable
    at /home/wzy/.config/coc/extensions/node_modules/coc-dash-complete/lib/index.js:1:1264
    at Array.forEach (<anonymous>)
    at i.gatherWords (/home/wzy/.config/coc/extensions/node_modules/coc-dash-complete/lib/index.js:1:1218)
    at i.provideCompletionItems (/home/wzy/.config/coc/extensions/node_modules/coc-dash-complete/lib/index.js:1:1030)
    at iy.doComplete (/home/wzy/.local/share/nvim/repos/github.com/neoclide/coc.nvim_release/build/index.js:253:6447)
    at runNextTicks (node:internal/process/task_queues:60:5)
    at process.processImmediate (node:internal/timers:449:9)
2024-01-30T11:54:15.717 INFO (pid:503009) [attach] - receive notification: doAutocmd [
  2,
  {
    regcontents: [ 'https://github.com/priv-kweihmann/oelint-parser/issues/189' ],
    visual: true,
    inclusive: true,
    regname: '"',
    operator: 'y',
    regtype: 'v'
  },
  1,
  1000
]
2024-01-30T11:54:15.737 INFO (pid:503009) [attach] - receive notification: doAutocmd [
  2,
  {
    regcontents: [ 'https://github.com/priv-kweihmann/oelint-parser/issues/189' ],
    visual: true,
    inclusive: true,
    regname: '',
    operator: 'd',
    regtype: 'v'
  },
  1,
  1000
]
2024-01-30T11:54:17.179 ERROR (pid:503009) [completion-complete] - Complete error: coc-just-complete TypeError: e.words is not iterable
    at /home/wzy/.config/coc/extensions/node_modules/coc-just-complete/lib/index.js:1:1341
    at Array.forEach (<anonymous>)
    at i.gatherWords (/home/wzy/.config/coc/extensions/node_modules/coc-just-complete/lib/index.js:1:1295)
    at i.provideCompletionItems (/home/wzy/.config/coc/extensions/node_modules/coc-just-complete/lib/index.js:1:1097)
    at iy.doComplete (/home/wzy/.local/share/nvim/repos/github.com/neoclide/coc.nvim_release/build/index.js:253:6447)
    at runNextTicks (node:internal/process/task_queues:60:5)
    at process.processImmediate (node:internal/timers:449:9)
2024-01-30T11:55:10.319 INFO (pid:503009) [attach] - receive notification: doAutocmd [
  2,
  {
    regcontents: [ '<https://github.com/priv-kweihmann/oelint-parser/issues/189>_' ],
    visual: false,
    inclusive: false,
    regname: '',
    operator: 'd',
    regtype: 'v'
  },
  1,
  1000
]
2024-01-30T11:55:10.348 INFO (pid:503009) [attach] - receive notification: doAutocmd [
  2,
  {
    regcontents: [ '` `' ],
    visual: false,
    inclusive: false,
    regname: '',
    operator: 'd',
    regtype: 'v'
  },
  1,
  1000
]
2024-01-30T11:55:56.142 INFO (pid:503009) [attach] - receive notification: doKeymap [ 'coc-ci-b' ]
2024-01-30T11:55:59.759 INFO (pid:503009) [attach] - receive notification: doKeymap [ 'coc-ci-w' ]
2024-01-30T11:55:59.929 INFO (pid:503009) [attach] - receive notification: doKeymap [ 'coc-ci-w' ]
2024-01-30T11:56:00.110 INFO (pid:503009) [attach] - receive notification: doKeymap [ 'coc-ci-w' ]
2024-01-30T11:56:00.283 INFO (pid:503009) [attach] - receive notification: doKeymap [ 'coc-ci-w' ]
2024-01-30T11:56:00.852 INFO (pid:503009) [attach] - receive notification: openLink []
2024-01-30T11:56:05.765 INFO (pid:503009) [attach] - receive notification: openLink []
2024-01-30T11:56:08.181 INFO (pid:503009) [attach] - receive notification: doKeymap [ 'coc-ci-b' ]
2024-01-30T11:56:18.261 INFO (pid:503009) [attach] - receive notification: doAutocmd [
  2,
  {
    regcontents: [ '/priv-kweihmann/oelint-parser/issues/189' ],
    visual: true,
    inclusive: true,
    regname: '',
    operator: 'd',
    regtype: 'v'
  },
  1,
  1000
]
2024-01-30T11:56:21.163 INFO (pid:503009) [attach] - receive notification: openLink []
2024-01-30T11:56:26.716 INFO (pid:503009) [attach] - receive notification: doKeymap [ 'coc-ci-w' ]
2024-01-30T11:56:27.737 INFO (pid:503009) [attach] - receive notification: doAutocmd [
  2,
  {
    regcontents: [ 'Wait ' ],
    visual: true,
    inclusive: true,
    regname: '',
    operator: 'd',
    regtype: 'v'
  },
  1,
  1000
]
2024-01-30T11:57:03.361 ERROR (pid:503009) [completion-complete] - Complete error: coc-dot-complete TypeError: e.words is not iterable
    at /home/wzy/.config/coc/extensions/node_modules/coc-dot-complete/lib/index.js:1:1261
    at Array.forEach (<anonymous>)
    at i.gatherWords (/home/wzy/.config/coc/extensions/node_modules/coc-dot-complete/lib/index.js:1:1215)
    at i.provideCompletionItems (/home/wzy/.config/coc/extensions/node_modules/coc-dot-complete/lib/index.js:1:1027)
    at iy.doComplete (/home/wzy/.local/share/nvim/repos/github.com/neoclide/coc.nvim_release/build/index.js:253:6447)
    at runNextTicks (node:internal/process/task_queues:60:5)
    at process.processImmediate (node:internal/timers:449:9)
2024-01-30T11:57:03.362 ERROR (pid:503009) [completion-complete] - Complete error: coc-dash-complete TypeError: t.words is not iterable
    at /home/wzy/.config/coc/extensions/node_modules/coc-dash-complete/lib/index.js:1:1264
    at Array.forEach (<anonymous>)
    at i.gatherWords (/home/wzy/.config/coc/extensions/node_modules/coc-dash-complete/lib/index.js:1:1218)
    at i.provideCompletionItems (/home/wzy/.config/coc/extensions/node_modules/coc-dash-complete/lib/index.js:1:1030)
    at iy.doComplete (/home/wzy/.local/share/nvim/repos/github.com/neoclide/coc.nvim_release/build/index.js:253:6447)
    at runNextTicks (node:internal/process/task_queues:60:5)
    at process.processImmediate (node:internal/timers:449:9)
2024-01-30T12:00:13.271 INFO (pid:503009) [attach] - receive notification: showInfo []

Describe the bug

In rst, the URL syntax is

`<http://XXX>_`

> shouldn't be one character of URL.

Screenshots (optional)

Screenshot from 2024-01-30 11-56-36

fannheyward commented 5 months ago

I didn't test with rst file, but the link target is provided by language server, check textDocument/documentLink request in trace logs.

fannheyward commented 5 months ago

Should be problem of the regex:

https://github.com/neoclide/coc.nvim/blob/8c214476f3ac85b04681f8a52186724e3667fd59/src/handler/links.ts#L103-L104