Skip to content

Adopt new DocumentSymbol APIΒ #2230

Closed
Closed

Description

With the 1.25 release we have finalised the API for the outline tree. A DocumentSymbolProvider should now return document symbols which can represent a hierarchy and that can differentiate between the full range of a symbol and the selection range, e.g. the name of a function.

Note that we synthesise trees using range-containment when a provider returns SymbolInformation-objects and that that isn't perfect. Adopting the new API makes the outline more robust and support features like follow-cursor and diagnostics association.

Let me know if need more information is needed. Happy Coding!

Activity

  1. jrieken commented on Jul 6, 2018

    @jrieken
    Author
  2. bobbrow commented on Jul 6, 2018

    @bobbrow
    Contributor

    What are the rules to update the outline view? I turned it on for a bit and it seemed to be stale as I added new code items to the file. We currently only update our document symbols list when the file is saved, but the outline didn't update when I saved the file.

    EDIT:
    Ah, I get it now. We use the LSP to communicate with VS Code, so we're using the SymbolInformation stuff you mentioned above. I'm not sure if/when the vscode-languageclient module will support this. Is it on Dirk's backlog to add this?

  3. jrieken commented on Jul 9, 2018

    @jrieken
    Author

    Yeah, Dirk is on it. I hope the LSP updates soon

  4. go2sh commented on Sep 7, 2018

    @go2sh

    microsoft/language-server-protocol#327 is fixed. This feature would rock the world. Especially for editing large files and classes.

  5. micmelesse commented on Nov 2, 2018

    @micmelesse

    Where should I start if I wanted to help with this? This feature would be very useful for me.

  6. sean-mcmanus commented on Nov 2, 2018

    @sean-mcmanus
    Contributor

    Michael Melesse (@micmelesse) It requires changes to our closed source code, so unfortunately you can't help unless you work for Microsoft. We sometimes mark bugs that could be fixed with our open source typescript with "help wanted".

  7. lijh8 commented on Nov 20, 2018

    @lijh8

    Source Insight* provides two outline views, one for symbols inside file, another for project wide.
    It seems it takes you forever to implement the outline / symbol view in your code project.
    What is your plan to implement on this?

    With this feature, your code project is a source code editor.
    Without it, your code is just another text editor.

  8. bobbrow commented on Nov 20, 2018

    @bobbrow
    Contributor

    We prioritize features based on the number of upvotes. Please add your +1 to the original post to voice your support for this feature.

  9. runelabs commented on Jan 5, 2019

    @runelabs

    Bob Brown (@bobbrow) this issue is currently placed at #12 in terms of πŸ‘. Does that mean that it is finally being considered now?

    The issues ahead of this one have been around for 2+ years, so I don't understand how the prioritization process actually is supposed to work though... You guys use some weighting and dependencies as well, right? Perhaps milestone-labeling could be helpful for clarifying - so that so it doesn't start to seem like this is just an issue graveyard/gulag.

  10. sean-mcmanus commented on Jan 7, 2019

    @sean-mcmanus
    Contributor

    runelabs (@runelabs) Being number 12 means there are 11 features with higher priority (along with feedback received from our survey). But this issue might be quick to fix compared to the others so that makes it more likely to get finished sooner. I don't know enough about out schedule to put it on a milestone date yet, but we will add it once we figure out our plan for the next few months.

  11. VinayGupta23 commented on Apr 7, 2019

    @VinayGupta23

    If fixing this solves #2556 and #2401, then I am up-voting this. I intend to use VS Code as a full-time editor for my C/C++ code base, but lack of this feature makes it really hard to navigate the code :(

  12. sean-mcmanus commented on Apr 9, 2019

    @sean-mcmanus
    Contributor

    Vinay Gupta (@VinayGupta23) Yeah, those issues should be fixed via this issue.

  13. 5 remaining items

  14. added
    fixed
    on Sep 13, 2019
  15. HasanChoton commented on Sep 25, 2019

    @HasanChoton

    Please support

  16. lmlong commented on Sep 27, 2019

    @lmlong

    the outline should not be plain, it shall be a tree like view that have the member/methods unders the class name . Currently I cannot find a specified method through the outline as many similar classes are in one big cpp file

  17. bobbrow commented on Sep 30, 2019

    @bobbrow
    Contributor

    The fix for this will be in 0.26.0.

  18. sean-mcmanus commented on Oct 2, 2019

    @sean-mcmanus
    Contributor
  19. sean-mcmanus commented on Oct 16, 2019

    @sean-mcmanus
    Contributor

    Improved document symbols are available with 0.26.0.

  20. psclkhoury commented on Oct 16, 2019

    @psclkhoury

    Sean McManus (@sean-mcmanus) I am using 0.26.0 but the Follow Cursor option in the outline is not working.

  21. awmorgan commented on Oct 16, 2019

    @awmorgan

    This 0.26.0 removed Alt+N C/C++ Navigate...

    Is there the new way to do what the 0.25.1 Alt+N keyboard shortcut did?

    Ctrl+Shift+O is close to previous functionality, but it seems to have dropped the declaration qualifier that was so you can see the difference between declaration and definition in the symbol list.

  22. bobbrow commented on Oct 17, 2019

    @bobbrow
    Contributor

    pascal (@psclkhoury) can you open a new issue with more information about your problem? We've tested out the Follow Cursor feature in the Outline view and it is working for us. There may be something special about your code that we're not handling well.
    image

    awmorgan, there is a command "Focus Breadcrumbs" that you can use in place of the old Navigate command. The default key combo is CTL+SHIFT+., but you can map that to ALT+N if you prefer that key combo instead.

  23. psclkhoury commented on Oct 18, 2019

    @psclkhoury

    Bob Brown (@bobbrow) I realized that it is only not working in some files, I will try to see what is causing it and then open a new issue. Thanks

  24. locked and limited conversation to collaborators on Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Feature RequestLanguage Servicefixed

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions