Skip to content

Outline and notebooks #95234

Closed
Closed

Description

Currently, breadcrumbs and outline don't show anything when having a notebook open. We should come up with a way how this should work and then implement this.

Activity

  1. added
    feature-request
    outline
    on Apr 14, 2020
  2. rebornix commented on Apr 17, 2020

    @rebornix
    Contributor

    Agreed. While implementing Folding for cells, I actually reinvented the algorithm for markdown outlines again: finding # headers and use them as folding ranges. I'm wondering the outline for a notebook document is a mix of

    • Markdown headers
    • Outline for the active cell, which is provided the language

    Showing outlines for every cell is a no-op IMHO as it requires creating text models for each cell.

  3. jrieken commented on Apr 17, 2020

    @jrieken
    ContributorAuthor

    Yeah, that's the challenge here. We can have markdown define the "root structure" of outline but should happen with code cells? Showing outline for them will be expensive because models need to be created - which might already happen anyways when a smart language service is at work... We could differentiate between static outline and dynamic outline

    1. static outline (in the panel and breadcrumbs): Show the structure as defined by markdown headings
    2. dynamic outline (quick outline, breadcrumbs picker): Show the outline of the current cell - be it markdown or code
  4. andycraig commented on Apr 17, 2020

    @andycraig

    Not sure if this is useful information or not but for R Markdown notebooks the R language server provides the outline for the whole document, markdown and code chunks included.

  5. jrieken commented on Apr 20, 2020

    @jrieken
    ContributorAuthor

    Andrew Craig (@andycraig) useful! can you point me to more information about this?

  6. andycraig commented on Apr 20, 2020

    @andycraig

    Johannes Rieken (@jrieken) Here's a screenshot of an R Markdown (.Rmd) file. Note that the markdown headings and the function definitions in the code chunks are shown in the outline. The R language server is providing the symbols for both.

    outline

    The editor panel shows how R Markdown files are currently displayed in VS Code. The new VS Code Notebook seems like it will probably be a good fit for them. The point I wanted to highlight is that depending on the language server, it may already be providing symbols for the markdown as well as the code.

    CC Kun Ren (@renkun-ken), who implemented the handling of markdown in the R language server (as well as a lot of other features).

  7. renkun-ken commented on Apr 20, 2020

    @renkun-ken

    Thanks Andrew Craig (@andycraig) for introducing me to this discussion.

    One thing to notice is that R language server is implemented in R and works for other editors that support LSP and thus is not designed specifically for VSCode.

    Generally, I think mixing markdown outline and document symbols look natural and is easy for users to adopt and work with.

  8. 11 remaining items

  9. jrieken commented on May 14, 2020

    @jrieken
    ContributorAuthor

    We have now table of contents that always for a notebook, using markdown headings and the first non-empty line of code cells. Calling is done for now and waiting for user feedback before moving on.

    Benjamin Pasero (@bpasero) wrt the table of contents provider that I have added, we have #97095 which I am going to use to further purse this

  10. added
    verification-needed
    on May 29, 2020
  11. jrieken commented on May 29, 2020

    @jrieken
    ContributorAuthor

    to verify:

    1. open a notebook like GH issues notebook
    2. make quick outline shows two kind of entries: markdown headers, the first non-empty line of code cells
    3. make sure quick outline can be triggered via keyboard no matter where focus is
    4. make sure quick outline can be triggered via F1
  12. JacksonKearl commented on Jun 4, 2020

    @JacksonKearl
    Contributor

    Finding that Go to Symbol in Editor shows the correct outline information, but the outline pane is empty?

    image

  13. added
    verification-found
    and removed
    verified
    on Jun 4, 2020
  14. jrieken commented on Jun 4, 2020

    @jrieken
    ContributorAuthor

    but the outline pane is empty?

    Yeah, we don't yet want to rewrite the whole outline that's why for now it is just quick outline.

  15. added
    verified
    and removed
    verification-found
    on Jun 4, 2020
  16. added
    on-release-notes
    on Jun 5, 2020
  17. locked and limited conversation to collaborators on Jun 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requestnotebookon-release-notesoutlineverification-neededverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions