) -> Self {
+ Self::new(id).rounding(ButtonLikeRounding::Right)
+ }
+
pub(crate) fn height(mut self, height: DefiniteLength) -> Self {
self.height = Some(height);
self
diff --git a/crates/ui/src/components/icon.rs b/crates/ui/src/components/icon.rs
index fde5523147..b87d80232c 100644
--- a/crates/ui/src/components/icon.rs
+++ b/crates/ui/src/components/icon.rs
@@ -91,7 +91,7 @@ impl IconSize {
}
#[derive(
- Debug, Eq, PartialEq, Copy, Clone, EnumIter, EnumString, IntoStaticStr, Serialize, Deserialize,
+ Debug, PartialEq, Eq, Copy, Clone, EnumIter, EnumString, IntoStaticStr, Serialize, Deserialize,
)]
pub enum IconName {
Ai,
@@ -118,6 +118,8 @@ pub enum IconName {
CaseSensitive,
Check,
ChevronDown,
+ /// This chevron indicates a popover menu.
+ ChevronDownSmall,
ChevronLeft,
ChevronRight,
ChevronUp,
@@ -160,11 +162,11 @@ pub enum IconName {
Font,
FontSize,
FontWeight,
- GenericClose,
- GenericMaximize,
- GenericMinimize,
- GenericRestore,
Github,
+ GenericMinimize,
+ GenericMaximize,
+ GenericClose,
+ GenericRestore,
Hash,
HistoryRerun,
Indicator,
@@ -194,9 +196,6 @@ pub enum IconName {
PullRequest,
Quote,
Regex,
- ReplPlay,
- ReplOff,
- ReplPause,
ReplNeutral,
Replace,
ReplaceAll,
@@ -235,12 +234,12 @@ pub enum IconName {
Trash,
TriangleRight,
Update,
- Visible,
WholeWord,
XCircle,
ZedAssistant,
ZedAssistantFilled,
ZedXCopilot,
+ Visible,
}
impl IconName {
@@ -270,6 +269,7 @@ impl IconName {
IconName::CaseSensitive => "icons/case_insensitive.svg",
IconName::Check => "icons/check.svg",
IconName::ChevronDown => "icons/chevron_down.svg",
+ IconName::ChevronDownSmall => "icons/chevron_down_small.svg",
IconName::ChevronLeft => "icons/chevron_left.svg",
IconName::ChevronRight => "icons/chevron_right.svg",
IconName::ChevronUp => "icons/chevron_up.svg",
@@ -312,11 +312,11 @@ impl IconName {
IconName::Font => "icons/font.svg",
IconName::FontSize => "icons/font_size.svg",
IconName::FontWeight => "icons/font_weight.svg",
- IconName::GenericClose => "icons/generic_close.svg",
- IconName::GenericMaximize => "icons/generic_maximize.svg",
- IconName::GenericMinimize => "icons/generic_minimize.svg",
- IconName::GenericRestore => "icons/generic_restore.svg",
IconName::Github => "icons/github.svg",
+ IconName::GenericMinimize => "icons/generic_minimize.svg",
+ IconName::GenericMaximize => "icons/generic_maximize.svg",
+ IconName::GenericClose => "icons/generic_close.svg",
+ IconName::GenericRestore => "icons/generic_restore.svg",
IconName::Hash => "icons/hash.svg",
IconName::HistoryRerun => "icons/history_rerun.svg",
IconName::Indicator => "icons/indicator.svg",
@@ -346,10 +346,7 @@ impl IconName {
IconName::PullRequest => "icons/pull_request.svg",
IconName::Quote => "icons/quote.svg",
IconName::Regex => "icons/regex.svg",
- IconName::ReplPlay => "icons/repl_play.svg",
- IconName::ReplPause => "icons/repl_pause.svg",
IconName::ReplNeutral => "icons/repl_neutral.svg",
- IconName::ReplOff => "icons/repl_off.svg",
IconName::Replace => "icons/replace.svg",
IconName::ReplaceAll => "icons/replace_all.svg",
IconName::ReplaceNext => "icons/replace_next.svg",
@@ -387,12 +384,12 @@ impl IconName {
IconName::Trash => "icons/trash.svg",
IconName::TriangleRight => "icons/triangle_right.svg",
IconName::Update => "icons/update.svg",
- IconName::Visible => "icons/visible.svg",
IconName::WholeWord => "icons/word_search.svg",
IconName::XCircle => "icons/error.svg",
IconName::ZedAssistant => "icons/zed_assistant.svg",
IconName::ZedAssistantFilled => "icons/zed_assistant_filled.svg",
IconName::ZedXCopilot => "icons/zed_x_copilot.svg",
+ IconName::Visible => "icons/visible.svg",
}
}
}
diff --git a/docs/src/repl.md b/docs/src/repl.md
index e7fdc0c035..9c932ff6ac 100644
--- a/docs/src/repl.md
+++ b/docs/src/repl.md
@@ -8,12 +8,13 @@ This feature is in active development. Details may change. We're delighted to ge
+## Getting started
-The built-in REPL for Zed allows you to run code interactively in your editor similarly to a notebook with your own text files.
+Bring the power of [Jupyter kernels](https://docs.jupyter.org/en/latest/projects/kernels.html) to your editor! The built-in REPL for Zed allows you to run code interactively in your editor similarly to a notebook with your own text files.
-To start using the REPL, add the following to your Zed `settings.json` to bring the power of [Jupyter kernels](https://docs.jupyter.org/en/latest/projects/kernels.html) to your editor:
+To start using the REPL, add the following to your Zed `settings.json`:
```json
{
@@ -23,22 +24,53 @@ To start using the REPL, add the following to your Zed `settings.json` to bring
}
```
-After that, install any of the supported kernels:
+## Installation
-* [Python](#python)
-* [TypeScript via Deno](#deno)
+Zed supports running code in multiple languages. To get started, you need to install a kernel for the language you want to use.
-## Python
+**Currently supported languages:**
+
+* [Python (ipykernel)](#python)
+* [TypeScript (Deno)](#typescript-deno)
+
+
+Once installed, you can start using the REPL in the respective language files, or other places those languages are supported, such as Markdown.
+
+
+
+## Using the REPL
+
+To start the REPL, open a file with the language you want to use and use the `repl: run` command (defaults to CMD + Enter on macOS). You can also click on the REPL icon in the toolbar.
+
+The `repl: run` command will be executed on your selection(s), and the result will be displayed below the selection.
+
+Outputs can be cleared with the `repl: clear outputs` command, or from the REPL menu in the toolbar.
+
+## Changing Kernels {#changing-kernels}
+
+Work in Progress!
+
+## Language specific instructions
+
+### Python {#python}
+
+#### Global environment
+
+
+
+On MacOS, your system Python will _not_ work. Either set up [pyenv](https://github.com/pyenv/pyenv?tab=readme-ov-file#installation) or use a virtual environment.
+
+
-### Global environment
To setup your current python to have an available kernel, run:
```
+pip install ipykernel
python -m ipykernel install --user
```
-### Conda Environment
+#### Conda Environment
```
source activate myenv
@@ -47,7 +79,7 @@ python -m ipykernel install --user --name myenv --display-name "Python (myenv)"
```
-### Virtualenv with pip
+#### Virtualenv with pip
```
source activate myenv
@@ -55,7 +87,7 @@ pip install ipykernel
python -m ipykernel install --user --name myenv --display-name "Python (myenv)"
```
-## Deno
+### Typescript: Deno {#typescript-deno}
[Install Deno](https://docs.deno.com/runtime/manual/getting_started/installation/) and then install the Deno jupyter kernel:
@@ -63,10 +95,12 @@ python -m ipykernel install --user --name myenv --display-name "Python (myenv)"
deno jupyter --unstable --install
```
-## Other languages
+### Other languages
-* [Julia](https://github.com/JuliaLang/IJulia.jl)
+The following languages and kernels are also supported. You can help us out by expanding their installation instructions and configuration:
+
+* [Julia (IJulia)](https://github.com/JuliaLang/IJulia.jl)
* R
- - [Ark Kernel from Positron, formerly RStudio](https://github.com/posit-dev/ark)
+ - [Ark Kernel](https://github.com/posit-dev/ark) - via Positron, formerly RStudio
- [Xeus-R](https://github.com/jupyter-xeus/xeus-r)
-* [Scala](https://almond.sh/docs/quick-start-install)
+* [Scala (almond)](https://almond.sh/docs/quick-start-install)