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

Contribute symbols to ToC #970

Merged
merged 1 commit into from
Feb 26, 2024
Merged

Conversation

krassowski
Copy link
Member

References

This is an exploration for #556

Limitations:

  • does not replace default ToC sources for python/markdown/latex - changes upstream needed
  • only for files for now, again, we would need to have a way to add a second section in ToC

An argument against merging it for 5.0 is that the code is so minimal (after removing fluff) that maybe we could just contribute it upstream directly? Something to talk about on the dev meeting.

CC @fcollonval

Code changes

Adds new plugin

User-facing changes

image

Backwards-incompatible changes

None

@github-actions
Copy link

Binder 👈 Launch a binder notebook on branch krassowski/jupyterlab-lsp/add-symbols

@fcollonval
Copy link
Contributor

👍 to get this upstreamed


What do you mean by add a second section in ToC?
You would like to get two tree views; one from LSP symbols and one from (?). Why not using only one; for file editor I don't see what would be the difference between the poor existing one and the one coming from LSP symbols. The existing ones could be kept as fallback if no LSP server can provide symbols.

@krassowski
Copy link
Member Author

What do you mean by add a second section in ToC?

Something like LibreOffice having "Headings" and "Tables":

image

For us, in context of Notebook this would be "Headings" and "Code Symbols". I would think this could be implemented using collapsible panels like the debugger/extension manager sections. Does it make sense?

@fcollonval
Copy link
Contributor

For us, in context of Notebook this would be "Headings" and "Code Symbols". I would think this could be implemented using collapsible panels like the debugger/extension manager sections. Does it make sense?

Yes thanks a lot for the snapshot.

@krassowski krassowski marked this pull request as ready for review February 26, 2024 11:00
@krassowski krassowski merged commit 93adefd into jupyter-lsp:main Feb 26, 2024
23 of 24 checks passed
@krassowski krassowski added the enhancement New feature or request label Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants