Commit graph

17832 commits

Author SHA1 Message Date
Max Brunsfeld
258cf6c746
Add inclusive range scope overrides. Don't auto-close quotes at the ends of line comments (#20206)
Closes #9195
Closes #19787

Release Notes:

- Fixed an issue where single quotation marks were spuriously
auto-closed when typing in line comments
2024-11-04 15:36:39 -08:00
Richard Feldman
369de400be
Make rewrapping take tabs more into account (#20196)
Closes #18686


https://github.com/user-attachments/assets/e87b4508-3570-4395-92b4-c5e0e9e19623


Release Notes:

- The Rewrap command now considers the width of each tab character at
the beginning of the line to be the configured tab size.

---------

Co-authored-by: Will <will@zed.dev>
2024-11-04 18:10:40 -05:00
Piotr Osiewicz
dc02894db4
editor: Add scrollbar to info popovers (#20184)
Related to https://github.com/zed-industries/zed/issues/5034

Release Notes:

- Added scrollbar to info popovers in editor.
2024-11-05 00:08:38 +01:00
Patrick Sy
966b18e142
assistant: Fix Gemini 1.5 Pro throwing "missing field 'index' at line N column M" (#20200)
Closes https://github.com/zed-industries/zed/issues/20033

- Fixed deserialization error of `GenerateContentCandidate` where `index` is unexpectedly nil
2024-11-04 17:01:08 -05:00
Kirill Bulatov
24dba07a9b
Do not alter soft wrap based on .editorconfig contents (#20198)
Closes https://github.com/zed-industries/zed/issues/20194

Release Notes:

- Fixed Zed incorrectly changing soft wrap based on .editorconfig
contents ([#20194](https://github.com/zed-industries/zed/issues/20194))
2024-11-04 23:31:40 +02:00
Marshall Bowers
16e9b4ceeb
typescript: Improve installation checks for vtsls (#20197)
This PR improves the installation checks for `vtsls`.

Previously we were checking the installed version of TypeScript against
the latest available version to determine whether we needed to installed
the `vtsls` language server or not.

However, these are two independent concerns, so we should be checking
individually whether `typescript` or `@vtsls/language-server` need to be
installed/updated.

Closes https://github.com/zed-industries/zed/issues/18349.

Release Notes:

- typescript: Fixed an issue where `@vtsls/language-server` may not have
been updated to the latest version.
2024-11-04 16:00:51 -05:00
Richard Feldman
bc4bd2e168
Don't conservatively include Suggest Edits token in token count (#20180)
Some checks are pending
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Linux) Build Remote Server (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Before: (note the 1.3k in the upper right corner instead of 3 in the
second screenshot)

<img width="459" alt="Screenshot 2024-11-04 at 11 37 58 AM"
src="https://github.com/user-attachments/assets/64c06aff-f7d2-42a4-a767-0d7a4ba0f486">

Now:
<img width="631" alt="Screenshot 2024-11-04 at 11 38 11 AM"
src="https://github.com/user-attachments/assets/22af974d-915a-41e1-9ee0-f0622901e242">

This was intended to be a conservative estimate in case you pressed
Suggest Edits (and therefore might have an unpleasant surprise if you
were under the context limit but Suggest Edits failed with a "too much
context" error message anyway, after the Suggest Edits context got added
for you behind the scenes).

However, in retrospect this design created more [confusion in the common
case](https://github.com/zed-industries/zed/pull/19900#issuecomment-2453456569)
because it made it look like more context had been actually consumed
than what was actually consumed.

This does raise a potential design question for the future: the Suggest
Edits button adds more context at the last minute without ever
communicating that it's going to do that.

In the meantime it seems best to go back to the less-confusing way of
reporting the token counts, especially since only users of the
experimental flag could possibly press Suggest Edits anyway.

Release Notes:

- Fixed issue where initial token count was over-reported as 1.3k
instead of 3 (for the context string "You").
2024-11-04 15:40:10 -05:00
Max Brunsfeld
4d3a18cbdc
Fix two auto-indent issues with Markdown and YAML (#20193)
Closes #13376
Closes #13338

Release Notes:

- Fixed unhelpful auto-indent suggestions in markdown.
- Added `auto_indent_on_paste` setting, which can be used on a
per-language basis, to configure whether indentation should be adjusted
when pasting. This setting is enabled by default for languages other
than YAML and Markdown.
2024-11-04 12:29:38 -08:00
Conrad Irwin
cfcbfc1d82
Fix saving files as *.sql on macOS Sequoia (#20195)
Closes #16969

Release Notes:

- Fixed a bug in macOS Sequoia where you can't save a new file as
`*.sql`, it would rename to `.sql.s`. As a side effect you can no longer
save a new file as `*sql.s`. We hope to remove this workaround when the
operating system fixes its bug; in the meantime you can either set
`"use_system_path_prompts": false` in your settings file to skip the
macOS dialogues, or create new files by right clicking in the project
panel.
2024-11-04 13:23:59 -07:00
Avinash Thakur
c9ec235b12
Sort completions by relevance for strong matches (#20145)
Further enhancement:
On exploring VSCode's sorting logic, there are two major distinctions:
* A config option exists to adjust sort priority of snippets. They can
be placed inline (default), top or at bottom of completitions.
* The sorting order sorts by (in order): sort_text (lower case),
sort_text, kind

ref:
6f2d4781e8/src/vs/editor/contrib/suggest/browser/suggest.ts (L338-L383)

Closes #19786

Release Notes:

- Improved sort order in completions to show relevant matches first
([#19786](https://github.com/zed-industries/zed/issues/19786))
2024-11-04 22:23:36 +02:00
Marshall Bowers
8196db6022
settings: Include null in the type for optional settings (#20192)
This PR updates all settings that are defined as `Option`s to include
`null` in their type.

This prevents warnings from being displayed when `null` is used a
default value.

Closes https://github.com/zed-industries/zed/issues/18006.

Release Notes:

- Updated the settings schema to allow `null` as a value for optional
settings instead of showing a warning.
2024-11-04 14:25:44 -05:00
Piotr Osiewicz
dc5fad52a3
diagnostics: Improve performance with large # of diagnostics (#20189)
Related to: https://github.com/zed-industries/zed/issues/19022

Release Notes:

- Improve editor performance with large # of diagnostics.

---------

Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-11-04 12:16:02 -07:00
Marshall Bowers
77de20c23a
settings: Allow null as a value for font fallback fields (#20186)
This PR updates the `buffer_font_fallbacks` and `ui_font_fallbacks`
settings to allow `null` as a value instead of showing a warning.

Related to https://github.com/zed-industries/zed/issues/18006.

Release Notes:

- Updated the settings schema to allow `null` as a value for
`buffer_font_fallbacks` and `ui_font_fallbacks` instead of showing a
warning.
2024-11-04 12:58:10 -05:00
Nate Butler
e1cb8a66f0
Add pages to theme_preview (#20185)
Added some simple logic + an example of adding pages to the theme
preview. Will be used for organizing theme preview sections.

Release Notes:

- N/A
2024-11-04 12:57:36 -05:00
Marshall Bowers
7025d3f29d
Extract outline rendering to outline crate (#20179)
This PR extracts the `render_item` implementation for outlines to the
`outline` crate to help reduce `language`'s dependence on `theme`.

Release Notes:

- N/A
2024-11-04 11:54:37 -05:00
Bennet Bo Fenner
4bbde40267
recent projects: Fix inconsistent keybinding with which window is replaced or not (#20176)
This removes the inconsistency between these two workflows:
- Clicking on the project name in the upper left shows:
<img width="333" alt="image"
src="https://github.com/user-attachments/assets/f54c34b4-67ab-4cbc-85ee-845c41aa4a8c">

- Using `projects: Open recent` shows:
<img width="337" alt="image"
src="https://github.com/user-attachments/assets/b1eb244f-ce28-4e6c-8404-b6cd88caef1e">

---

We now use `enter` to re-use the window and `cmd-enter` to open a new
window in both cases

Closes #16361

Release Notes:

- Fixed an inconsistency in the recent project picker, where different
keybindings would determine whether to reuse the window or not
2024-11-04 17:41:25 +01:00
Bennet Bo Fenner
15e7b67559
markdown preview: Refresh preview when file is changed outside of the editor (#20175)
Closes #20091

Release Notes:

- Fixed an issue where the markdown preview would not update when a
markdown file was changed outside of the editor
2024-11-04 17:23:32 +01:00
Mike Lloyd
f0aeab7d00
Add surround aliases (#20104)
Closes #19417

Release Notes:

- vim : Added `r` and `a` as aliases for `[` and `<` text objects
(copying vim-surround).
- vim: (breaking change) rebound the function argument text object to
`g`.
- vim: Fixed surrounds to allow `b`/`B`/`r`/`a` anywhere you could use
`(`, `{`, `[`, `<`.

---


- vim: Added `b`, `B`, `r`, `s`, `a` as aliases for `()`, `{}`, `[]`,
`<>` in vim surround mode.
- Adds a new `surround_alias` function where aliases are defined.
- This function is used in `find_surround_pairs` to substitute the
chosen text with the alias
- The keymap is also modified to add support for Square and Angle
brackets when changing surrounds. These two were added to follow the
example of Tim Pope's ubiquitous `vim-surround` plugin.
- I had to overwrite the `vim::Argument` keybind in order to do this. I
moved it to use the `g` modifier. I realize this is a breaking change
and will happily move the `vim::AngleBracket` keymap to a different
letter if you'd like to avoid this. I'm just trying to keep with
convention. Ideally, Users would be able to define surround aliases
themselves in the config file but that's a much bigger task than I'm
able to do right now.
- I also added tests for the new aliases.

Thanks for making such a clean and organized codebase. I was able to
find the relevant section of code rather quickly thanks to this.
2024-11-04 09:03:27 -07:00
bangbangsheshotmedown
4bbddcad31
extension: Add support for labelDetails for LSP completions (#20144)
Closes #14278


be7336e92a/src/completion.rs (L419-L429)


be7336e92a/src/completion.rs (L555-L572)


Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-11-04 11:02:19 -05:00
Kirill Bulatov
d90770c673
Actually reuse previous search entries (#20171)
Release Notes:

- Improved outline panel performance during large project searches
2024-11-04 17:21:09 +02:00
Danilo Leal
376a45528d
assistant: Improve role button loading state (#20125)
We've received feedback that it wasn't clear how to cancel/interrupt the
LLM while it's generating a response. Additionally, I also had folks
telling me that the loading state was hard to notice—the pulsating
animation is too subtle on its own. This PR attempts to improve both of
these things. The end result is:


![llm](https://github.com/user-attachments/assets/57a94f8a-c254-4011-adc0-7c63ed13daa1)

Release Notes:

- N/A
2024-11-04 10:12:27 -03:00
Jason Lee
20eeb78251
chore: Update BranchListDelegate to use WeakView<Workspace> (#20157)
Some checks are pending
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Linux) Build Remote Server (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
2024-11-04 12:17:11 +02:00
Jonathan Toledo
67be6ec3b5
copilot: Add support for new models (#19968)
Closes #19963

This PR implements integration with the newly announced GitHub Copilot
LLM models, including:
- Claude 3.5 Sonnet
- o1-mini
- o1-preview

Release Notes:

- N/A

---------

Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
2024-11-04 10:55:20 +01:00
Lilith Iris
070e5914c9
markdown renderer: Add copy icon button for code block (#19312)
Closes #19061

I don't know should i add tooltip or not

Before

![image](https://github.com/user-attachments/assets/0729806b-9b0d-442a-8f71-92c0443f34ef)

After

![image](https://github.com/user-attachments/assets/08eb5178-4139-44e7-a23f-50133233911d)

Release Notes:

- Markdown Preview: Added button to copy code blocks.

---------

Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
2024-11-04 10:40:46 +01:00
Kirill Bulatov
c41a8e33a0
Fix file reloading not populating the history (#20156)
Closes https://github.com/zed-industries/zed/issues/20111
Closes https://github.com/zed-industries/zed/issues/20153

cc @mikayla-maki and @ConradIrwin 

Release Notes:

- Fixed undo stack corruption on external file changes
([#20111](https://github.com/zed-industries/zed/issues/20111))
([#20153](https://github.com/zed-industries/zed/issues/20153))

Co-authored-by: Antonio Scandurra <antonio@zed.dev>
2024-11-04 11:30:15 +02:00
Bennet Bo Fenner
25443a91ca
image viewer: Show path in breadcrumbs (#20155)
Closes #10057

<img width="354" alt="image"
src="https://github.com/user-attachments/assets/47afe8fd-c8ac-45af-be9a-9ca8c5e066f6">

Release Notes:

- Show path in breadcrumbs/toolbar when opening an image
2024-11-04 10:18:21 +01:00
Roshan Padaki
8e00caf23b
go: Add go-generate runnables and tasks (#19987)
I was missing the `go generate` runnable from other editors so I figured
I'd implement one here! Now, comments of the form `//go:generate` can
prompt for the `go generate <package>` task. Meanwhile, I've also added
a global `go generate ./...` task.

~When making the global task, I noticed that the existing `go test
./...` task runs tests in subdirectories of the CWD of the active
editor, whereas I would really expect it to run all tests across my
project. I have changed to use the latter behavior (run relative to
project root) for both `go generate ./...` and `go test ./...`. Please
let me know if the prior behavior was intended, and I can revert.~

Release Notes:

- Added runnable and tasks for `go generate` commands
2024-11-04 10:13:15 +01:00
Bennet Bo Fenner
9a869f0c5f
project panel: Focus editor when single-clicking on file and preview tabs are disabled (#20154)
Closes #4324

Release Notes:

- Fixed an issue where single-clicking on a file in the project panel
would not focus the editor, when preview tabs are disabled
2024-11-04 10:02:55 +01:00
Marc
de2483e132
terminal: Do not show multibuffer hint when in centered pane (#20137)
Co-Authored-by: Bennet <bennet@zed.dev>


![image](https://github.com/user-attachments/assets/581f493e-aa9b-4767-8029-6ab83755336b)

Release Notes:

- Fixed an issue where the multibuffer hint was shown when terminal was
in centered mode

Co-authored-by: Bennet <bennet@zed.dev>
2024-11-04 09:19:48 +01:00
Richard Feldman
773a3b335e
Expand selections to Replace block boundaries (#20092)
Some checks are pending
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Linux) Build Remote Server (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Max <max@zed.dev>
2024-11-01 16:10:19 -04:00
Conrad Irwin
b5c38e9a09
Remoting: Fix connecting to servers with long hostnames (#20093)
Closes #20018

Release Notes:

- Remoting: Fixed connecting to hosts with long (>~50 character)
hostnames
2024-11-01 13:52:21 -06:00
Marshall Bowers
273173ec8a
Revert "theme: Turn ThemeRegistry into a trait (#20076)" (#20094)
This PR reverts #20076 to turn the `ThemeRegistry` back into a regular
struct again.

It doesn't actually help us by having it behind a trait.

Release Notes:

- N/A
2024-11-01 15:34:20 -04:00
Conrad Irwin
4084ba36f9
Fix clang popovers (#20090)
Closes  #15498

Release Notes:

- Fixed info popups from clangd missing information
2024-11-01 13:28:34 -06:00
Marshall Bowers
770886880f
Add new extension crate (#20089)
Some checks are pending
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Linux) Build Remote Server (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
This PR adds a new `extension` crate, containing some contents extracted
from the `extension_host`.

Right now it contains just the `ExtensionManifest` and
`ExtensionBuilder`, although we may move more of the extension interface
into here.

The introduction of the `extension` crate allows us to depend on it in
the `extension_cli`, thereby eliminating the need for the `no-webrtc`
feature on a number of crates.

Release Notes:

- N/A
2024-11-01 13:20:30 -04:00
Marshall Bowers
ea44c510a3
Rename extension crate to extension_host (#20081)
This PR renames the `extension` crate to `extension_host`.

This is to free up the name so that we can create a smaller-scoped
`extension` crate.

Release Notes:

- N/A
2024-11-01 12:53:02 -04:00
Kirill Bulatov
c8f1969916
Fix the outline panel's focus tracking (#20083)
Closes https://github.com/zed-industries/zed/issues/20073

Release Notes:

- Fixed outline panel navigation
([https://github.com/zed-industries/zed/issues/20073](#20073))

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2024-11-01 18:01:10 +02:00
Marshall Bowers
a960344301
theme: Remove unused staff parameter for listing themes (#20077)
This PR removes the `staff` parameter for listing themes, as it was not
used.

Release Notes:

- N/A
2024-11-01 10:54:21 -04:00
Marshall Bowers
af9e7f1f96
theme: Turn ThemeRegistry into a trait (#20076)
This PR converts the `ThemeRegistry` type into a trait instead of a
concrete implementation.

This allows for the extension store to depend on an abstraction rather
than the concrete theme registry implementation.

We currently have two `ThemeRegistry` implementations:

- `RealThemeRegistry` — this was previously the `ThemeRegistry` and
contains the real implementation of the registry.
- `VoidThemeRegistry` — a null object that doesn't have any behavior.

Release Notes:

- N/A
2024-11-01 10:19:09 -04:00
Piotr Osiewicz
95842c7987
gpui: Add scroll anchors (#19894)
## Problem statement
I want to add keyboard navigation support to SSH modal. Doing so is
possible in current landscape, but not particularly ergonomic;
`gpui::ScrollHandle` has `scroll_to_item` API that takes an index of the
item you want to scroll to. The problem is, however, that it only works
with it's immediate children - thus in order to support scrolling via
keyboard you have to bend your UI to have a particular layout. Even when
your list of items is perfectly flat, having decorations inbetween items
is problematic as they are also children of the list, which means that
you either have to maintain the mapping to devise a correct index of an
item that you want to scroll to, or you have to make the decoration a
part of the list item itself, which might render the scrolling imprecise
(you might e.g. not want to scroll to a header, but to a button beneath
it).

## The solution
This PR adds `ScrollAnchor`, a new kind of handle to the gpui. It has a
similar role to that of a ScrollHandle, but instead of tracking how far
along an item has been scrolled, it tracks position of an element
relative to the parent to which a given scroll handle belongs. In short,
it allows us to persist the position of an element in a list of items
and scroll to it even if it's not an immediate children of a container
whose scroll position is tracked via an associated scroll handle.
Additionally this PR adds a new kind of the container to the UI crate
that serves as a convenience wrapper for using ScrollAnchors. This
container provides handlers for `menu::SelectNext` and
`menu::SelectPrev` and figures out which item should be focused next.

Release Notes:

- Improve keyboard navigation in ssh modal
2024-11-01 14:47:46 +01:00
Conrad Irwin
daa9939c03
vim: o should scroll (#20054)
Closes: #19684

Release Notes:

- vim: Fixed `o` not scrolling new head into view
2024-10-31 23:26:04 -06:00
Conrad Irwin
f757e5a6c3
vim: Add :noh[lsearch] (#20056)
Closes: #18590

Release Notes:

- vim: Add :noh[lsearch]
2024-10-31 23:25:59 -06:00
Conrad Irwin
ecb874db62
vim: Fix gU$ (#20057)
Closes: #19380

Release Notes:

- vim: Fixed `gu$` missing last character of the line
2024-10-31 23:25:54 -06:00
Conrad Irwin
75f1862268
vim: Add (half of) ctrl-v/ctrl-q (#19585)
Release Notes:

- vim: Add `ctrl-v`/`ctrl-q` to type any unicode code point. For example
`ctrl-v escape` inserts an escape character(U+001B), or `ctrl-v u 1 0 E
2` types ტ (U+10E2). As in vim `ctrl-v ctrl-j` inserts U+0000 not
U+000A. Zed does not yet implement insertion of the vim-specific
representation of the typed keystroke for other keystrokes.
- vim: Add `ctrl-shift-v` as an alias for paste on Linux
2024-10-31 23:25:42 -06:00
Conrad Irwin
f8ab86f930
Simplify line normalization (#19712)
Release Notes:

- Added \u2028 and \u2029 to invisible characters. Previously these were
treated as \n.
2024-10-31 22:24:24 -06:00
Boris Cherny
b87c4a1e13
assistant: Add health telemetry (#19928)
This PR adds a bit of telemetry for Anthropic models, in order to
understand model health. With this logging, we can monitor and diagnose
dips in performance, for example due to model rollouts.

Release Notes:

- N/A

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2024-10-31 16:21:26 -07:00
Conrad Irwin
a0988508f0
SSHHELL escaping.... (#20046)
Closes #20027 
Closes #19976 (again)

Release Notes:

- Remoting: Fixed remotes with non-sh/bash/zsh default shells
- Remoting: Fixed remotes running busybox's version of gunzip
2024-10-31 16:10:03 -06:00
Nate Butler
a347c4def7
Add theme preview (#20039)
Some checks are pending
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Linux) Build Remote Server (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
This PR adds a theme preview tab to help get an at a glance overview of
the styles in a theme.

![CleanShot 2024-10-31 at 11 27
18@2x](https://github.com/user-attachments/assets/798e97cf-9f80-4994-b2fd-ac1dcd58e4d9)

You can open it using `debug: open theme preview`.

The next major theme preview PR will move this into it's own crate, as
it will grow substantially as we add content.

Next for theme preview:

- Update layout to two columns, with controls on the right for selecting
theme, layer/elevation-index, etc.
- Cover more UI elements in preview
- Display theme colors in a more helpful way
- Add syntax & markdown previews


Release Notes:

- Added a way to preview the current theme's styles with the `debug:
open theme preview` command.
2024-10-31 11:40:38 -04:00
Marshall Bowers
8d1f377bf0
assistant: Add example streaming slash command (#20034)
This PR adds a `/streaming-example` slash command for the purposes of
showcasing streaming during development.

This slash command is only available to staff and isn't intended to be
shipped to the general public.

Release Notes:

- N/A
2024-10-31 10:53:47 -04:00
Kirill Bulatov
f766f6ceae
Do less work when revealing entries in the outline panel (#20031)
Before this change, we were trying to determine current element before
debouncing, causing a lot of extra work on caret movement. Now, we only
do this for the task that managed to wait the entire debounce period.

Closes https://github.com/zed-industries/zed/issues/19817
Closes https://github.com/zed-industries/zed/issues/14235

Release Notes:

- Fixed outline panel-related performance issues when selections change
in the large document
([#19817](https://github.com/zed-industries/zed/issues/19817)),
([#14235](https://github.com/zed-industries/zed/issues/14235))
2024-10-31 16:29:19 +02:00
Kyle Kelley
9dad897d49
Clean up notebook item creation in project (#20030)
* Implement `clone_on_split` to allow splitting a notebook into another
pane

* Switched to `tab_content` in `impl Item for NotebookEditor` to show
both the notebook name and an icon

* Added placeholder methods and TODOs for future work, such as saving,
reloading, and search functionality within the notebook editor.

* Started moving more core `Model` bits into `NotebookItem`, including
pulling the language of the notebook (which affects every code cell)

* Loaded notebook asynchronously using `fs`

Release Notes:

- N/A

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2024-10-31 07:01:46 -07:00