TypeScript LanguageService plugin
See original GitHub issueWhat do you think about having Wotan act as a plugin for the TypeScript compiler?
I’m imagining an ideal development loop that includes running lint checks continuously together with continuously compiling my TypeScript code.
If Wotan could be used as TypeScript compiler plugin (like tslint-language-service), then maybe this use case could be supported for tsc --watch
, Webpack, or any other build system?
Edit: Oops, it looks like TypeScript plugins aren’t as powerful as I’d hoped, and wouldn’t work for failing a tsc
build…
TypeScript Language Service Plugins (“plugins”) are for changing the editing experience only. The core TypeScript language remains the same. Plugins can’t add new language features such as new syntax or different typechecking behavior, and plugins aren’t loaded during normal commandline typechecking or emitting. https://github.com/Microsoft/TypeScript/wiki/Writing-a-Language-Service-Plugin
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)
Top GitHub Comments
For those willing to test the LanguageService plugin: In about 3 hours there will be a new nightly release that includes the plugin. The documentation is located here: https://github.com/fimbullinter/wotan/blob/master/packages/mithotyn/README.md
Note: to install the nightly release you need to execute
Any kind of feedback is very much appreciated.
@dcecile Thank you for the detailed feedback.
I had a similar problem with VSCode silently reverting my setting to using the bundled TypeScript version instead of the workspace version. I guess that happened during an update. On a related note: you can enable TS Server logging in VSCode’s settings and use
TypeScript: Open TS Server log
to open the log file.To fix this I’m putting together a VSCode plugin to automatically inject the LanguageService plugin when using the bundled TypeScript version. #396 basically tracks that.