Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch between files #19

Closed
olafurpg opened this issue Jun 28, 2017 · 8 comments
Closed

Switch between files #19

olafurpg opened this issue Jun 28, 2017 · 8 comments
Assignees

Comments

@olafurpg
Copy link
Member

Currently, metadoc only works for a single source file. It should be possible to switch between files when jumping to symbols defined in other compilation units.

@jonas
Copy link
Collaborator

jonas commented Jun 29, 2017

For inspiration of how this could be implemented using the internal EditorService service see the example given here: microsoft/monaco-editor#291 (comment)

@jonas
Copy link
Collaborator

jonas commented Jun 29, 2017

After some digging in the vscode codebase here are some more inspiration if we go the route of providing our own override services.

@olafurpg olafurpg self-assigned this Jun 29, 2017
@olafurpg
Copy link
Member Author

Thanks for the links @jonas. I will try to take a stab at this.

@olafurpg
Copy link
Member Author

olafurpg commented Jul 1, 2017

I'm struggling with this one, my progress so far is here https://github.com/scalameta/metadoc/compare/filenames?expand=1

It seems ITextModelService is what we really want, but I can't figure out how we call registerTextModelContentProvider with a custom ITextModelContentProvider. Once we nail that, I suspect implementing the provideTextContent will be quite simple.

Any ideas?

@jonas
Copy link
Collaborator

jonas commented Jul 1, 2017

I think you are close. ITextModelService was recently renamed from ITextModelResolverService so using the name textModelResolverService might be the missing piece.

BTW I suggest you create a PR as it makes it easier to comment.

@jonas
Copy link
Collaborator

jonas commented Jul 1, 2017

Also I don't think we necessarily need to care about registerTextModelContentProvider if we control the resolver service ourselves.

@olafurpg
Copy link
Member Author

olafurpg commented Jul 2, 2017

textModelResolverService is what I was missing! I got something working now in #33 😄

@olafurpg olafurpg mentioned this issue Jul 2, 2017
olafurpg added a commit that referenced this issue Jul 3, 2017
@olafurpg
Copy link
Member Author

olafurpg commented Jul 3, 2017

Fixed in #33

@olafurpg olafurpg closed this as completed Jul 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants