fannheyward / coc-pyright

Pyright extension for coc.nvim
MIT License
1.29k stars 47 forks source link

Invalid key 'noautocmd' use :CocOpenLog for details #751

Closed JinraeKim closed 2 years ago

JinraeKim commented 2 years ago

For every parts that are supposed to show pop-ups, the following error messages are shown.

[coc.nvim] Vim(let):E5555: API call: Invalid key 'noautocmd' use :CocOpenLog for details

What's the output of :CocCommand pyright.version

[coc.nvim] coc-pyright 1.1.243 with Pyright 1.1.247

What's the output of :CocCommand workspace.showOutput Pyright

Workspace: /Users/jinrae/github/other-projects/diffql
Using python from /Users/jinrae/Library/Caches/pypoetry/virtualenvs/diffql-7qwUEDhw-py3.9/bin/python

[Info  - 7:00:15 PM] Pyright language server 1.1.247 starting
[Info  - 7:00:15 PM] Server root directory: /Users/jinrae/.config/coc/extensions/node_modules/coc-pyright/node_modules/pyright/dist/
[Info  - 7:00:15 PM] No configuration file found.
[Info  - 7:00:15 PM] pyproject.toml file found at /Users/jinrae/github/other-projects/diffql.
[Info  - 7:00:15 PM] Setting pythonPath for service "diffql": "/Users/jinrae/Library/Caches/pypoetry/virtualenvs/diffql-7qwUEDhw-py3.9/bin/python"
[Info  - 7:00:15 PM] Loading pyproject.toml file at /Users/jinrae/github/other-projects/diffql/pyproject.toml
[Error  - 7:00:15 PM] Pyproject file "/Users/jinrae/github/other-projects/diffql/pyproject.toml" is missing "[tool.pyright]" section.
[Warn  - 7:00:15 PM] stubPath /Users/jinrae/github/other-projects/diffql/typings is not a valid directory.
[Info  - 7:00:15 PM] Assuming Python version 3.9
[Info  - 7:00:15 PM] Assuming Python platform Darwin
[Info  - 7:00:15 PM] Searching for source files
[Info  - 7:00:16 PM] Found 27 source files
[Info  - 7:00:18 PM] [FG] Long operation: checking: /Users/jinrae/github/other-projects/diffql/tests/test_main.py (2161ms)
[Info  - 7:00:18 PM] [FG] Long operation: analyzing: /Users/jinrae/github/other-projects/diffql/tests/test_main.py (2333ms)

What's the output of :CocOpenLog

