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

Support alternate tsconfig.json path for watchBuild? #285

Closed nateroling closed 3 years ago

nateroling commented 3 years ago

I have an Angular project that uses a "Solution Style" tsconfig file. Rather than tsconfig.json, I think I need to use tsconfig.app.json with tsserver.watchBuild, but passing the arg doesn't seem to affect what actually runs.

I call this in vim: :call CocAction('runCommand', 'tsserver.watchBuild', '-p', 'tsconfig.base.json')

but ps ax | grep watch shows this: 87320 ?? Ss 0:01.11 node /Users/<project_path>/node_modules/typescript/bin/tsc -p tsconfig.json --watch true --pretty false

My tsconfig.json:

/*
  This is a "Solution Style" tsconfig.json file, and is used by editors and TypeScript’s language server to improve development experience.
  It is not intended to be used to perform a compilation.

  To learn more about this file see: https://angular.io/config/solution-tsconfig.
*/
{
  "files": [],
  "references": [
    {
      "path": "./tsconfig.app.json"
    },
    {
      "path": "./tsconfig.spec.json"
    },
    {
      "path": "./cypress/tsconfig.json"
    }
  ]
}
chemzqm commented 3 years ago

Fixed by d24d75d