Commit graph

2969 commits

Author SHA1 Message Date
Ömer Sinan Ağacan
dc5ffe6994
Fix GoToDefinition changing the viewport unnecessarily (#18441)
Closes #10738.

Release Notes:

- Fixed `GoToDefinition` changing the viewport (scrolling up/down) even when the definition is already within the viewport. ([#10738](https://github.com/zed-industries/zed/issues/10738))
2024-09-27 17:55:03 +03:00
Conrad Irwin
1be3c44550
vim: Support za (#18421)
Closes #6822
Updates #5142 

Release Notes:

- Added new fold actions to toggle folds (`cmd-k cmd-l`), fold every
fold (`cmd-k cmd-0`) unfold every fold (`cmd-k cmd-j`) to fold
recursively (`cmd-k cmd-[`) and unfold recursively (`cmd-k cmd-]`).
- vim: Added `za` to toggle fold under cursor.
- vim: Added `zO`/`zC`/`zA` to open, close and toggle folds recursively
(and fixed `zc` to not recurse into selections).
- vim: Added `zR`/`zM` to open/close all folds in the buffer.
2024-09-26 23:52:07 -06:00
Kirill Bulatov
c83d007138
Remove non-wrapping settings from the language configuration (#18412)
Some checks are pending
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 / (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
Closes https://github.com/zed-industries/zed/issues/17736

Those are limited with 1024 symbols before wrapping still, and were
introduced for git diff deleted hunks display.
Instead of confusing people with actually wrapping, restores behavior
that was before https://github.com/zed-industries/zed/pull/11080

Release Notes:

- Removed confusing soft wrap option behavior
([#17736]https://github.com/zed-industries/zed/issues/17736)
2024-09-26 23:43:58 +03:00
thataboy
11058765be
Add ability to separately set background color for highlighted brackets (#17566)
Closes https://github.com/zed-industries/zed/issues/16380

Currently brackets are highlighted with
`editor.document_highlight.read_background`. This commit adds a separate
`editor.document_highlight.bracket_background` theme setting so bracket
highlights can be made more prominent without doing the same to other
highlights, making the display too busy.

(My own theme)


https://github.com/user-attachments/assets/29a8c05e-2f1a-4c16-9be8-a4b4cb143548

I set defaults for light and dark theme that I hope are sensible and not
too obnoxious, but noticeable so people can change it if they don't like
it.

Release Notes:

- Added `editor.document_highlight.bracket_background` field to the
theme to set background color of highlighted brackets.
- This will fall back to `editor.document_highlight.read_background`, if
not set.

<img width="355" alt="Screenshot 2024-09-08 at 8 46 57 AM"
src="https://github.com/user-attachments/assets/3270bb4d-19f5-4b34-8003-982377b2ceb6">
<img width="444" alt="Screenshot 2024-09-08 at 9 03 27 AM"
src="https://github.com/user-attachments/assets/3b12d84d-913c-4bde-9132-9b10f4a8d49b">

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-09-26 12:48:23 -04:00
Thorsten Ball
7eea1a6f51
git blame gutter: Use smallest possible space (#18145)
Before:
![screenshot-2024-09-26-15 00
20@2x](https://github.com/user-attachments/assets/f6706325-5bef-404e-a0b4-63a5121969fa)

After:

![screenshot-2024-09-26-15 02
24@2x](https://github.com/user-attachments/assets/739d0831-0b4a-457f-917e-10f3a662e74d)


Release Notes:

- Improved the git blame gutter to take up only the space required to
display the longest git author name in the current file.

---------

Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
2024-09-26 15:47:14 +02:00
Galen Elias
1a4f9b2891
Fix minimum gutter line number spacing (#18021)
I was inspecting how Zed did the layout in the editor, specifically for
the gutter, and noticed that `em_width * X` is being used as the 'width
of X consecutive characters'. Howevever, that math didn't work for me,
because em_width doesn't account for the space between characters, so
you can't just multiply it by a character count.

One place this is actually noticeable is in the logic for
`min_width_for_number_on_gutter`, where we try to reserve 4 characters
of line number space. However, once you actually hit 4 characters, the
actual width is bigger, causing things to resize. This seems clearly
counter to the intent of the code.

It seems the more correct logic is to use `em_advance` which accounts
for the space between the characters. I am leaving the rest of the uses
of `em_width` for generic padding. It is also possible that
`column_pixels()` would be the more correct fix here, but it wasn't
straightforward to use that due to it residing EditorElement source
file.

On my MacBook this increases the width of the gutter by 6 pixels when
there are <999 lines in the file, otherwise it's identical.

It might be worth doing some more general audit of some of the other
uses of em_width as a concept. (e.g. `git_blame_entries_width`)


https://github.com/user-attachments/assets/f2a28cd5-9bb6-4109-bf41-1838e56a75f9

Release Notes:

- Fix a slight gutter flicker when going over 999 lines
2024-09-26 16:30:06 +03:00
Thorsten Ball
3f415f3587
Fix use_on_type_format setting being unused per language (#18387)
Before this change, `use_on_type_format` would only have an effect when
defined on a global level in our settings.

But our default.json settings would also document that it's used in
language settings, i.e.:

```json
{
  "languages": {
    "C": {
      "use_on_type_format": false
    },
    "C++": {
      "use_on_type_format": false
    }
  }
}
```

But this did **not** work.

With the change, it now works globally and per-language.

Release Notes:

- Fixed `use_on_type_format` setting not working when defined inside
`"languages"` in the settings. This change will now change the default
behavior for C, C++, and Markdown, by turning language server's
`OnTypeFormatting` completions off by default.

Co-authored-by: Bennet <bennet@zed.dev>
2024-09-26 12:27:08 +02:00
Thorsten Ball
2d2e20f9d4
editor: Fix cursor shape not restoring when setting removed (#18379)
Closes #18119

Release Notes:

- Fixed the cursor shape in the editor not changing back to default when
`{"cursor_shape": "..."}` setting is removed. (Does not apply to Vim
mode.)
2024-09-26 11:07:07 +02:00
Max Brunsfeld
6167688a63
Proposed changes editor features (#18373)
Some checks are pending
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 / (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 some more functionality to the Proposed Changes Editor
view, which we'll be using in
https://github.com/zed-industries/zed/pull/18240 for allowing the
assistant to propose changes to a set of buffers.

* Add an `Apply All` button, and fully implement applying of changes to
the base buffer
* Make the proposed changes editor searchable
* Fix a bug in branch buffers' diff state management

Release Notes:

- N/A
2024-09-25 16:33:00 -07:00
Max Brunsfeld
21a023980d
Expand git diffs when clicking the gutter strip, display their controls in a block above (#18313)
Todo:

* [x] Tooltips for hunk buttons
* [x] Buttons to go to next and previous hunk
* [x] Ellipsis button that opens a context menu with `Revert all`

/cc @iamnbutler @danilo-leal for design 👀 

Release Notes:

- Changed the behavior of the git gutter so that diff hunk are expanded
immediately when clicking the gutter, and hunk controls are displayed
above the hunk.

---------

Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-09-25 12:50:38 -07:00
Piotr Osiewicz
a6cb17fb51
chore: Fix violations of elided_named_lifetimes (#18330)
I compile Zed from nightly build pretty often and I've noticed that
we're getting a few hits on new rustc lint:
https://github.com/rust-lang/rust/pull/129207

Release Notes:

- N/A
2024-09-25 12:27:57 +02:00
Conrad Irwin
d33600525e
ssh remoting: Fix cmd-o (#18308)
Release Notes:

- ssh-remoting: Cmd-O now correctly opens files on the remote host

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2024-09-24 16:23:08 -06:00
Max Brunsfeld
fdb03d3058
Move DisplayDiffHunk into hunk_diff module (#18307)
Release Notes:

- N/A

Co-authored-by: Marshall <marshall@zed.dev>
2024-09-24 18:16:27 -04:00
Max Brunsfeld
da1ef13442
Fix detection that a diff hunk is expanded (#18302)
Release Notes:

- N/A

---------

Co-authored-by: Marshall <marshall@zed.dev>
2024-09-24 17:39:44 -04:00
Marshall Bowers
21be70f278
Improve diff hunks (#18283)
This PR improves the display of diff hunks:

- Deleted hunks now show a regular line indicator in the gutter when
expanded
- The rounding on the diff indicators in the gutter has been removed.

We also did some refactoring to ensure the sizing of the diff indicators
in the gutter were consistent.

#### Collapsed

<img width="1624" alt="Screenshot 2024-09-24 at 11 13 26 AM"
src="https://github.com/user-attachments/assets/f864dc83-cbbc-4d81-a62b-65c406ed310a">

#### Expanded

<img width="1624" alt="Screenshot 2024-09-24 at 11 13 35 AM"
src="https://github.com/user-attachments/assets/04d382ca-e0e6-4f1c-92eb-cd1e3a031c2c">


Release Notes:

- Improved the appearance of diff hunks in the editor.

---------

Co-authored-by: Max <max@zed.dev>
2024-09-24 11:40:08 -04:00
Antonio Scandurra
d989183f94
Remove Debug constraint on SumTree (and its related traits/structs) (#18248)
Release Notes:

- N/A

Co-authored-by: Nathan <nathan@zed.dev>
2024-09-23 16:21:24 -06:00
Conrad Irwin
e4080ef565
Move formatting to LSP store (#18242)
Release Notes:

- ssh-remoting: Fixed format on save

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2024-09-23 13:33:28 -07:00
Antonio Scandurra
7051bc00c2
Add "Fix with Assistant" code action on lines with diagnostics (#18163)
Release Notes:

- Added a new "Fix with Assistant" action on code with errors or
warnings.

---------

Co-authored-by: Nathan <nathan@zed.dev>
2024-09-23 11:40:34 -06:00
Max Brunsfeld
743feb98bc
Add the ability to propose changes to a set of buffers (#18170)
This PR introduces functionality for creating *branches* of buffers that
can be used to preview and edit change sets that haven't yet been
applied to the buffers themselves.

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Co-authored-by: Marshall <marshall@zed.dev>
2024-09-20 18:28:50 -04:00
Conrad Irwin
45388805ad
vim: gq (#18156)
Closes #ISSUE

Release Notes:

- vim: Added gq/gw for rewrapping lines
2024-09-20 13:02:39 -06:00
Marshall Bowers
8bd624b5db
editor: Remove unneeded blank lines in rewrap test cases (#18152)
This PR removes some unneeded blank lines from some of the test cases
for `editor::Rewrap`.

These weren't meaningful to the test, and their presence could be
confusing.

Release Notes:

- N/A
2024-09-20 13:06:43 -04:00
Marshall Bowers
759646e0a3
editor: Improve rewrapping when working with comments at different indentation levels (#18146)
This PR improves the `editor::Rewrap` command when working with comments
that were not all at the same indentation level.

We now use a heuristic of finding the most common indentation level for
each line, using the deepest indent in the event of a tie.

It also removes an `.unwrap()` that would previously lead to a panic in
this case. Instead of unwrapping we now log an error to the logs and
skip rewrapping for that selection.

Release Notes:

- Improved the behavior of `editor: rewrap` when working with a
selection that contained comments at different indentation levels.
2024-09-20 11:45:03 -04:00
Marshall Bowers
ab1d466c5f
Remove replica_id from MultiBuffers (#18141)
This PR removes the `replica_id` field from the `MultiBuffer` struct.

We were only ever referencing this field to pass when constructing a
`MultiBuffer`, and never used it outside of that.

Release Notes:

- N/A
2024-09-20 10:48:27 -04:00
Thorsten Ball
93730983dd
ssh remoting: Restore items/buffers when opening SSH project (#18083)
Demo:


https://github.com/user-attachments/assets/ab79ed0d-13a6-4ae7-8e76-6365fc322ec4



Release Notes:

- N/A

Co-authored-by: Bennet <bennet@zed.dev>
2024-09-20 08:04:49 +02:00
Danilo Leal
a7977aa64d
Tweak multibuffer header padding (#18011) 2024-09-18 17:18:56 +02:00
Marshall Bowers
373a17acf4
Add ability to display backgrounds for inlay hints (#18010)
This PR adds the ability to display backgrounds for inlay hints within
the editor.

This is controlled by the new `inlay_hints.show_background` setting.
This setting defaults to `false`.

To enable the setting, add the following to your `settings.json`:

```json
{
  "inlay_hints": {
    "enabled": true,
    "show_background": true
  }
}
```

When enabled, the inlay hint backgrounds will use the `hint.background`
color from the theme.

| Disabled | Enabled |
|
--------------------------------------------------------------------------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------------------------------------------------------------------------
|
| <img width="1624" alt="Screenshot 2024-09-17 at 4 21 53 PM"
src="https://github.com/user-attachments/assets/5534d09b-1e22-4c6f-9d82-314796ed7d22">
| <img width="1624" alt="Screenshot 2024-09-17 at 4 21 43 PM"
src="https://github.com/user-attachments/assets/6ec58cde-6115-4db4-be95-97c5f2f54b2d">
|

Related issues:

- #12485
- #17392

Release Notes:

- Added an `inlay_hints.show_background` setting to allow displaying
backgrounds for inlay hints in the editor.
  - This setting defaults to `false`.
- If enabled, the inlay hint backgrounds will use the `hint.background`
color from the theme.
2024-09-18 11:11:38 -04:00
Joseph T. Lyons
425c8f8c3e
Alphabetize actions (#18007)
Drive-by maintenance PR while working on another PR.

Release Notes:

- N/A
2024-09-18 10:42:17 -04:00
Antonio Scandurra
2e72fd210a
Replace Default trait bound with a zero function on Summary/Dimension (#17975)
This lets us provide a context when constructing the zero value. We need
it so we can require anchors to be associated with a buffer id, which
we're doing as part of simplifying the multibuffer API.

Release Notes:

- N/A

Co-authored-by: Nathan <nathan@zed.dev>
2024-09-17 19:43:59 -06:00
Marshall Bowers
4d074fc737
editor: Fix rewrap with a non-empty selection (#17980)
This PR fixes an issue where rewrapping would not occur with a non-empty
selection.

It is only the expansion to neighboring lines that needs to be gated by
an empty selection.

Release Notes:

- N/A
2024-09-17 19:20:45 -04:00
Peter Tripp
c28b22d1cf
Update typos-cli to v1.24.6. Add scripts/check-spelling. Fix typos (#17961) 2024-09-17 15:08:14 -04:00
Thorsten Ball
f1d21362fa
editor: Fix cursor_shape regression by not setting it to "bar" (#17934)
This fixes the regression introduced here:
https://github.com/zed-industries/zed/pull/17572#issuecomment-2355632615

Essentially: instead of always setting the value when saving settings,
we don't set it by default, but fall back to the default value if it's
not set.

That fixes Vim mode's cursor being overwritten when settings change.

Release Notes:

- N/A
2024-09-17 15:37:43 +02:00
Peter Tripp
83192c29e8
Try and fix tests (#17920)
Tests on main started breaking following
bc5ed1334f
from:
- https://github.com/zed-industries/zed/pull/17734

First breakage:
https://github.com/zed-industries/zed/actions/runs/10894059586/job/30230118999
2024-09-16 23:16:08 -04:00
thataboy
a141415bd3
Add cursor_shape setting for the default editor (#17572)
Closes https://github.com/zed-industries/zed/issues/16451,
https://github.com/zed-industries/zed/issues/14447,
https://github.com/zed-industries/zed/issues/7203

Addresses but does not closes
https://github.com/zed-industries/zed/issues/5179

Expose cursor shape selection to users. Possibly controversial, since
block cursor seems preserved for vim and terminal. But the heart wants
what it wants?

Release Notes:

- Added a setting for `cursor_shape`. Can be `bar`, `block`,
`underline`, or `hollow`. Default is `bar`.
2024-09-16 21:01:43 -06:00
Kevin Wang
d315405be1
Return completion proposals from inline completion providers (#17578)
Updates the inline completion provider to return a completion proposal
which is then converted to a completion state. This completion proposal
includes more detailed information about which inlays specifically
should be rendered.

Release Notes:

- Added support for fill-in-the-middle style inline completions


![image](https://github.com/user-attachments/assets/1830700f-5a76-4d1f-ac6d-246cc69b64c5)
2024-09-16 20:57:58 -06:00
Max Brunsfeld
bc5ed1334f
Upgrade tree sitter and all grammars (#17734)
Fixes https://github.com/zed-industries/zed/issues/5291

Release Notes:

- Fixed a bug where the 'toggle comments' command didn't use the right
comment syntax in JSX and TSX elements.

---------

Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2024-09-16 17:10:57 -07:00
Marshall Bowers
b54b3d6246
editor: Add rewrap command (#17909)
This PR adds a rewrap command to the editor.

Executing this command will rewrap the text in the selection to the
maximum line width:


https://github.com/user-attachments/assets/69aa9428-17fd-4315-89f1-f354d0f5f459

If there isn't an active selection, the selection will be expanded to
contiguous text from the cursor's location.

Rewrapping only works in Markdown, Plain Text, and within comments for
any other language.

Release Notes:

- Added an `editor: rewrap` command for rewrapping text to the maximum
line width.

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Bennet <bennet@zed.dev>
2024-09-16 19:58:22 -04:00
Conrad Irwin
e66ea9e5d4
Fix renames over language server for SSH remoting (#17897)
Release Notes:

- ssh remoting: Fix rename over language server

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Max <max@zed.dev>
2024-09-16 16:20:17 -06:00
Thorsten Ball
e3d54b2211
vim: Fix ctrl-b not moving the cursor (#17808)
Closes #17687

Release Notes:

- Fixed `ctrl-b` not moving the cursor.

---------

Co-authored-by: Abdelhakim Qbaich <abdelhakim@qbaich.com>
Co-authored-by: Pete LeVasseur <plevasseur@gmail.com>
2024-09-16 15:01:20 +02:00
Nate Butler
fac9ee5f86
Add ui_macros crate & DerivePathStr derive macro (#17811)
This PR adds the `ui_macros` crate to allow building supporting macros
for the `ui` crate.

Additionally, it implements the `DerivePathStr` derive macro and the
`path_str` attribute macro. These macros work together to generate a
`path` method for enum variants, which is useful for creating
standardized string representations of enum variants.

The `DerivePathStr` macro provides the following functionality:
- Generates a `path` method for each enum variant.
- Allows specifying a prefix (required) and suffix (optional) for all
paths.
- Supports `strum` attributes for case conversion (e.g., snake_case,
lowercase).

Usage example:

```rust
#[derive(DerivePathStr)]
#[path_str(prefix = "my_prefix", suffix = ".txt")]
#[strum(serialize_all = "snake_case")]
enum MyEnum {
    VariantOne,
    VariantTwo,
}

// Generated paths:
// MyEnum::VariantOne.path() -> "my_prefix/variant_one.txt"
// MyEnum::VariantTwo.path() -> "my_prefix/variant_two.txt"
```

In a later PR this will be used to automate the creation of icon & image
paths in the `ui` crate.

This gives the following benefits:

1. Ensures standard naming of assets as paths are not manually
specified.
2. Makes adding new enum variants less tedious and error-prone.
3. Quickly catches missing or incorrect paths during compilation.
3. Adds a building block towards being able to lint for unused assets in
the future.

Release Notes:

- N/A
2024-09-13 16:45:16 -04:00
Thorsten Ball
adbe973f02
editor: In OpenFile check if file with path_suffix exists (#17805)
Demo:


https://github.com/user-attachments/assets/6acb6c1e-bb15-4205-9dcb-2aa4bb99dcf9



Release Notes:

- When using `OpenFile` (`gf` in Vim mode) and the word under the cursor
is not an existing file path, we now fall back and additionally check
whether a file called
`<word-under-cursor>.<language-specific-path-suffixes>` exists. That's
similar to Vim's `suffixesadd` option.

---------

Co-authored-by: Abdelhakim Qbaich <abdelhakim@qbaich.com>
Co-authored-by: Pete LeVasseur <plevasseur@gmail.com>
2024-09-13 15:11:10 -04:00
CharlesChen0823
3613ebd93c
editor: Fix an error when cut with vim visual line select (#17591)
Some checks are pending
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 / (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
Becuause in vim visual mode, we will always select next char, hit
[here](66ef318823/crates/vim/src/visual.rs (L174)),
when using editor method
for `cut` this selection, will hit this error.

Closes #17585 

Release Notes:

- N/A

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-09-12 16:55:59 -04:00
Conrad Irwin
4d26f83d23
Revert "settings: Remove auxiliary Content types where possible (#16744)" (#17768)
This breaks setting `{"scrollbar": {"show":"never"}}`
Release Notes:

- N/A
2024-09-12 14:46:08 -04:00
Marshall Bowers
0043b0d957
editor: Render documentation popovers using UI font (#17761)
This PR updates the documentation popovers to render non-code using the
UI font:

<img width="603" alt="Screenshot 2024-09-12 at 11 10 46 AM"
src="https://github.com/user-attachments/assets/c5be0676-0f0f-4ff6-8a96-76b44684e1cf">

<img width="347" alt="Screenshot 2024-09-12 at 11 21 12 AM"
src="https://github.com/user-attachments/assets/842ba922-9837-45c1-9cf2-846fe8362f99">

Requested by @davidbarsky.

Release Notes:

- Changed documentation popovers to render Markdown prose using the UI
font instead of the buffer font. Code blocks still using the buffer
font.
2024-09-12 11:32:24 -04:00
Thorsten Ball
3a6a29f117
vim: Fix inline completions showing up in normal mode (#17727)
Booleans are hard.

Release Notes:

- Fixed inline completions showing up in Vim normal mode.
2024-09-11 16:13:17 -04:00
Piotr Osiewicz
ccf6f27b8f
settings: Remove auxiliary Content types where possible (#16744)
Release Notes:

- N/A
2024-09-10 22:59:10 -04:00
Conrad Irwin
36eb1c15ea
use ssh lsp store (#17655)
Release Notes:

- ssh remoting: Added support for booting langauge servers (in limited
circumstances)

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2024-09-10 15:51:01 -04:00
Bennet Bo Fenner
fcf79c0f1d
assistant: Support copy/pasting creases (#17490)
https://github.com/user-attachments/assets/78a2572d-8e8f-4206-9680-dcd884e7bbbd

Release Notes:

- Added support for copying and pasting slash commands in the assistant
panel

---------

Co-authored-by: Thorsten <thorsten@zed.dev>
2024-09-09 09:01:26 -04:00
thataboy
894866da94
Refactor SearchSettings (#17550)
Some checks are pending
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 / (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
Related to #17179.

Simplify handling of search settings since there is no requirement to
watch for settings.json changes and update search panels while they are
opened.

Attn: @SomeoneToIgnore 

Per our discussion. Ran test on search crate. Ran `cargo fmt`.

Release Notes:

- N/A
2024-09-07 19:58:28 -04:00
thataboy
65961b80fc
Add a way to configure default search options (#17179)
Closes https://github.com/zed-industries/zed/issues/4646

```json
// Search options to enable by default when opening new project and buffer searches.
"search": {
  "whole_word": false,
  "case_sensitive": false,
  "include_ignored": false,
  "regex": false
}
```

Release Notes:

- Added `search` settings section to configure default options enabled
in buffer and project searches
([#4646](https://github.com/zed-industries/zed/issues/4646))

---------

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2024-09-07 10:25:41 -04:00
Kirill Bulatov
8985fd87c2
Fix different kinds values used for worktree_id (#17523)
Some checks are pending
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 / (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-09-07 00:51:09 -04:00