2022-05-17T19:00:12.113 INFO (pid:63494) [plugin] - coc.nvim initialized with node: v16.0.0 after 61ms
2022-05-17T19:00:12.509 INFO (pid:63494) [attach] - receive notification: runCommand [ 'explorer', '--no-toggle' ]
2022-05-17T19:00:12.529 INFO (pid:63494) [attach] - receive notification: runCommand [
  'coc-helper.internal.didVimEvent_m1_v0_13_0_coc_helper_1',
  'BufDelete',
  2
]
2022-05-17T19:00:12.529 INFO (pid:63494) [attach] - receive notification: runCommand [
  'coc-helper.internal.didVimEvent_m1_v0_13_0_explorer_2',
  'BufDelete',
  2
]
2022-05-17T19:00:13.780 INFO (pid:63494) [attach] - Request action: doKeymap [ 'explorer-key-n-l' ]
2022-05-17T19:00:14.834 INFO (pid:63494) [attach] - Request action: doKeymap [ 'explorer-key-n-l' ]
2022-05-17T19:00:14.842 INFO (pid:63494) [attach] - receive notification: runCommand [
  'coc-helper.internal.didVimEvent_m1_v0_13_0_coc_helper_1',
  'BufDelete',
  1
]
2022-05-17T19:00:14.842 INFO (pid:63494) [attach] - receive notification: runCommand [
  'coc-helper.internal.didVimEvent_m1_v0_13_0_explorer_2',
  'BufDelete',
  1
]
2022-05-17T19:00:14.842 INFO (pid:63494) [attach] - receive notification: runCommand [
  'coc-helper.internal.didVimEvent_m1_v0_13_0_coc_helper_1',
  'BufWipeout',
  1
]
2022-05-17T19:00:14.843 INFO (pid:63494) [attach] - receive notification: runCommand [
  'coc-helper.internal.didVimEvent_m1_v0_13_0_explorer_2',
  'BufWipeout',
  1
]
2022-05-17T19:00:15.331 INFO (pid:63494) [services] - registered service "pyright"
2022-05-17T19:00:15.331 INFO (pid:63494) [services] - Pyright Server state change: stopped => starting
2022-05-17T19:00:15.436 INFO (pid:63494) [services] - Pyright Server state change: starting => running
2022-05-17T19:00:15.438 INFO (pid:63494) [services] - service pyright started
2022-05-17T19:00:18.402 INFO (pid:63494) [attach] - receive notification: runCommand [
  'coc-helper.internal.didVimEvent_m1_v0_13_0_explorer_2',
  'CocDiagnosticChange'
]
2022-05-17T19:00:18.695 ERROR (pid:63494) [node-client] - request error on "nvim_call_function" [
  'coc#dialog#create_cursor_float',
  [
    0,
    0,
    [
      '[Pyright reportUndefinedVariable] [E] "a" is not defined',
      '─',
      'https://github.com/microsoft/pyright/blob/main/docs/configuration.md',
      '─',
      '[Pyright reportUnusedExpression] [W] Expression value is unused',
      '─',
      'https://github.com/microsoft/pyright/blob/main/docs/configuration.md'
    ],
    {
      pumAlignTop: false,
      preferTop: false,
      offsetX: 0,
      title: '',
      close: 0,
      codes: [Array],
      highlights: [],
      modes: [Array],
      maxWidth: 80,
      autohide: 1
    }
  ]
] Vim(let):E5555: API call: Invalid key 'noautocmd' Error
    at SA.request (/Users/jinrae/.local/share/nvim/plugged/coc.nvim/build/index.js:29:43425)
    at SA.call (/Users/jinrae/.local/share/nvim/plugged/coc.nvim/build/index.js:34:3815)
    at li.createPopup (/Users/jinrae/.local/share/nvim/plugged/coc.nvim/build/index.js:146:3526)
    at li.show (/Users/jinrae/.local/share/nvim/plugged/coc.nvim/build/index.js:146:2655)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Iee.showFloat (/Users/jinrae/.local/share/nvim/plugged/coc.nvim/build/index.js:266:18320)
    at async Iee.echoMessage (/Users/jinrae/.local/share/nvim/plugged/coc.nvim/build/index.js:266:17065)
    at async Timeout._onTimeout (/Users/jinrae/.local/share/nvim/plugged/coc.nvim/build/index.js:266:10565)
2022-05-17T19:00:18.698 ERROR (pid:63494) [node-client] - Vim(let):E5555: API call: Invalid key 'noautocmd' Error: request error on nvim_call_function - Vim(let):E5555: API call: Invalid key 'noautocmd'
    at li.createPopup (/Users/jinrae/.local/share/nvim/plugged/coc.nvim/build/index.js:146:3526)
    at li.show (/Users/jinrae/.local/share/nvim/plugged/coc.nvim/build/index.js:146:2655)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Iee.showFloat (/Users/jinrae/.local/share/nvim/plugged/coc.nvim/build/index.js:266:18320)
    at async Iee.echoMessage (/Users/jinrae/.local/share/nvim/plugged/coc.nvim/build/index.js:266:17065)
    at async Timeout._onTimeout (/Users/jinrae/.local/share/nvim/plugged/coc.nvim/build/index.js:266:10565)
