zed/crates/gpui/src
Kyle Kelley 221edfc267
Bring Jupyter to Zed Editing (#12062)
Run any Jupyter kernel in Zed on any buffer (editor):

<img width="1074" alt="image"
src="https://github.com/zed-industries/zed/assets/836375/eac8ed69-d02b-4d46-b379-6186d8f59470">

## TODO

### Lifecycle

* [x] Launch kernels on demand
* [x] Wait for kernel to be started
* [x] Request Kernel info on start
* [x] Show in progress indicator
* [ ] Allow picking kernel (it defaults to first matching language name)
* [ ] Menu for interrupting and shutting down the kernel
* [ ] Drop running kernels once editor is dropped

### Media Outputs

* [x] Render text and tracebacks with ANSI color handling
* [x] Render markdown as text
* [x] Render PNG and JPEG images using an explicit height based on
line-height
* ~~Render SVG~~ -- not happening for this PR due to lack of text in SVG
support
* [ ] Process `update_display_data` message and related `display_id`
* [x] Process `page` data from payloads as outputs
* [ ] Render markdown as, well, rendered markdown -- Note: unsure if we
can get line heights here

### Document

* [x] Select code and run
* [x] Run current line
* [x] Clear previous overlapping runs
* [ ] Support running markdown code blocks
* [ ] Action to export session as notebook or output files
* [ ] Action to clear all outputs
* [ ] Delete outputs when lines are deleted

## Other missing features

The following is a list of missing functionality or expectations that
are out of scope for this PR.

### Python Environments

Detecting python environments should probably be done in a separate PR
in tandem with how they're used with LSP. Users likely want to pick an
environment for their project, whether a virtualenv, conda env, pyenv,
poetry backed virtualenv, or the system. Related issues:

* https://github.com/zed-industries/zed/issues/7646
* https://github.com/zed-industries/zed/issues/7808
* https://github.com/zed-industries/zed/issues/7296

### LSP Integration

* Submit `complete_request` messages for completions to interleave
interactive variables with LSP
* LSP for IPython semantics (`%%timeit`, `!ls`, `get_ipython`, etc.)

## Future release notes

- Run code in any editor, whether it's a script or a markdown document

Release Notes:

- N/A
2024-06-17 10:02:31 -07:00
..
app Enable linux tests (#12493) 2024-06-13 16:38:53 -07:00
elements Reveal the selected item when cycling a picker's selection (#12950) 2024-06-12 17:40:53 -07:00
keymap vim: Implement named registers (#12895) 2024-06-12 10:40:27 -06:00
platform linux: Update cosmic_text (#13095) 2024-06-15 15:23:00 -07:00
text_system Enable linux tests (#12493) 2024-06-13 16:38:53 -07:00
window Merge ElementContext into WindowContext (#10979) 2024-04-25 12:54:39 +02:00
action.rs gpui-macros: Hide autogenerated action types/functions (#10417) 2024-04-11 15:38:47 +02:00
app.rs Pull app / OS info out of GPUI, add Linux information, make fallible window initialization (#12869) 2024-06-11 11:43:12 -07:00
arena.rs
asset_cache.rs gpui: Add SVG rendering to img element and generic asset cache (#9931) 2024-03-29 17:09:49 -07:00
assets.rs Make tests less noisy (#12463) 2024-05-29 18:06:45 -07:00
bounds_tree.rs Fix flickering (#9012) 2024-03-11 10:45:57 +01:00
color.rs Introduce an outline panel (#12637) 2024-06-12 23:22:52 +03:00
element.rs gpui: Pass Style by value to request_layout (#11597) 2024-05-09 11:38:53 +02:00
executor.rs Bring Jupyter to Zed Editing (#12062) 2024-06-17 10:02:31 -07:00
geometry.rs Fix issues where screen and window sizes contained Pixels, but were declared as DevicePixels (#12991) 2024-06-13 10:48:37 -07:00
global.rs Make a macro for less boilerplate when moving variables (#12182) 2024-05-22 22:07:29 -07:00
gpui.rs gpui: Improve Global ergonomics (#11923) 2024-05-16 12:47:43 -04:00
input.rs
interactive.rs Pull app / OS info out of GPUI, add Linux information, make fallible window initialization (#12869) 2024-06-11 11:43:12 -07:00
key_dispatch.rs Merge ElementContext into WindowContext (#10979) 2024-04-25 12:54:39 +02:00
keymap.rs
platform.rs Fix issues where screen and window sizes contained Pixels, but were declared as DevicePixels (#12991) 2024-06-13 10:48:37 -07:00
prelude.rs
scene.rs Add an animation to the LSP checking indicator (#9463) 2024-03-19 10:16:18 -07:00
shared_string.rs
shared_uri.rs
style.rs Introduce an outline panel (#12637) 2024-06-12 23:22:52 +03:00
styled.rs Add col/row resize cursor styles (#11406) 2024-05-06 14:22:56 -07:00
subscription.rs Refine inline transformation UX (#12939) 2024-06-13 08:35:22 +02:00
svg_renderer.rs Make tests less noisy (#12463) 2024-05-29 18:06:45 -07:00
taffy.rs chore: Fix clippy for upcoming 1.79 Rust release (#12727) 2024-06-06 12:46:53 +02:00
test.rs Throttle the sending of UpdateFollowers messages (#8918) 2024-03-06 14:58:41 +01:00
text_system.rs Enable linux tests (#12493) 2024-06-13 16:38:53 -07:00
util.rs Prompt library updates (#11988) 2024-05-22 18:04:47 -04:00
view.rs Introduce Editor::insert_flaps and Editor::remove_flaps (#12096) 2024-05-21 20:23:37 +02:00
window.rs Don't hide inline assist when editor loses focus (#12990) 2024-06-17 09:43:52 +02:00