neoclide / coc-tsserver

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

Activate extension on `tsserver.watchBuild` command #390

Closed nicomni closed 2 years ago

nicomni commented 2 years ago

According to the specified activationEvents in package.json which says: "onCommand:tsserver.watchBuild", I expect the extension to be activated when I invoke the watchBuild command.

For this reason I expected this to work:

Expected behavior:

  1. Open vim in my typescript project. (Don't open any source files as that would trigger activation events such as "onLanguage:typescript").
  2. Confirm that coc-tsserver is not activated by running: CocList extensions and look for coc-tsserver.
  3. Run command: CocCommand tsserver.watchBuild
  4. Expect watchBuild command to work as normal (because coc-tsserver has bean activated).

Actual behavior:

Getting error after 3rd step: Error on notification "runCommand": Command tsserver.watchBuild not found

However, all of the other properly registered commands work as normal, i.e., the extension is activated when executed.