2022-05-17T19:00:51.299 INFO (pid:63494) [attach] - receive notification: runCommand [ 'pyright.version' ]
2022-05-17T19:01:07.825 INFO (pid:63494) [attach] - receive notification: runCommand [ 'workspace.showOutput', 'Pyright' ]
2022-05-17T19:01:20.863 ERROR (pid:63494) [node-client] - request error on "nvim_call_function" [
  'coc#dialog#create_cursor_float',
  [
    0,
    0,
    [
      '[Pyright reportUndefinedVariable] [E] "a" is not defined',
      '─',
      'https://github.com/microsoft/pyright/blob/main/docs/configuration.md',
      '─',
      '[Pyright reportUnusedExpression] [W] Expression value is unused',
      '─',
      'https://github.com/microsoft/pyright/blob/main/docs/configuration.md'
    ],
    {
      pumAlignTop: false,
      preferTop: false,
      offsetX: 0,
      title: '',
      close: 0,
      codes: [Array],
      highlights: [],
      modes: [Array],
      maxWidth: 80,
      autohide: 1
    }
  ]
] Vim(let):E5555: API call: Invalid key 'noautocmd' Error
    at SA.request (/Users/jinrae/.local/share/nvim/plugged/coc.nvim/build/index.js:29:43425)
    at SA.call (/Users/jinrae/.local/share/nvim/plugged/coc.nvim/build/index.js:34:3815)
    at li.createPopup (/Users/jinrae/.local/share/nvim/plugged/coc.nvim/build/index.js:146:3526)
    at li.show (/Users/jinrae/.local/share/nvim/plugged/coc.nvim/build/index.js:146:2655)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Iee.showFloat (/Users/jinrae/.local/share/nvim/plugged/coc.nvim/build/index.js:266:18320)
    at async Iee.echoMessage (/Users/jinrae/.local/share/nvim/plugged/coc.nvim/build/index.js:266:17065)
    at async Timeout._onTimeout (/Users/jinrae/.local/share/nvim/plugged/coc.nvim/build/index.js:266:10565)
2022-05-17T19:01:20.864 ERROR (pid:63494) [node-client] - Vim(let):E5555: API call: Invalid key 'noautocmd' Error: request error on nvim_call_function - Vim(let):E5555: API call: Invalid key 'noautocmd'
    at li.createPopup (/Users/jinrae/.local/share/nvim/plugged/coc.nvim/build/index.js:146:3526)
    at li.show (/Users/jinrae/.local/share/nvim/plugged/coc.nvim/build/index.js:146:2655)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Iee.showFloat (/Users/jinrae/.local/share/nvim/plugged/coc.nvim/build/index.js:266:18320)
    at async Iee.echoMessage (/Users/jinrae/.local/share/nvim/plugged/coc.nvim/build/index.js:266:17065)
    at async Timeout._onTimeout (/Users/jinrae/.local/share/nvim/plugged/coc.nvim/build/index.js:266:10565)
2022-05-17T19:01:23.666 INFO (pid:63494) [attach] - receive notification: openLog []
fannheyward commented 2 years ago

What's your nvim version?

fannheyward commented 2 years ago

@chemzqm https://github.com/neoclide/coc.nvim/blob/9f741d6e69c3fe9d70921141ec1854837ccae962/autoload/coc/float.vim#L1011

chemzqm commented 2 years ago

noautocmd is added on neovim 0.5.0, please avoid use old dev version of neovim, release version should be preferred.

JinraeKim commented 2 years ago

noautocmd is added on neovim 0.5.0, please avoid use old dev version of neovim, release version should be preferred.

Nice. I upgraded nvim to

:version
NVIM v0.8.0-dev+228-g54b5222fb
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by jinrae@gimjinlaes-MacBook-Air.local

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/opt/homebrew/Cellar/neovim/HEAD-54b5222/share/nvim"

Run :checkhealth for more info
Press ENTER or type command to continue

via brew and it resolved this issue. Thanks!