Closed
Conversation
|
@weswigham I'm very lot impatient to see your PR inside TypeSript. If I understand well, we will able to write a plugin to support for instance completion for angular controller, module inside JS file. I tell me if you work will work too with tsserver? How to define custom plugins to load? |
8ee57f3 to
5ad76bd
Compare
445d7f7 to
d8aec99
Compare
Contributor
|
closing in favor of #12231. More docs available at https://github.com/Microsoft/TypeScript/wiki/Writing-a-Language-Service-Plugin. |
This was referenced May 26, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Split from #9038. This PR will likely need to be reopened against master once #10159 is merged, but it exists to track the progress of language service plugins.
@chuckjaz @ahejlsberg @mhegazy @rbuckton @vladima
This is, quite specifically, the kind of extension the @angular team has asked for. It allows for the override or filtering of most language service operations (completions, quick info, etc).
A language service provider can provide an override for the language service method of the same name. If it returns a value other than
undefined, then the built-in value is not used, and the returned value is used instead (otherwise the return value of the built-in function is used). This value is then passed through any present filter methods for that function, which have the opportunity to intercept and modify the value before it is passed down the filter chain to the next extension. If a filter returnsundefined, its return value is discarded and the result of the previous filter is passed forward instead.