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

lsp: textDocument/documentSymbol support #195

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

stephen
Copy link
Contributor

@stephen stephen commented Dec 26, 2017

This PR adds support for textDocument/documentSymbol to the lsp-compatible server.

Here's a screenshot in vscode:
outline

@stephen
Copy link
Contributor Author

stephen commented Jan 3, 2018

@asiandrummer could you ptal at this and #196?

@asiandrummer
Copy link
Contributor

Yeah sorry - I'll review this now

Field: SymbolKind.Field,
OperationDefinition: SymbolKind.Class,
FragmentDefinition: SymbolKind.Class,
FragmentSpread: SymbolKind.Struct,
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we look to add more symbols in the future, e.g. ObjectTypeExtension and such?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds reasonable to me - I haven't worked very much with the SDL, so I only implemented what the outline code already does here: https://github.com/stephen/graphql-language-service/blob/90c4c5899f3f14216794636749210386fa749427/packages/interface/src/getOutline.js#L21-L30

Copy link
Contributor

@asiandrummer asiandrummer left a comment

Choose a reason for hiding this comment

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

Thanks for implementing this - I'll cut a release with a fix I'm planning to add soon.

@lostplan
Copy link
Collaborator

lostplan commented Feb 6, 2018

This is awesome, merge pls? 🙏

@stephen
Copy link
Contributor Author

stephen commented Apr 26, 2018

@asiandrummer how can i convince y'all to take a look at this again? Happy to rebase and sort out merge conflicts if that's all it needs.

@lostplan
Copy link
Collaborator

I'm happy to take a look (next week at the soonest)

@lostplan
Copy link
Collaborator

Looks good to me. @stephen if you could rebase etc then I think it should be merged.

@nathanchapman
Copy link

Any update? This would be really nice to have. @stephen

@acao
Copy link
Member

acao commented Dec 12, 2019

well well well, time to recreate this for the new monorepo at https://github.com/graphql/graphiql!

some of this is gonna have to be re-done in TS but the server is still made with flow. can't wait to have this in monaco -> new graphiql too :D

@stephen @lostplan @nathanchapman what's the move? if i dont hear anything in ~1 week, I'll go ahead and take care of it, with full dev/review attribution of course! trying to get this merged in the next month or so, my bad for accidentally leaving this hanging after the migration, so important! and it was ready! le sigh.

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.

5 participants