Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

feat: Add goto type definition. #475

Merged
merged 1 commit into from
Jun 19, 2018
Merged

feat: Add goto type definition. #475

merged 1 commit into from
Jun 19, 2018

Conversation

teasp00n
Copy link
Contributor

Adds support to go directly to the type definition for the symbol under the cursor.

@codecov
Copy link

codecov bot commented Jun 16, 2018

Codecov Report

Merging #475 into master will increase coverage by <.01%.
The diff coverage is 88.88%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #475      +/-   ##
==========================================
+ Coverage   83.08%   83.08%   +<.01%     
==========================================
  Files          15       15              
  Lines        2046     2052       +6     
  Branches      416      420       +4     
==========================================
+ Hits         1700     1705       +5     
- Misses        344      345       +1     
  Partials        2        2
Impacted Files Coverage Δ
src/typescript-service.ts 85.13% <88.88%> (-0.02%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fcc0ccb...075eb35. Read the comment docs.

Copy link
Contributor

@felixfbecker felixfbecker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

You also need to announce the capability in the InitializeResult.

}
})
})
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like a lot of this implementation is copy-pasted except one line, would it maybe be possible to share to most the code?

@teasp00n
Copy link
Contributor Author

teasp00n commented Jun 16, 2018

You also need to announce the capability in the InitializeResult.

Not sure what I need to do for this. ServerCapabilities appears to just extend vscode.ServerCapabilities with functions specific to this language server. The go to type is part of the spec and should be advertised already as part of vscode.ServerCapabilities or have I misunderstood what you mean?

EDIT: Actually I think I know what you mean, but it looks like it is covered by definitionProvider: true,.

@felixfbecker felixfbecker merged commit d107424 into sourcegraph:master Jun 19, 2018
@felixfbecker
Copy link
Contributor

I added the capability

@felixfbecker
Copy link
Contributor

🎉 This PR is included in version 2.10.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@teasp00n teasp00n deleted the textDocumentTypeDefinition branch June 19, 2018 03:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants