question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeScript LanguageService plugin

See original GitHub issue

What 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:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
ajafffcommented, Dec 17, 2018

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

npm install --save-dev @fimbul/wotan@next @fimbul/mithotyn@next
# or
yarn add -D @fimbul/wotan@next @fimbul/mithotyn@next

Any kind of feedback is very much appreciated.

1reaction
ajafffcommented, Dec 31, 2018

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Writing a TypeScript Language Service Plugin
TypeScript Language Service Plugins ("plugins") are for changing the editing experience only. The core TypeScript language remains the same.
Read more >
Hediets TypeScript Language Service Plugin
Hediet TypeScript Refactorings. This is a VS Code Extension for refactorings that I had time and fun to program. Feel free to use...
Read more >
How to write a Diagnostics TypeScript Language Service ...
A TypeScript Language Service Plugin can be used to change the editing experience for TypeScript users. It doesn't interfere with the compiler.
Read more >
typescript-eslint-language-service
TypeScript language service plugin for ESLint. Latest version: 5.0.0, last published: a year ago.
Read more >
TypeScript language services examples [closed]
I was in the same situation - This is my progress so far: A tutorial I've made - implement a Language Service plugin...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found