Every time I enter neovim in windows 10 to a .js file I get this error:
Error detected while processing function SwitchFlowOrTsLsps[1]..CocAction:
line 2:
E605: Exception not caught: coc.nvim not ready when invoke CocAction "extensionStats"
In my configuration file is the function for which the error occurs:
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
Could someone help me? Although to tell me to delete the function, that function along with some more configurations I copied them from github and I don't understand it, I don't understand what it does.
It could even be a Coc error, that's how I see it but I'm not sure how to fix it, I have coc-json and coc-tsserver installed, if I need any more just say so.
Thank you all.