0

每次我在 Windows 10 中将 neovim 输入到 .js 文件时,我都会收到此错误:

Error detected while processing function SwitchFlowOrTsLsps[1]..CocAction:
line    2:
E605: Exception not caught: coc.nvim not ready when invoke CocAction "extensionStats"

在我的配置文件中是发生错误的函数:

function! SwitchFlowOrTsLsps(flowIndex)
  silent let stats = CocAction("extensionStats")
  silent let tsserver = get(filter(copy(stats), function('FindTsServer')), 0)
  if(a:flowIndex == 0)
    if(tsserver.state == 'disabled')
      call CocActionAsync("toggleExtension", "coc-tsserver")
    endif
  else
    if(tsserver.state == 'activated')
      call CocActionAsync("toggleExtension", "coc-tsserver")
    endif
  endif
endfunction

有人可以帮助我吗?虽然告诉我删除该功能,但该功能以及我从github复制的更多配置,我不明白,我不明白它的作用。

它甚至可能是一个 Coc 错误,这就是我的看法,但我不确定如何修复它,我已经安装了 coc-json 和 coc-tsserver,如果我需要更多,请直接说。

谢谢你们。

4

1 回答 1

0

coc.nvim 调用时没有准备好

在调用此操作之前,您需要确保您的 coc.nvim 已经启动。

于 2021-02-18T02:50:22.763 回答