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

Implement Outline view #32

Closed
qseeker opened this issue Feb 17, 2018 · 8 comments
Closed

Implement Outline view #32

qseeker opened this issue Feb 17, 2018 · 8 comments
Labels
enhancement upstream-rls Issues requiring work in the Rust Language Server. Those issues should link to RLS issues.

Comments

@qseeker
Copy link

qseeker commented Feb 17, 2018

Hi
I think that this particular feature is brilliantly done in Eclipse, and I would love to see it realized in Corrosion for Rust in particular.
Here's a screenshot of the outline view displayed by Eclipse for a Java file:

@LucasBullen
Copy link

Outline is already implemented in rls and Corrosion:
screenshot from 2018-02-20 14-11-24
You may have missed it due to an issue found when investigating this issue where the outline will not be shown until the file is edited. Issue reported to rls: rust-lang/rls#725

@akurtakov
Copy link
Member

Lucas, can't we simulate edit to force rls to give us the outline? So outline show directly?

@mickaelistria mickaelistria added enhancement upstream-rls Issues requiring work in the Rust Language Server. Those issues should link to RLS issues. labels Mar 22, 2018
@mickaelistria
Copy link
Contributor

Note that if the ranges returned by the documentSymbols request in RLS were ranges of the whole node (and not a subset of them), then the outline would be rendered as a tree.
Unfortunately, several LS seem to take a different choice of having the range being for example only the name of the symbol in its declaration (which is a bit weak) and make the Outline less interesting than it could be. See related LSP issues microsoft/language-server-protocol#327 , microsoft/language-server-protocol#132 (comment) .

@LucasBullen
Copy link

Update from rls: When making a request during a build, such as asking for outline on document update or open, the response will be generated from the last completed build, and on new files that means no response will be made.

Either the change will have to be made upstream to allow waiting for builds to complete before getting responses back. Or when we receive the rustDocument/diagnosticsEnd message, attempt to refresh the outline view, but I have been unsuccessful in finding a way to refresh outline views.

@mickaelistria
Copy link
Contributor

Either the change will have to be made upstream

Yes, I think that's best. Let's not start wasting resources on workarounds. One of our goals with Corrosion is also to make the RLS better for other IDEs which want to include it, and workarounds in Corrosion are the opposite of that goal.

@akurtakov
Copy link
Member

Has this been fixed in rls already?

@LucasBullen
Copy link

No, a contributor said they were going to work on a pr. I asked for an update.

@mickaelistria
Copy link
Contributor

I'm closing this one as Corrosion already has an Outline view. Further issues should be tracked in different tickets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement upstream-rls Issues requiring work in the Rust Language Server. Those issues should link to RLS issues.
Projects
None yet
Development

No branches or pull requests

4 participants