Commit Graph

1312 Commits

Author SHA1 Message Date
Bennet Bo Fenner
1c5d9c221a
Add missing shortcuts in tooltips (#18282)
Fixes some missing shortcuts from Tooltips like the project search,
buffer search, quick action bar, ....


https://github.com/user-attachments/assets/d3a0160a-8d6e-4ddc-bf82-1fabeca42d59

This should hopefully help new users learn and discover some nice
keyboard shortcuts

Release Notes:

- Display keyboard shortcuts inside tooltips in the project search,
buffer search etc.
2024-09-27 11:06:48 +02:00
Kirill Bulatov
568a21a700
Fix the numeration in line wrap docs (#18428)
Follow-up of https://github.com/zed-industries/zed/pull/18412

Release Notes:

- N/A

Co-authored-by: Thorsten Ball <thorsten@zed.dev>
2024-09-27 10:48:34 +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)
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
Conrad Irwin
dc48af0ca1
lsp: Remove reinstall, update config (#18318)
Release Notes:

- Fixed overriding the path of a language server binary for all language
servers. `{"lsp":{"<lsp-name>":{"binary":{"path": "_"}}}}` will now work
for all language servers including those defined by extensions.
- (breaking change) To disable finding lsp adapters in your path, you
must now specify
`{"lsp":{"<lsp-name>":{"binary":{"ignore_system_version": true}}}}`.
Previously this was `{"lsp":{"<lsp-name>":{"binary":{"path_lookup":
false}}}}`. Note that this setting still does not apply to extensions.
- Removed automatic reinstallation of language servers. (It mostly
didn't work)

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2024-09-25 10:45:56 -07:00
Peter Tripp
59dc3985a1
Detect txt files as Plain Text (#18334) 2024-09-25 07:41:35 -04:00
Sergio C.
4a4d8c1cab
vim: Add ability to spawn multicursors at beginning/end of line (#18183)
Closes #17842

Release Notes:

- Added the ability to spawn multiple cursors through the g-A and g-I
motions while in visual select mode.
2024-09-24 10:21:57 -06:00
Conrad Irwin
3ba071b993
Allow using system node (#18172)
Release Notes:

- (Potentially breaking change) Zed will now use the node installed on
your $PATH (if it is more recent than v18) instead of downloading its
own. You can disable the new behavior with `{"node":
{"disable_path_lookup": true}}` in your settings. We do not yet use
system/project-local node_modules.

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2024-09-23 15:28:04 -06:00
Junseong Park
37c93d8fea
docs: Add missing base_keymap option in configuring-zed.md (#18190)
Added `base_keymap`, an option that works in the editor but is missing
from the documentation.

Release Notes:

- N/A
2024-09-22 12:09:35 +03:00
Max Brunsfeld
e309fbda2a
Add a slash command for automatically retrieving relevant context (#17972)
* [x] put this slash command behind a feature flag until we release
embedding access to the general population
* [x] choose a name for this slash command and name the rust module to
match

Release Notes:

- N/A

---------

Co-authored-by: Jason <jason@zed.dev>
Co-authored-by: Richard <richard@zed.dev>
Co-authored-by: Jason Mancuso <7891333+jvmncs@users.noreply.github.com>
Co-authored-by: Richard Feldman <oss@rtfeldman.com>
2024-09-20 18:09:18 -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
Daste
7dac5594cd
file_finder: Display file icons (#18091)
This PR adds file icons (like in tabs, the project panel and tab
switcher) to the file finder popup.

It's similar to [tab_switcher
icons](https://github.com/zed-industries/zed/pull/17115), but simpler,
because we're only dealing with actual files.

Release Notes:

- Added icons to the file finder.

Screenshot:

![image](https://github.com/user-attachments/assets/bd6a54c1-cdbd-415a-9a82-0cc7a0bb6ca2)

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-09-20 14:44:13 -04:00
Peter Tripp
f8195c41e0
docs: Switch proxy example to socks5h not socks5 (#18142)
Very rarely when you have a SOCKS proxy configured do you want local DNS.
`socks5` does local DNS. `socks5h` does remote DNS.
2024-09-20 11:52:57 -04:00
Antonio Scandurra
15b4130fa5
Introduce the ability to cycle between alternative inline assists (#18098)
Release Notes:

- Added a new `assistant.inline_alternatives` setting to configure
additional models that will be used to perform inline assists in
parallel.

---------

Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: Roy <roy@anthropic.com>
Co-authored-by: Adam <wolffiex@anthropic.com>
2024-09-19 17:50:00 -06:00
Roy Williams
28a54ce122
Add diagnostic information to context of inline assistant (#18096)
Release Notes:

- Added Diagnostic information to inline assistant. This enables users
to just say "Fix this" and have the model know what the errors are.
2024-09-19 14:16:01 -06:00
thataboy
1723713dc2
Add ability to copy assistant code block to clipboard or insert into editor, without manual selection (#17853)
Some notes:

- You can put the cursor on the start or end line with triple backticks,
it doesn't actually have to be inside the block.
- Placing the cursor outside of a code block does nothing.
- Code blocks are determined by counting triple backticks pairs from
either start or end of buffer, and nothing else.
- If you manually select something, the selection takes precedence over
any code blocks.

Release Notes:

- Added the ability to copy surrounding code blocks in the assistant
panel into the clipboard, or inserting them directly into the editor,
without manually selecting. Place cursor anywhere in a code block
(marked by triple backticks) and use the `assistant::CopyCode` action
(`cmd-k c` / `ctrl-k c`) to copy to the clipboard, or the
`assistant::InsertIntoEditor` action (`cmd-<` / `ctrl-<`) to insert into
editor.

---------

Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
Co-authored-by: Bennet <bennet@zed.dev>
2024-09-19 13:43:49 +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
Marshall Bowers
ee8668ef45
Bind editor::Rewrap to alt-q (#17953)
This PR adds a keybinding for the `editor: rewrap` command.

It is bound to `alt-q`, by default. In Vim mode, it is bound to `g q`.

Release Notes:

- N/A
2024-09-17 13:33:09 -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
ClanEver
5f0925fb5d
Add Python venv activation support for Windows and PowerShell (#17839)
Release Notes:

- Add Python venv activation support for Windows and PowerShell

Additional:

I discovered a related bug on my Windows system. When first opening the
project, it fails to detect the virtual environment folder `.venv`.
After expanding the .venv folder in the Project Panel, it then becomes
able to detect the virtual environment folder. However, I don't know how
to fix it.
2024-09-17 11:17:29 +02: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
Danilo Leal
29a5def12c
Refine assistant config UI (#17871)
This PR does a little bit of a touch-up on the copywriting on the
assistant config UI. I had friends reporting to me that some of the
writing could be clearer, and hopefully, this goes into that direction!

Release Notes:

- N/A
2024-09-16 08:12:07 -03:00
Nate Butler
cdc3791544
Fix incorrect icons (#17856) 2024-09-16 00:24:18 -04:00
Chris Veness
524a1a6fec
Note in initial_user_settings.json how to access the command palette (#17854)
Newcomers might not know / remember how to access the command palette.

Release Notes:

- N/A
2024-09-15 19:45:48 -04:00
Nate Butler
e8a2dd92c8
Derive icon paths (#17816)
This PR improves adding and working with icons by using the new
`DerivePathStr` to derive icon paths.

This means paths no longer need to be manually specified, and the
`IconName` and file name will always be consistent between icons.

This PR does not do any work to standardize icons visually, remove
unused icons, or any other such cleanup.

Release Notes:

- N/A
2024-09-13 21:12:29 -04:00
Nate Butler
ce848375fe
add ui::Vector and separate images from icons (#17815)
This PR pulls non-icon assets out of `ui::components::icon` in
preparation for icon standardization.

In the future icons will have standard names and sizes, and these image
assets won't conform to those constraints.

We can also add a `ui::components::image::Image` wrapper around the
`gpui::img` element in the future for any Zed-specific image styling we
want to enforce.

Of note:

```rust
#[derive(Debug, PartialEq, Eq, Copy, Clone, EnumIter, EnumString, IntoStaticStr, Serialize, Deserialize, DerivePathStr)]
#[strum(serialize_all = "snake_case")]
#[path_str(prefix = "images", suffix = ".svg")]
pub enum VectorName {
    ZedLogo,
    ZedXCopilot,
}
```

You can see in the above code we no longer need to manually specify
paths for image/icon enums like we currently do in
`ui::components::icon`.

The icon component will get this same treatment in the future, once we:

- do the design work needed to standardize the icons
- remove unused icons
- update icon names

Release Notes:

- N/A
2024-09-13 17:44:16 -04:00
jvmncs
c71f052276
Add ability to use o1-preview and o1-mini as custom models (#17804)
This is a barebones modification of the OpenAI provider code to
accommodate non-streaming completions. This is specifically for the o1
models, which do not support streaming. Tested that this is working by
running a `/workflow` with the following (arbitrarily chosen) settings:

```json
{
  "language_models": {
    "openai": {
      "version": "1",
      "available_models": [
        {
          "name": "o1-preview",
          "display_name": "o1-preview",
          "max_tokens": 128000,
          "max_completion_tokens": 30000
        },
        {
          "name": "o1-mini",
          "display_name": "o1-mini",
          "max_tokens": 128000,
          "max_completion_tokens": 20000
        }
      ]
    }
  },
}
```

Release Notes:

- Changed  `low_speed_timeout_in_seconds` option to `600` for OpenAI
provider to accommodate recent o1 model release.

---------

Co-authored-by: Peter <peter@zed.dev>
Co-authored-by: Bennet <bennet@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-09-13 15:42:15 -04:00
tepek2
1b36c62188
Add keybinding to swap pane items (#15583)
- Rearrange tabs (left: `ctrl-shift-pageup`, right: `ctrl-shift-pagedown`) like Chrome

Co-authored-by: Peter Tripp <peter@zed.dev>
2024-09-13 15:17:01 -04:00
KorigamiK
ae3880e71a
Add ability to open files with system default application (#17231) 2024-09-10 14:36:36 -04:00
Vishal Bhavsar
89ae97e5e9
vim: Revert 'Y' to yank to end of line (#17563)
Closes https://github.com/zed-industries/zed/issues/17549
2024-09-08 08:38:00 -06: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
Conrad Irwin
a7da16d192 vim: Fix ctrl-n/p 2024-09-06 18:48:06 -06:00
Conrad Irwin
6af5fdd1c2
vim: Add more diff stuff (#17456)
Release Notes:

- vim: Added `:diff` and `:revert` (that work with `'<,'>`) to open the
selected diff and revert it.
- vim: Added `d o` to open the diff and `d p` to revert (spiritually
similar to vim's do/dp, though obviously not the same)
- vim: Added `ctrl-p` and `ctrl-n` to summon the autocomplete menu in
insert mode.
2024-09-05 20:35:04 -06:00
Piotr Osiewicz
2238439427
chore: Remove unused pin_alt.svg icon (#17450)
Follow-up to https://github.com/zed-industries/zed/pull/17445

Release Notes:

- N/A
2024-09-05 21:42:42 +02:00
Danilo Leal
46006a3c81
Add new pin and unpin icons (#17445)
This PR adds new SVGs for the pin and unpin icons, using a custom-made
one in a smaller size, and thus removing the `PinAlt` one I added just
recently. I also tweak the outline panel pin icon button tooltip strings
a bit.

Release Notes:

- N/A
2024-09-05 16:00:32 -03:00
Conrad Irwin
1e09884a22
vim: Sentence motion (#17425)
Closes #12161

Release Notes:

- vim: Added `(` and `)` for sentence motion
2024-09-05 11:18:52 -06:00
Piotr Osiewicz
fef181a66f
Pane: Add tab pinning (#17426)
Closes #5046

Release Notes:

- Added "Pin/Unpin Tab" action to the workspace, assistant and terminal
tabs.

---------

Co-authored-by: Danilo <danilo@zed.dev>
2024-09-05 18:53:55 +02:00
Danilo Leal
93a355228f
Add an alternative pin icon (#17411)
We'll use this for the pinned tabs feature.

---

Release Notes:

- N/A
2024-09-05 10:11:12 -03:00
Piotr Osiewicz
c5255a7c69
assistant: Add missing keybind for assistant::NewContext (#17407)
Closes #ISSUE

Release Notes:

- N/A
2024-09-05 14:31:51 +02:00
0x2CA
65bc1ea7c8
vim: Add smartcase search (#16932)
Closes #16878

Release Notes:

- Added a vim-style smart case option for search patterns

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-09-04 13:26:25 -06:00
CharlesChen0823
072513f59f
outline_panel: Fix j and k not working in outline panel filter (#17293)
Closes #17248

Release Notes:

- Fixed outline panel filter not working for certain Vim bindings
([#17248](https://github.com/zed-industries/zed/issues/17248))
2024-09-04 11:27:07 +02:00
Bennet Bo Fenner
5b0d64890f
assistant: Allow accepting terminal inline assist suggestion without executing command (#17299)
This adds a new button that on click, accepts the suggestion but does
not run the generated command.


https://github.com/user-attachments/assets/426b0ff3-8e19-435a-aa7f-89e062aefd4c

@danilo-leal @iamnbutler Any ideas on how to make both options
discoverable without having an extra button?

Release Notes:

- Added a way to accept terminal inline assist suggestions without
executing them

---------

Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
2024-09-04 10:54:32 +02:00
Marshall Bowers
c2448e1673
assistant: Insert creases for tool uses (#17330)
This PR makes it so we create creases for each of the tool uses in the
context editor.

<img width="1290" alt="Screenshot 2024-09-03 at 5 37 33 PM"
src="https://github.com/user-attachments/assets/94e943fd-3f05-4bc4-9672-94bff42ec500">

Release Notes:

- N/A
2024-09-03 17:52:52 -04:00
Jason Lee
2730d08ff0
docs: Fix shell setting doc (#17208)
Release Notes:

- N/A


03fd5c90d8/crates/project/src/project.rs (L5210)


03fd5c90d8/crates/task/src/lib.rs (L266)
2024-09-03 13:19:42 -04:00
Max Brunsfeld
b41ddbd018
Have models indicate code locations in workflows using textual search, not symbol names (#17282)
Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
2024-09-02 18:20:05 -07:00
Kyle Kelley
c63c2015a6
Revert accidental one theme changes (#17273)
Co-authored-by: Peter Tripp <peter@zed.dev>
2024-09-02 14:48:23 -04:00
Peter Tripp
6b8bdcfe72
Add jsonschema link to bundled themes (#17253) 2024-09-02 08:25:59 -04:00
Micah
6403385468
linux: Add an option to disable middle-click paste (#16572)
Release Notes:

- Added an editor setting to toggle Linux middle-click pasting (enabled by default)
2024-08-30 09:06:20 +02:00
Peter Tripp
cdaa80fefb
linux: Consistent clipboard shortcuts in context menus (#17103)
- Fixes incorrect shorcuts being displayed in Linux context menus.
- Re-ordering them within the json object doesn't work, but putting them in a dedicate block does.
2024-08-29 14:02:52 -04:00
Max Brunsfeld
f84ef5e48a
Immediate edit step resolution (#16447)
## Todo

* [x] Parse and present new XML output
* [x] Resolve new edits to buffers and anchor ranges
* [x] Surface resolution errors
* [x] Steps fail to resolve because language hasn't loaded yet
* [x] Treat empty `<symbol>` tag as None
* [x] duplicate assists when editing steps
* [x] step footer blocks can appear *below* the following message header
block

## Release Notes:

- N/A

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Peter <peter@zed.dev>
Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Antonio Scandurra <me@as-cii.com>
2024-08-29 10:18:52 -07:00