neoclide / coc-tsserver

Tsserver extension for coc.nvim that provide rich features like VSCode for javascript & typescript
MIT License
1.05k stars 68 forks source link

[question] How to use goto definition/declaration? #398

Closed godlikeSwan closed 1 year ago

godlikeSwan commented 1 year ago

In VSCode I can ctrl+click for example on log in console.log('hi') and this will open file where that log defined Can I do actions like this in vim/coc/coc-tsserver? I've tried :call CocAction('definitions'), call CocAction('declarations') implementations etc In case of declarations this prints Error on request (declarations): declaration provider not found for current buff er, your language server doesn't support it. Other commands seems to do nothing

I'm using vim 8.1

chemzqm commented 1 year ago

Error on request (declarations): declaration provider not found for current buff er, your language server doesn't support it.

There are no declarations for js.

:h coc-locations

godlikeSwan commented 1 year ago

:call CocAction('jumpDefinition') helps 😄