[psc-ide] Unify Completion Commands#2305
Merged
paf31 merged 1 commit intoSep 13, 2016
Merged
Conversation
Member
Author
|
Ready for review. Once it's good to go I'll squash things. |
f5d3aa3 to
ab745a0
Compare
|
|
||
| The following format is returned as the Result: | ||
|
|
||
| Bpth the `definedAt` aswell as the `documentation` field might be `null` if they |
Contributor
|
Looks great! |
* Unifies response formats for the type and complete commands so go-to-definition and type annotations now also show up in completions
ab745a0 to
8dd3965
Compare
Member
Author
|
Thanks! Squashed. |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Follow up on #2303 and #2302.
This PR merges the two different response types for the
typeandcompletioncommand. We now provide all the AST information for both of these.The format for the returned completions has thus changed from:
{ "module" : "Text" , "identifier" : "Text" , "type" : "Text" }to:
{ "module" : "Text" , "identifier" : "Text" , "type" : "Text" , "expandedType" : "Text" , "definedAt" : "Maybe SourceSpan" , "documentation" : "Maybe Text" }The
typefield now contains the annotated type, if we found it by parsing the sourcefiles. If we didn't find any annotation it still contains the type with fully expanded type synonyms. This should provide a better default for the editors and if they still want to show the expanded types that is now available via theexpandedTypefield.The
documentationfield is always Nothing for now, but I intend to fill out that information soon, so I thought I'll change the API just once instead of twice.Because all the old fields remain we shouldn't break any editor plugins, give better type information for the end users and allow for more features on the editor side through the new fields.
TODO: