forked from zed-industries/zed
-
Notifications
You must be signed in to change notification settings - Fork 0
Jupyter notebook support #7
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 task
Raeddarabseh
approved these changes
Jul 8, 2024
TODO: - [ ] File a PR with Yarn to add Zed to the list of supported IDEs. Fixes: zed-industries#10107 Fixes: zed-industries#13706 Release Notes: - Improved experience in projects using Yarn. Run `yarn dlx @yarnpkg/sdks base` in the root of your project in order to elevate your experience. --------- Co-authored-by: Saurabh <79586784+m4saurabh@users.noreply.github.com>
…ndustries#14207) This PR updates the `/docs` slash command to show a message to more clearly indicate when there are no available docs providers. <img width="379" alt="Screenshot 2024-07-11 at 10 31 53 AM" src="https://github.com/zed-industries/zed/assets/1486634/d079f87c-4933-4da9-ad82-34dbfe6a284c"> Release Notes: - N/A
It seems `hold: false` causes alacritty to close the channel earlier, without waiting for the output from the child command to go to Zed. Fixes [zed-industries#13683](zed-industries#13683) Release Notes: - Fixed loosing output of a spawned task ([zed-industries#13683](zed-industries#13683)). [Screencast from 2024-07-06 18-28-56.webm](https://github.com/zed-industries/zed/assets/39293/4ebef8b5-7c0d-46be-9341-4ac0d809458d)
Release Notes: - N/A
…ies#14209) This PR updates the Wasm API compatibility check to allow Nightly to load extensions using v0.0.7 of the Zed extension API. Release Notes: - N/A
- Mostly just tweaking some design (colors & spacing) stuff - Some small accessibility things—e.g., underline decoration for links and one h1 only per page - Most of the other captured changes are really just Prettier indenting stuff Release Notes: - N/A
- Linux (default) add ctrl-shift-j - Linux (default) remove ctrl-j - Conflicted with: `"ctrl-j": "workspace::ToggleBottomDock",` - MacOS (sublime) add cmd-shift-j
This PR bumps the Svelte extension to v0.0.2. Changes: - zed-industries#12788 Release Notes: - N/A
The `Bounds<DevicePixels>` we use to create a window represents the size of the drawable area. ### Before: https://github.com/zed-industries/zed/assets/14981363/52f0d196-b113-4b64-a0d1-407972674990 ### After https://github.com/zed-industries/zed/assets/14981363/83298b6c-5e5f-4a47-b051-35b4a02404ac Release Notes: - N/A
When I implemented zed-industries#13701, I kinda messed up with the reversed selections, thinking that their anchors are flipped, so I flipped them again. This caused the reverse selections to always be cleared Release Notes: - Fix reverse selections always being cleared, even if the right click was performed inside
`buffer_line_height` has been requested in zed-industries#5590 and implemented in zed-industries#2718, however the documentation was still lacking. Release Notes: - N/A
…ariables in integrated terminal (zed-industries#14213)  These two environment variables are essential when people need to detect terminal type and do something. Many popular terminals set them. fixes zed-industries#4571 Release Notes: - Set `TERM_PROGRAM` and `TERM_PROGRAM_VERSION` environment variables in the integrated terminal ([zed-industries#4571](zed-industries#4571)).
…#14139) Release Notes: - vim: Fixed `c <motion>` omitting trailing multibyte characters ([zed-industries#13909](zed-industries#13909)).
Allows deleting the outputs directly within the editor. This also fixes the overlap logic to make sure that the ends and the starts are compared. https://github.com/zed-industries/zed/assets/836375/84f5f582-95f3-4c6a-a3c9-54da6009e34d Release Notes: - N/A --------- Co-authored-by: Antonio <antonio@zed.dev>
…ustries#14177) # Issue When a user does something that changes the cursor shape, such as when switching between vim modes, there may be an up to 500ms (cursor blink interval) delay until the user receives feedback for their action. This happens when the shape change happens during the invisible phase of a blink - the user will not see the cursor shape change until the next phase, which could be 500ms away. # Solution Cursor shape changes should disrupt blinking by forcing the cursor to be shown, this results in immediate feedback for shape changes. This is in line with the behavior of other editors I've tried. Release Notes: - Improved visual feedback when changing cursor shape
Release Notes: - vim: (BREAKING) Improved vim keymap contexts. Previously `vim_mode == normal` was true even when operators were pending, which led to bugs like zed-industries#13789 and a requirement for custom keymaps to exclude various conditions like (`!VimObject` and `!VimWaiting`) to avoid bugs. Now `vim_mode` will be set to `operator` or `waiting` in these cases as described in [the docs](https://zed.dev/docs/vim#keybindings). For most custom keymaps this change will be a no-op or an improvement, but if you were deliberately relying on the old behaviour (if you were relying on `VimObject` or `VimWaiting` becoming true) you will need to update your keymap. --------- Co-authored-by: Thorsten <thorsten@zed.dev>
Previously http://google.com would get modified to https://http://google.com which doesn't work. I assume http links should be supported. Release Notes: - N/A
Fixed tarball documentation links for linux aarch64 (they were pointing at x86_64 tarballs) Release Notes: - N/A
…tries#14247) This PR updates the `/docs` slash command to use a more generic icon to convey docs. It was still using the Rust icon, a relic of when it was still `/rustdoc`. Release Notes: - N/A
Add support for aligning items to the baseline. Release Notes: - N/A --------- Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
… doc` (zed-industries#14262) This PR updates the `/docs` slash command to show a warning to the user if a crate's docs cannot be indexed due to the target directory not containing docs: <img width="782" alt="Screenshot 2024-07-11 at 5 11 46 PM" src="https://github.com/user-attachments/assets/2f54f7a1-97f4-4d2d-b51f-57ba31e50a2f"> Release Notes: - N/A
…ters (zed-industries#14269) Also, don't retrieve code snippets when rendering the repl quick action button Release Notes: - N/A --------- Co-authored-by: Kyle Kelley <kylek@zed.dev> Co-authored-by: Kyle Kelley <rgbkrk@gmail.com>
This change pulls in kvark/blade#135 and updates the simplelog dependency for compatibility with that. Release Notes: - linux: Show link to troubleshooting docs when we can't open a window
Release Notes: - linux: Fixed a panic if we request a cursor style your system doesn't support
* Work on outputs * Work * Produce cell output buffers * Bugfix, but we're still seeing no outputs * Better way to do syntax highlighting * Didn't mean to comment that * Clean up a bit * (Some) Output cells print * Remove commented code * Aesthetics * Error forwarding utility and cleanup * Simple outputs display
* Remove duplicate Cargo deps entry and sort * Moving along * Progress (exclamation point) * More progress * I don't think things will work this way. * Horrendous state but some progress I think * I think this will do * A little cleanup * Work testing code execution * Work testing code execution * Work testing code execution * Now we're talking (exclamation point) * Kernel connection * Reorganize a little bit * test_server.py -> src/jupyter/connection.py
* Superfluous change that was nonetheless bugging me * Fill out, consolidate Cells initialization and SumTree dimensions * Commit work while I try to undo accidental find+replace-all * Work on updating outputs * Include Python modules * Small post-rebase fixes * Progress on adding new cell * Checkpoint * We can insert cells * We can insert cells * Wow that took much longer than expected * Get current cell ID from buffer * Include cell ID in KernelMessage event * Remove stale output of current cell when run * IT WORKS * Clean up a little bit
Mark output when execution successful
30ce278 to
f3e9d53
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
This branch contains a sketch of Jupyter notebook support for Zed. Given that there are already efforts underway to develop such functionality, I would be content for the upshot of the present implementation to be my familiarizing myself with the codebase and having some fun. However, if there is desire to incorporate any part of this work, please let me know! I would be happy to continue developing it.
(As an aside, the top-line LOC changed figures are somewhat misleading, as ~2K lines are attributable to lock files.)
The code is organized as follows:
crates/notebook/srcactions.rs-- Notebook actionscell.rs-- Encapsulation of notebook cell functionality, primarily in theCellandCellsstructs. The former represents an individual cell; the latter represents an ordered collection of cells and contains functionality for managing the cells' relations to theMultiBufferthrough which the cell contents are exposed via anEditor.chat.rs-- Chat functionality that can be accessed from within the notebook.common.rs-- Common utilitieseditor.rs-- ProvidesNotebookEditor, a wrapper around aView<Editor>through which a user can interact with the notebook (e.g. by inserting new cells or running the presently focused cell/selection).jupyter/-- While still aspirational, my intention is for this directory to contain Jupyter-specific functionality and to make the coreNotebook,Cells,NotebookEditorconstructs sufficiently generic so as to support other kinds of interactive development. The present implementation usespyo3to integrate a Python-based kernel connection construct that uses thejupyter_clientPython package directly into Zed, and thejupyter/directory contains the relevant code.jupyter/connection.py-- Provides theKernelConnectionPython construct, which exposesjupyter_clientfunctionality for use in theJupyterKernelClientRust struct.jupyter/message.py-- Provides Pydantic models for Jupyter messages.jupyter/message.rs-- Provides Rust models for Jupyter messages.jupyter/python.rs-- Provides utilities for integrating asynchronous Python applications in Zed.kernel.rs-- Provides theJupyterKernelClientthrough which theNotebookEditorinteracts with the kernel. Upon initialization, theJupyterKernelClientlaunches a background task that listens for commands from the client and messages from the kernel via theKernelConnection. When the kernel publishes a message, a Python forwarder sends the message to the background task via a channel, and the task in turn emits an event containing the message. TheNotebookEditorin turn subscribes to the client and updates the notebook accordingly. (Arguably this should be injupyter/.)notebook.rs-- Provides theNotebookcontainer forCells, the handle for the client, and methods for deserialization of.ipynbfiles.The notebook view itself just uses the present
Editorover aMultiBuffer, where each cell is represented as excerpts spanning its respective source and outputBuffers. I'm sure it would be preferable to tailor this view, but it served rather well for a prototype. I would be curious to see whether a newEditorModevariant, e.g.EditorMode::Notebookwould be a good means of including such customizations.The present implementation only supports plaintext output.
notebook.mov