Uh oh!
There was an error while loading. Please reload this page.
RFC: Language service extensions and tests - #9283
Merged
Wesley Wigham (weswigham) merged 11 commits intoJul 6, 2016
Merged
Conversation
| // prior to the host receiving it. The TypeScript language service is invoked and the | ||
| // result is passed to the plugin as the value of the previous parameter. If more than one | ||
| // plugin is registered, the plugins are consulted in the order they are returned from the | ||
| // host. The value passed in as previous is the result returned by the prior plugin. If a |
Contributor
There was a problem hiding this comment.
Consider replacing host with Program.getCompilerExtensions() as my proposal had the language service host returning the extensions but this PR gets them from the program.
Chuck Jazdzewski (chuckjaz)
commented
Jun 21, 2016
Contributor
Thanks for taking this on! I left some minor comments. |
| // be returned by the TypeScript language service. If a plugin returns a defined results | ||
| // (that is, is not undefined) then that result is used instead of invoking the | ||
| // corresponding TypeScript method. If multiple plugins are registered, they are | ||
| // consulted in the order they are returned from the host. The first defined result |
Contributor
There was a problem hiding this comment.
Consider replacing host with program or Program.getCompilerExtensions().
Wesley Wigham (weswigham)force-pushed
the
language-service-extensions
branch
from
June 21, 2016 00:39
5ab8d7a to
a7ae427Compare6 tasks
Wesley Wigham (weswigham)
commented
Jun 23, 2016
MemberAuthor
Bill Ticehurst (@billti) I'd really appreciate it if you'd take a look at this. |
Wesley Wigham (weswigham)force-pushed
the
language-service-extensions
branch
from
June 28, 2016 19:38
69c1fd5 to
80d89fbCompareWesley Wigham (weswigham)
commented
Jul 6, 2016
MemberAuthor
This has been folded into the base PR, since the API design is (relatively) stable (and merging in changes from the base to this PR was beginning to be a pain). |
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 freeto 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.
Continuing from #9038.
This adds language service extensions to the extension API (additionally, extensions should start functioning in language server contexts).
Language server plugins are expected to have any of the publicly useful members of the language service (which they then override), and/or any of those names plus the string
Filter(which they then chain together). Props to Chuck Jazdzewski (@chuckjaz) for proposing the API.So a minimal language service plugin could look like this: