Commit Graph

16091 Commits

Author SHA1 Message Date
Nate Butler
4d5441c09d
Add UI setting components (#13550)
Adds some of the UI components to allow us to visually render settings.

These are UI only and are not functional yet (@maxdeviant will be
working on these when he is back.)

You can see some examples by running `script/storybook setting`.

![CleanShot 2024-06-26 at 12 38
37@2x](https://github.com/zed-industries/zed/assets/1714999/b5e6434d-3bc5-4fcd-9c0a-d280950cbef2)

Release Notes:

- N/A
2024-06-26 13:02:58 -04:00
Peter Tripp
2dc840132b v0.143.x dev 2024-06-26 12:20:15 -04:00
Fernando Tagawa
5d766f61fa
linux: Fix some panics related to xkb compose (#13529)
Release Notes:

- N/A

Fixed #13463 Fixed crash when the locale was non UTF-8 and fixed the
fallback locale.
Fixed #13010 Fixed crash when `compose.keysym()` was `XKB_KEY_NoSymbol`

I also extracted the `xkb_compose_state` to a single place
2024-06-26 09:34:39 -06:00
张小白
18b4573064
Fix font feature tag validation (#13542)
The previous implementation that I implemented had two issues:
1. It did not throw an error when the user input some invalid values
such as "panic".
2. The feature tag for OpenType fonts should be a combination of letters
and digits. We only checked if the input was an ASCII character, which
could lead to undefined behavior.

Closes #13517 

Release Notes:

- N/A
2024-06-26 11:01:48 -04:00
Conrad Irwin
b43df6048b
Add an input example to gpui (#13534)
Add a single-line text input example to gpui

(I'm hoping to be able to debug keyboard issues without rebuilding the
whole
app every time)

Release Notes:

- N/A
2024-06-25 22:06:50 -06:00
Conrad Irwin
eb914682b3
Fix multi-cursor copy/paste on linux (#13523)
The clipboard library we use for X11 doesn't yet support multiple
formats on the clipboard, so for now we just store this in memory for
the current zed process, as we do for Wayland.

Fixes: #11971

Release Notes:

- N/A

---------

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2024-06-25 14:54:52 -06:00
Joseph T. Lyons
5b7e31c075
Add metrics_id to editor_events (#13525)
Release Notes:

- N/A
2024-06-25 16:47:55 -04:00
ᴀᴍᴛᴏᴀᴇʀ
922fcaf5a6
Add the ability to customize available models for OpenAI-compatible services (#13276)
Closes #11984, closes #11075.

Release Notes:

- Added the ability to customize available models for OpenAI-compatible
services ([#11984](https://github.com/zed-industries/zed/issues/11984))
([#11075](https://github.com/zed-industries/zed/issues/11075)).


![image](https://github.com/zed-industries/zed/assets/32017007/01057e7b-1f21-49ad-a3ad-abc5282ffaf0)
2024-06-25 16:37:02 -04:00
Nate Butler
9f88460870
Move token count in prompt editor (#13524)
Moves the token count back up to the editor header.

Release Notes:

- N/A
2024-06-25 16:10:05 -04:00
Mikayla Maki
e5d1cf84cf
Fix 9263 (#13521)
Fix #9263

Release Notes:

- N/A
2024-06-25 11:35:50 -07:00
张小白
d1a55d64a8
Change window_min_size from Size<Pixels> to Option<Size<Pixels>> (#13501)
Now we can set `window_min_size` to `None` instead of `Size::default()`.
I think this makes more sense.

Release Notes:

- N/A
2024-06-25 12:09:08 -06:00
Shubham Kanodia
db06244972
typescript: Pass hostInfo to tsserver (#12055)
- Added `hostInfo` property to zed's typescript plugin. This can be
useful for telemetry (for e.g. identifying the usage of editors based on
typescript usage) when building typescript plugins.

- VSCode / IntelliJ based editors already set this property
([see](aa31bfc9fd/extensions/typescript-language-features/src/typescriptServiceClient.ts (L574)))

The config option as available —
https://github.com/typescript-language-server/typescript-language-server/blob/master/docs/configuration.md#initializationoptions

Release Notes:

- N/A
2024-06-25 13:51:30 -04:00
Marshall Bowers
597469bbbd
Remove blank line (#13519)
This PR removes an extra blank line that was missed in #13518.

Release Notes:

- N/A
2024-06-25 13:11:25 -04:00
Marshall Bowers
e0c192d831
Clean up json! literal for vtsls configuration (#13518)
This PR cleans up the formatting of the `json!` literal used to provided
`vtsls` configuration.

Release Notes:

- N/A
2024-06-25 13:04:31 -04:00
Mikayla Maki
b2a0a7fa3c
Fix a bug introduced by #13479 (#13516)
Fixes a bug introduced by
https://github.com/zed-industries/zed/pull/13479 where dot files might
not be processed in the correct order.

Release Notes:

- N/A
2024-06-25 10:03:29 -07:00
Dov Alperin
0b1a589183
keymap: Allow modifiers as keys (#12047)
It is sometimes desirable to allow modifers to serve as keys themselves
for the purposes of keybinds. For example, the popular keybind in
jetbrains IDEs `shift shift` which opens the file finder.

This change treats modifers in the keymaps as keys themselves if they
are not accompanied by a key they are modifying.

Further this change wires up they key dispatcher to treat modifer change
events as key presses which are considered for matching against
keybinds.


Release Notes:

- Fixes #6460

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-06-25 10:17:23 -06:00
ᴀᴍᴛᴏᴀᴇʀ
7e694d1bcf
Fix an issue where provider settings were lost when switching between Ollama models (#13402)
Closes #13399.

Release Notes:

- Fixed an issue where provider settings were lost when switching
between Ollama models
([#13399](https://github.com/zed-industries/zed/issues/13399)).
2024-06-25 11:58:13 -04:00
Nate Butler
890443241d
Prompt Library Refinements (#13470)
TODO:

- [x] Moving the cursor out of the title editor should unselect any
selected text

Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Richard <richard@zed.dev>
2024-06-25 11:43:30 -04:00
Hamir Mahal
f40d2313fb
Use string interpolation (#13482)
Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-06-25 10:57:50 -04:00
Matin Aniss
2dee4f87fd
windows: Fix title bar font for Windows 10 (#13425)
This should fix the title bar font for Windows 10 as `Segoe Fluent
Icons` is only for Windows 11 and Windows 10 should be using `Segoe MDL2
Assets`, I haven't tested this myself on a Windows 10 machine but the
fonts work fine.

Release Notes:

- N/A
2024-06-25 10:51:00 -04:00
Matin Aniss
54afa6f69f
Bump image crate (#13397)
Bumping the image crate for better support of image formats.

The latest version does not have a `BGRA` type it only has `RGBA` it
doesn't really matter as the size is the same but the type name is a
little confusing as we need it as `BGRA`. Also there is no `into_bgra8`
but we can use `into_rgba8` but then it must be converted before
creating the `ImageData`.

Release Notes:

- N/A
2024-06-25 15:12:45 +02:00
Piotr Osiewicz
55511d1591
JSON: Show package.json dependency tooltips on hover (#13481)
Fixes https://github.com/zed-industries/zed/issues/13303

Release Notes:

- Added package version tooltips when hovering over package.json
dependency entries.
2024-06-25 14:59:29 +02:00
Piotr Osiewicz
6c0cb9eaa3
project panel: Respect y offset of a click-and-drag on a scrollbar (#13506)
Previously we've always snapped the scrollbar to the cursor position,
without regard for the position of the thumb.



Release Notes:

- N/A
2024-06-25 14:20:37 +02:00
Piotr Osiewicz
24e7b69f8f
Rust: fix module names not showing in completion list (#13505)
This is a regression from
https://github.com/zed-industries/zed/issues/13043

Fixes https://github.com/zed-industries/zed/issues/13494



Release Notes:

- Fix crate names not being shown in Rust completions menu.
2024-06-25 13:42:29 +02:00
Antonio Scandurra
a4cdca5141
Refine UX for assistants (#13502)
<img width="1652" alt="image"
src="https://github.com/zed-industries/zed/assets/482957/376d1915-1e15-4d6c-966e-48f55f7cb249">


Release Notes:

- N/A
2024-06-25 13:41:55 +02:00
Bennet Bo Fenner
86cd87e993
indent guides: Fix edge case when line is folded (#13498)
https://github.com/zed-industries/zed/assets/53836821/6c79cdc8-c0e1-4f5e-807e-be4a4bde32c3



Release Notes:

- Fixed an edge case where some indent guides would disappear when a
folded line is the first visible line on screen
2024-06-25 12:00:40 +02:00
Tristan Hume
88000eb7e2
Fix bug with inline assist and indentation on empty lines (#13489)
Fix a minor bug when the inline assistant model spits out an empty line
with leading indentation on it. This happens sometimes with Claude 3.5
Sonnet and currently it causes the following line to have the wrong
indentation.

Release Notes:

- N/A
2024-06-25 10:11:21 +02:00
Matt Fellenz
ab5a462e0c
Use likely-newer KeyPress serial for wl clipboard (#13483)
The KeyEnter serial will be too old if another client replaces the
selection before the user unfocuses and refocuses the window (i.e.,
triggers another KeyEnter event).
The KeyPress event is more likely to be new enough.

Release Notes:

- Fixed setting clipboard sometimes not working on wayland
([#13445](https://github.com/zed-industries/zed/issues/13445)).
2024-06-24 22:16:58 -06:00
Conrad Irwin
79430fc7d2
vim: Fix panic in search (#13487)
Release Notes:

- vim: Fixed a panic when searching after focusing search bar with mouse
2024-06-24 22:16:49 -06:00
Tristan Hume
f96e4ba84f
Add "Select Enclosing Symbol" command (#13435)
I use this for a much faster workflow with inline assist when using fast
models.

Release Notes:

- Added "Select Enclosing Symbol" command based on tree-sitter outline.
Useful in combination with inline assist to rewrite a function.
2024-06-24 21:26:47 -06:00
SELO
7be1ffb9ec
Add cross-compilation support from MacOS to Windows (#13382)
- Modify `build.rs` to use environment variables instead of `cfg`
directive to make cross-compilation to Windows possible
- Make `embed-resource` a global build-dependency for cross-compilation

Release Notes:

- N/A
2024-06-24 21:26:24 -06:00
Aaron Ruan
93a5d0ca29
Add limit to minimum window size (#13126)
Release Notes:

- Add a limit to the minimum window size on macOS.

Here's the minimum window before change:
<img width="121" alt="image"
src="https://github.com/zed-industries/zed/assets/38318044/9e907194-42e5-457e-91ea-96613426b479">

After change:
<img width="410" alt="image"
src="https://github.com/zed-industries/zed/assets/38318044/6e9c3057-9860-4f4b-9a73-c158ebac5ba9">
2024-06-24 21:26:13 -06:00
张小白
328d98dddc
windows: Make IME input on Windows consistent with that on macOS + some small fixs (#13386)
### Before

![Screenshot 2024-06-22
180000](https://github.com/zed-industries/zed/assets/14981363/9efc3ccd-553c-4fe8-ada5-1b54f80bfbd5)

### After

![Screenshot 2024-06-22
175850](https://github.com/zed-industries/zed/assets/14981363/172675ca-9fda-45ae-bd97-59c33573a766)


Release Notes:

- N/A
2024-06-24 20:55:15 -06:00
张小白
76ab9e4d66
macOS: Fix IME action when deleting last char (#13385)
Closes #12862 


https://github.com/zed-industries/zed/assets/14981363/170b1206-5894-4b90-bd5c-79761073d8f2


Release Notes:

- Fixed deleting the last character during IME composition would
mistakenly delete other characters.(#12862)
2024-06-24 20:54:36 -06:00
Conrad Irwin
c477c12956
x11: Fix handling of shift key (#13485)
Fixes: #13306

Release Notes:

- N/A
2024-06-24 20:37:46 -06:00
Conrad Irwin
1ffd87b87e
Fix dev server projects reconnect (#13484)
Release Notes:

- Improved handling of client reconnects for dev-servers (alpha group
only)
2024-06-24 20:36:05 -06:00
Mikayla Maki
df11b646da
Fix Linux search issues (#13479)
In some rare cases, we wouldn't pick up .gitignore files in the right
order, causing performance issues for the project search and the file
finder

Release Notes:

- N/A
2024-06-24 13:46:21 -07:00
Nate Butler
ed94bd41eb
Reorganize Quick Action Bar (#13476)
This PR:

- Moves the selection menu to the end with the editor settings menu
- Tidies up labels in the settings menu
- Minor spacing updates

Release Notes:

- Improved organization in the Quick Action Bar
2024-06-24 15:34:22 -04:00
Conrad Irwin
8949460bd7
fix cli welcome screen (#13474)
Release Notes:

- Fixed first launch via cli

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2024-06-24 12:55:30 -06:00
Max Brunsfeld
c6c5907693
Fix unnecessary gitignore status updates due to failure to clear 'needs update' flag (#13471)
I found this bug while investigating
https://github.com/zed-industries/zed/issues/13176. When running zed
with `RUST_LOG=worktree=trace`, I realized we were updating all
gitignore statuses on every file change. This was due to a logic error
where we were marking a gitignore as up-to-date on a temporary *clone*
of our snapshot, but not in the `BackgroundScanner` itself.

Release Notes:

- Fixed a bug that caused unnecessary computations to happen on every
file-system event.
2024-06-24 10:39:08 -07:00
Benjamin Davies
dea928b00c
vim: Allow count and repeat for "r" and "shift-r" action (#13287)
Fixing the "r" action just involved adapting `normal_replace` to replace
multiple characters.

Fixing the "shift-r" command was less straightforward. The bindings for
`vim::BeforeNormal` in replace mode were being overwritten and several
other steps required for action repetition were not performed. Finally,
the cursor adjustment after re-entering normal mode was duplicated
(`vim::BeforeNormal` was now triggered correctly) so I removed the
special case for replace mode.

Release Notes:

- Fixed vim "r" action to accept a count argument
- Fixed vim "shift-r" action to accept a count argument and allow
repetition

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-06-24 09:41:33 -06:00
Benjamin Davies
77b2da2b42
vim: Surround in visual mode (#13347)
Adds support for surrounding text in visual/visual-line/visual-block
mode by re-using the `AddSurrounds` operator. There is no default
binding though so the user must follow the instructions to enable it.

Note that the behaviour varies slightly for the visual-line and
visual-block modes. In visual-line mode the surrounds are placed on
separate lines (the vim-surround extension also indents the contents but
I opted not to as that behaviour is less important with the use of code
formatters). In visual-block mode each of the selected regions is
surrounded and the cursor returns to the beginning of the selection
after the action is complete.

Release Notes:

- Added action to surround text in visual mode (no default binding).

Fixes #13122
2024-06-24 09:29:06 -06:00
Thorsten Ball
5a8c2a4a88
linux/x11: Prioritize rendering in X11 event loop (#13468)
This is a small change that aims to address frames being dropped when we
get a ton of X11 input events.

What it does, in short, is to first read all X11 input events and then
prioritize the rendering.

In my testing, it causes less frames to be dropped when the system is
under heavy load and lots of input events are being created.

Release Notes:

- N/A
2024-06-24 17:21:11 +02:00
Thorsten Ball
82435075a5
Revert "linux/x11: Reduce input latency and ensure rerender priority (#13355)" (#13465)
This reverts commit f69c8ca74e after it
has already been partially reverted in
https://github.com/zed-industries/zed/pull/13458.

Why the revert?

The changes in that commit/PR fix one type of problem — dropping of
frames when being blasted with input events — but trades it for another
one that I can't explain yet: when the system is under load, then input
becomes _laggy_ and input events seem to be delayed.

Two examples of how that shows up:

1. When the system is under load* and you hold down the `down` key to
scroll, then lift the finger, the cursor stops sometimes. If you then
produce another input event by jiggling the mouse cursor you'll see more
`down`-key events coming up and the cursor moving down. It feels as if
the event loop is not being woken up even though there are still events.
I suspect it might have something to do with XIM, because if it's
disabled, it seems as if problems become less severe.
2. When the system is under load* and you click-and-drag a selection in
the editor, you can see how the selection is delayed and takes 500ms-1s
to catch up to where the cursor is.

* system under load: start Zed, then in another terminal window create a
release build of Zed, for example.

With the changes reverted, the failure mode looks different: we skip
frames. But that, I think, is the better of two bad options, because
skipping frames means that you see what's happening vs. input events
seemingly still coming in seconds after you stopped using the keyboard.

Release Notes:

- N/A
2024-06-24 15:31:49 +02:00
Thorsten Ball
40748b0a15
autosave: Respect project autosave settings per file (#13369)
This fixes #13316 by checking whether there are any local workspace
settings for a given file.

Release Notes:

- Fixed `autosave` settings in project-specific settings file being
ignored. ([#13316](https://github.com/zed-industries/zed/issues/13316)).

Co-authored-by: Bennet <bennet@zed.dev>
2024-06-24 14:56:22 +02:00
Thorsten Ball
6cc3a4d95c
linux/x11: Fallback to 800x600 if window bounds size has 0 (#13462)
As reported here
https://github.com/zed-industries/zed/issues/13203#issuecomment-2183514518
it seems that sometimes we get 0 values for the window bounds.

Instead of failing to start up, we log a warning and fall back to
defaults that let a window show up.


Release Notes:

- N/A
2024-06-24 14:32:40 +02:00
张小白
03e2f240ee
windows: Fix JSON schema validation (#13459)
This PR needs suggestions, especially from the Zed team. As I mentioned
in a previous issue #13394 , the `vscode-json-languageserver` that Zed
originally relied on has some issues with JSON schema validation on
Windows, and it hasn't been updated for a long time. This PR uses the
more frequently updated `vscode-langservers-extracted`, which resolves
this issue.

Currently, `vscode-langservers-extracted` includes not only the JSON LSP
server but also LSP servers for other languages. I think we might need a
package specifically for the JSON LSP server, such as something like
`vscode-json-langserver-extracted`, or we could consider using the LSP
servers for other languages from this package as well.

And, there are some issues with installing
`vscode-langservers-extracted` on Windows, causing the `postinstall`
script to fail. However, this does not seem to affect any functionality.
Therefore, I think the best solution is for the Zed team to maintain a
package like `vscode-json-langserver-extracted` or something else. This
way, we can update it promptly and address the installation issues on
Windows.

Any suggestions or advices are welcome.


#### JSON vaildation on Winodws



https://github.com/zed-industries/zed/assets/14981363/8cd7ff54-28ec-4601-b2e5-183e2fae2051



Closes #13394 

Release Notes:

- Fixed JSON schema validation issue on Windows.(#13394 )
2024-06-24 12:52:07 +02:00
Piotr Osiewicz
145cd798c0
project panel: Sticky dragging + do not move thumb when it's clicked (#13460)
/cc @mrnugget 
Release Notes:

- N/A
2024-06-24 12:51:32 +02:00
Thorsten Ball
9ef9baef6f
linux/x11: Fix CPU being pinned at 100% in X11 loop (#13458)
This was part of https://github.com/zed-industries/zed/pull/13355 to fix
the problem of XIM events not waking up the loop. Problem is that it
seems to pin a single CPU at 100%.

Luckily, it looks like the change is not necessary anymore after we
refactored the improvements in #13355.

This fixes https://github.com/zed-industries/zed/issues/13409.

Release Notes:

- N/A
2024-06-24 11:11:17 +02:00
Krzysztof Witkowski
10f7ca65cf
Multi-cursor removal possibility (#13431)
Release Notes:

- Added the ability to remove multi-cursors by clicking on them again.
([#13058](https://github.com/zed-industries/zed/issues/13058)).
2024-06-24 10:32:37 +02:00
crwen
354427413a
vim: Switch to normal mode after toggling comments (#13412)
Release Notes:

- vim: Fixed switching to normal mode after `g c`(vim::ToggleComments)
in visual mode
([#4439](https://github.com/zed-industries/zed/issues/4439))
2024-06-24 10:23:40 +02:00
Max Brunsfeld
9813297892
Combine multiple buffer update count fields into one (#13449)
Buffers carry several pieces of state besides their text: syntax tree,
diagnostics, git diff, and file data. Previously, the buffer maintained
a separate integer version number for each of these four pieces of
state, incrementing it every time that piece of state is updated. This
is used by MultiBuffers to detect when they need to update excerpts.

Previously, for a given buffer, these four version numbers were stored
on the buffer itself, on every snapshot of the buffer, in any
multi-buffer that referenced that buffer, **and** on snapshots of that
multi-buffer. But the only use for the version numbers was reduced down
to a single boolean predicate: whether or not the buffer's state has
changed.

In this PR, I've combined those 4 version numbers into one. I've called
it `non_text_state_update_count` because it tracks all state updates
outside of the text itself. This removes a bunch of unnecessary code,
and reduces the size of buffer snapshots and multi-buffer snapshots.

Release Notes:

- N/A
2024-06-23 22:20:10 -07:00
Nathan Sobo
73de99bee0 Use - instead of _ in secret name 2024-06-23 15:32:47 -06:00
Nathan Sobo
0ed1b29b01
Assign GOOGLE_AI_API_KEY from a Kubernetes secret (#13429)
Release Notes:

- N/A
2024-06-23 14:52:43 -06:00
Nathan Sobo
5b754915e4
Respect requested gemini model (#13427)
Previously, we always went to gemini-pro.

Release Notes:

- N/A
2024-06-23 14:10:31 -06:00
Piotr Osiewicz
9298d3b525
editor: Select first match in "Find all references" editor (#13424)
Previously we've placed cursor on the first line of the first excerpt in
the multibuffer, but alas,
https://x.com/fasterthanlime/status/1804883499809165473 happened (j/k,
this feedback is totally valid) and now we're gonna place it at the end
of the first reference. As a bonus, with the old configuration `editor:
select next` tripped over itself. Now it's possible (& feasible) to do a
"select next" in "find all references"; consecutive referenced ranges
will be selected.

Fixes #13419



Release Notes:

- Fixed a bug where "Find all references" editor had cursor placed on
the first line of the first excerpt in the multibuffer instead of having
it on the first reference.
2024-06-23 18:53:27 +02:00
Piotr Osiewicz
89739d5874
project panel: Do not display scrollbar when entries do not overflow the panel (#13422)
/cc @JunkuiZhang 

Fixes
https://github.com/zed-industries/zed/pull/13358#issuecomment-2185032031

Release Notes:

- N/A
2024-06-23 18:24:21 +02:00
Piotr Osiewicz
d272e402ea
project panel: Add vertical scrollbar (#13358)
Fixes #4865
Release Notes:

- Added vertical scrollbar to project panel
2024-06-23 14:04:19 +02:00
ᴀᴍᴛᴏᴀᴇʀ
5c93506e9f
Fix a prompt typo (#13416)
Release Notes:

- N/A
2024-06-23 07:39:01 -04:00
Vitor Ramos
7df8b6fe10
Fix: Picker select_last not scrolling to item index (#13393)
Release Notes:

- Fix: Command palette not scrolling down to the last element
2024-06-23 09:36:52 +02:00
Max Brunsfeld
6fba1e46a8
Remove never-used client parameter from message handler functions (#13406)
Every single client-side RPC message handler function took an unused
`Arc<Client>` parameter. This removes that.

Release Notes:

- N/A
2024-06-22 16:07:36 -07:00
Max Brunsfeld
988ee93a81 Demote LSP request time log to trace level 2024-06-22 15:59:53 -07:00
Antonio Scandurra
ed9f6e2141
Fix inline assistant not working at the start/end of a file (#13384)
This was due to a bug in the `MultiBufferSnapshot::excerpts_in_ranges`
method. As part of this, I took the chance to rewrite that logic and
simplify it a bit.

Release Notes:

- N/A
2024-06-22 10:38:00 +02:00
Conrad Irwin
fe7d53cb96
Dynamicer builds (#13074)
Fixes https://github.com/zed-industries/zed/issues/13073

Note that, contrary to the issue's text, we're still shipping a
statically bundled sqlite3 after this PR. We use enough new features of
sqlite, like `sqlite3_error_offset` and `STRICT`, that our minimum
version (v3.38.0) is higher than is presumably accessible on Ubuntu.

Release Notes:

- N/A

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2024-06-21 16:32:32 -07:00
Bennet Bo Fenner
edca195e3c
assistant: Fix gutter width (#13373)
The gutter width of the assistant panel was wider then expected after
#13329 was merged.

Release Notes:

- N/A
2024-06-21 19:59:46 +02:00
Sean Billig
d3b3e072a7
Make Claude 3.5 the default Anthropic model (#13324)
Release Notes:

- N/A

Co-authored-by: Antonio Scandurra <me@as-cii.com>
2024-06-21 18:47:38 +02:00
Thorsten Ball
6b04b668ad
settings: Load .zed/settings.json even if .gitignored (#13370)
This fixes #4432 by ensuring that we scan & watch the `.zed` folder,
just like we watch the `.git`, for changes.

Release Notes:

- Settings are now loaded from local `.zed/settings.json` files even if
they are `.gitignore`d.
([#4432](https://github.com/zed-industries/zed/issues/4432)).

Co-authored-by: Bennet <bennet@zed.dev>
2024-06-21 18:39:14 +02:00
Antonio Scandurra
4072ad2858
Add support for Claude 3.5 Sonnet (#13371)
Release Notes:

- Added support for Claude 3.5 Sonnet.
2024-06-21 18:32:26 +02:00
Antonio Scandurra
cb0b8b4c4b
Introduce multi-cursor inline transformations (#13368)
https://github.com/zed-industries/zed/assets/482957/591def34-e5c8-4402-9c6b-372cbca720c3

Release Notes:

- N/A

---------

Co-authored-by: Richard Feldman <oss@rtfeldman.com>
2024-06-21 17:41:43 +02:00
Thorsten Ball
c58a8f1a04
linux/x11: Add more debug info to error if opening window fails (#13364)
Release Notes:

- N/A
2024-06-21 15:37:31 +02:00
Bennet Bo Fenner
abb46473c9
assistant: Include diagnostics in slash commands by default (#13359)
Include error diagnostics by default for the following slash commands:
`/file`, `/tabs`, `/active`

Release Notes:

- N/A
2024-06-21 14:28:12 +02:00
Thorsten Ball
f69c8ca74e
linux/x11: Reduce input latency and ensure rerender priority (#13355)
This change ensures that we always render a window according to its
refresh rate, even if there are a lot of X11 events.

We're working around some limitations of `calloop`. In the future, we
think we should revisit how the event loop is implemented on X11, so
that we can ensure proper prioritization of input events vs. rendering.

Release Notes:

- N/A

Co-authored-by: Antonio <me@as-cii.com>
2024-06-21 12:14:55 +02:00
Bennet Bo Fenner
04a79780d8
assistant: Include worktree name in diagnostics slash command (#13354)
Files included with the diagnostics command now include the worktree
name, making it more consistent with the way other commands work
(`/active`, `/tabs`, `/file`). Also, the diagnostics command will now
insert nothing when there are no diagnostics.

Release Notes:

- N/A
2024-06-21 11:48:52 +02:00
Piotr Osiewicz
4dd05a80e0
YAML: set auto_indent_using_last_non_empty_line to false (fix wonky formatting) (#13351)
This makes us treat yaml like other indentation-sensitive languages
(e.g. Python) and not reformat it on pasting and what not.

Fixes #12236
Fixes #13338

Release Notes:

- Fixed spurious appliance of auto-formatting to YAML blocks.
2024-06-21 10:58:44 +02:00
Stanislav Alekseev
44c479c50c
Add a setting to increase the thickness of the active indent guide (#13210)
Resolves #12312.

Release Notes:

- Added an option to configure the line width of the active indent guide
[#12312](https://github.com/zed-industries/zed/issues/12312)
2024-06-21 10:53:46 +02:00
Nigel Jose
fefc91c6ad
Improve code folding to exclude folding line breaks in whitespace-sensitive languages (#13108)
<img width="1219" alt="Screenshot 2024-06-16 at 15 43 31"
src="https://github.com/zed-industries/zed/assets/87859239/dd05de16-7f20-4c88-9e95-021555b8b78b">
<img width="1219" alt="Screenshot 2024-06-16 at 15 45 10"
src="https://github.com/zed-industries/zed/assets/87859239/b1b78cdd-f34d-4ea3-9728-4741727a9643">

Updated the foldable_range method to exclude folding line breaks during
code folding in whitespace-sensitive languages like Python and YAML.
This adjustment ensures that folding behaves as expected, similar to
other code editors.

Ref #11614

Release Notes:

- Improved code folds to ignore trailing newlines
2024-06-21 10:03:06 +03:00
loczek
3076567f6b
workspace: Add clear notifications command (#13320)
Release Notes:

- Added the `workspace: clear all notifications` command to clear
notifications
([#10761](https://github.com/zed-industries/zed/issues/10761))


https://github.com/zed-industries/zed/assets/30776250/36f2c3f3-5b5e-4f98-9418-8806ce311504
2024-06-21 07:00:46 +02:00
Evan Liu
6eb537643a
editor: Add scroll_beyond_last_line setting (#11155)
Add `scroll_beyond_last_line` setting with 3 options: 

- `one_page`: The default (current) behaviour of scrolling one more page
beyond the last line.
<img width="568" alt="SCR-20240429-sxry"
src="https://github.com/zed-industries/zed/assets/126383/1effbee9-759f-4858-9022-83bbb208ef82">

- `off`: No scrolling beyond the last line. 
<img width="568" alt="SCR-20240429-syhv"
src="https://github.com/zed-industries/zed/assets/126383/5391b1d7-918d-43f3-8a6f-7642ef32d174">

- `vertical_scroll_margin`: Scroll beyond the last line by the same
number of lines as `vertical_scroll_margin`. Matches the behaviour of
keyboard scrolling.
<img width="568" alt="SCR-20240429-sypc"
src="https://github.com/zed-industries/zed/assets/126383/bb9cc928-e515-4503-88f7-e434c45d742f">

Release Notes:

- Added `scroll_beyond_last_line` setting
([#4962](https://github.com/zed-industries/zed/issues/4962)).
2024-06-20 14:22:37 -07:00
Bennet Bo Fenner
2c545ce0bc
assistant: Improve discoverability of slash command errors (#13331)
https://github.com/zed-industries/zed/assets/53836821/fca5deef-3a4b-4670-8b92-79f052ea8417



Release Notes:

- N/A
2024-06-20 21:39:53 +02:00
Piotr Osiewicz
58e9952d7b
tasks: Allow disabling runnables in the gutter (#13329)
Runnables can now be disabled with:
```
  "gutter": {
    "runnables": false
  }
```
Fixes #13280



Release Notes:

- Added `gutter.runnables` setting that controls whether runnable
indicators are displayed in the gutter.
2024-06-20 21:07:45 +02:00
agamcsama
25c8cf0c5c
windows: Fix Zed/GPUI misinterpreting keycodes + Refactor (#12814)
Release Notes:

- Fixed Zed/GPUI misinterpreting keycodes on non-US keyboards
([#12811](https://github.com/zed-industries/zed/issues/12811)).

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
2024-06-20 11:39:20 -07:00
Jason Lee
d501a877a0
windows: Improve file_finder to support match with unix style path (#12357)
Release Notes:

- Improved file_finder to support match with Unix style path.


Sometimes we may get the Unix style path string, for example the result
of `git status`:

```bash
$ git status
On branch improve-file-finder-match-unix-paths
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   crates/file_finder/src/file_finder.rs
```

For example, from GitHub page:

<img width="760" alt="image"
src="https://github.com/zed-industries/zed/assets/5518/c6fe8d8a-839e-4eef-a162-43b1dde09593">

If we copy that path to file_finder, it will not match any files on
Windows.

## Before

<img width="699" alt="屏幕截图 2024-05-28 001037"
src="https://github.com/zed-industries/zed/assets/5518/2d2d729e-7d27-421b-9a38-cfe4e53cc033">


## After

Use Unix style path:

<img width="689" alt="屏幕截图 2024-05-28 001150"
src="https://github.com/zed-industries/zed/assets/5518/e82dc8d6-bd6c-4b78-bd91-5b5210da73c4">

Use Windows style path:

<img width="629" alt="屏幕截图 2024-05-28 001302"
src="https://github.com/zed-industries/zed/assets/5518/4892019e-b2f4-41aa-bbf7-2f5f8af7aafa">
2024-06-20 11:33:49 -07:00
Muhammad Talal Anwar
97abf35529
linux: Fix icon not being associated with app window (#13165)
This commit fixes the app icon not being correctly associated with the
app window. For example, the app icon is not correctly shown in the dock
(Gnome on Wayland) when Zed is running.

Release Notes:

- N/A
2024-06-20 11:31:18 -07:00
Bennet Bo Fenner
0150192e26
assistant: Add term slash command (#13162)
This adds a `term` slash command to the assistant which allows to inject
the latest terminal output into the context.

Release Notes:

- N/A
2024-06-20 20:20:34 +02:00
Bennet Bo Fenner
5a6c55149a
assistant: Make including warnings for the diagnostic command more discoverable (#13323)
This makes the `--include-warnings` argument more discoverable

<img width="651" alt="image"
src="https://github.com/zed-industries/zed/assets/53836821/02d32496-ad7a-4670-85ce-eda945c0f1c2">

Release Notes:

- N/A
2024-06-20 19:48:13 +02:00
Mikayla Maki
4e2a08edb7
Fix missing IME keys when no input handler is set (#13325)
This fixes a bug introduced by
https://github.com/zed-industries/zed/pull/12702, where GPUI would only
generate the correct key events if you had an input handler set.

Release Notes:

- N/A
2024-06-20 10:39:10 -07:00
Thorsten Ball
c20a1ee032
auto-updates: Do not poll for updates on dev channel (#13311)
Our dev builds don't have updates and will never have updates, so
instead of polling our servers every time we start a dev instance, let's
disable it for the dev channel.

Release Notes:

- N/A
2024-06-20 15:00:54 +02:00
Elliot Thomas
f5f73efa8a
Respect workspace order in recent projects (#12844)
<img width="1266" alt="Screenshot 2024-06-10 at 14 33 32"
src="https://github.com/zed-industries/zed/assets/1347854/c75de033-f2c8-4500-8b34-46b5f0260d3d">

This changes the recent projects panel to use the order of paths from
the workspace rather than always being alphanumerical.

This follows the work to introduce manual workspace ordering to ensure
the recent projects paths reflect the order of paths in the main project
panel.

Release Notes:

- Improve the recent project panel by ordering paths using the workspace
order
2024-06-20 13:16:23 +03:00
Chung Wei Leong
d8c93e1bfd
Disable inline assist button when assistant is disabled (#13290)
Release Notes:

- Hide inline assist button when assistant is disabled
([#13289](https://github.com/zed-industries/zed/issues/13289)).
2024-06-20 12:56:09 +03:00
ᴀᴍᴛᴏᴀᴇʀ
95b06097ee
Add support for auto surround (#13217)
![result](https://github.com/zed-industries/zed/assets/32017007/c400081f-be5d-48fa-994f-90a00e2be359)

In the past, Zed used a single switch called `autoclose` to control both
`autoclose` and `auto_surround` functionalities:
+ `autoclose`: when input '(', append ')' automatically.
+ `auto_surround`: when select text and input '(', surround text with
'(' and ')' automatically.

This PR separates `auto_surround` from `autoclose` to support `<`. 

Previously, if `autoclose` of `<` was set to `false`, `auto_surround`
couldn't be used. However, setting `autoclose` to `true` would affect
the default behavior of simple expression. For example, `a < b` would
become `a <> b`.

For more information, see #13187.

Fix #12898.

Release Notes:

- Added support for `auto_surround`
([#12898](https://github.com/zed-industries/zed/issues/12898)).
2024-06-20 12:48:46 +03:00
Stefan
47174cea50
Add mouse context action to copy permalink (#13247)
<img width="977" alt="Screenshot 2024-06-19 at 00 24 21"
src="https://github.com/zed-industries/zed/assets/5855806/8bdb46ad-2d81-45d0-853b-c1d0cc0fc037">

Selecting the item results in the following link
a8c19ab895/crates/assets/Cargo.toml (L12)
for me.

## Summary

Switching from PyCharm, my number one most missed feature is "Copy
Github link" provided by the Gitlink plugin
(https://plugins.jetbrains.com/plugin/8183-gitlink /
https://github.com/ben-gibson/GitLink). I use this a lot to quickly send
code pointers to teammates.

While digging around, I found that this is basically already
implemented, but wasn't able to find this action exposed anywhere in the
UI.


a8c19ab895/crates/editor/src/editor.rs (L10343-L10367)

Release Notes:

- Added mouse context action to copy permalink to line
2024-06-20 10:46:49 +03:00
Joseph T Lyons
0129d4e250 v0.142.x dev 2024-06-19 12:09:32 -04:00
Thorsten Ball
3d4f275c52
editor: Add SelectPageUp/SelectPageDown actions (#13272)
This adds two new actions to `editor`:

- `editor::SelectPageUp`
- `editor::SelectPageDown`

On Linux they're bound by default to `shift-pageup` and
`shift-pagedown`, which matches VS Code and JetBrains.

Release Notes:

- N/A
2024-06-19 17:37:17 +02:00
Marshall Bowers
ddf07253c4
assistant: Strip out general website chrome in /fetch command (#13264)
This PR updates the `/fetch` command to strip out general website chrome
that likely won't contain content on any websites.

Release Notes:

- N/A
2024-06-19 09:50:02 -04:00
Thorsten Ball
8524e87319
linux/x11: Do panic when unmapping/destroying of X11 window fails (#13262)
We saw this panic come up:

```
called `Result::unwrap()` on an `Err` value: IoError(Custom { kind: Other, error: UnknownError })
core::panicking::panic_fmt
core::result::unwrap_failed
<gpui::platform::linux::x11:🪟:X11Window as core::ops::drop::Drop>::drop
core::ptr::drop_in_place<gpui::platform::linux::x11:🪟:X11Window>
core::ptr::drop_in_place<gpui:🪟:Window>
gpui::app::AppContext::shutdown
gpui::app::AppContext:🆕:{{closure}}
gpui::platform::linux::platform::<impl gpui::platform::Platform for P>::run
gpui::app::App::run
zed::main
std::sys_common::backtrace::__rust_begin_short_backtrace
std::rt::lang_start::{{closure}}
std::rt::lang_start_internal
main
__libc_start_call_main
__libc_start_main_impl
_start
```

I'm not sure where exactly that error comes from, except from the X11
stuff. So let's be defensive and log error and only then tear down
everything.

I _think_ that if the error is repeatable that means we won't close the
window but instead just log errors, but I do think that's better than
panicking right now.

Release Notes:

- N/A
2024-06-19 14:36:57 +02:00
Thorsten Ball
522692ef50
linux: Quiet some noisy logs when logging to file (#13260)
zbus, naga, and some parts of blade are pretty noisy at the INFO level.
zbus especially dumps large debug dumps into the logs.

So on Linux, when logging to a file, we reduce that noise. That means
one still gets the full firehose when doing `RUST_LOG=info cargo run`,
but not in the logs.


Release Notes:

- N/A
2024-06-19 14:09:25 +02:00
Thorsten Ball
8c4fb34f6e
Show location of log file when using zed: open log (#13252)
This changes the breadcrumb header from "untitled" to "Last 1000 lines
in <location of log file>".

Reason is that it's been incredibly frustrating not seeing the location
of the log file there and not seeing that it's actually a truncated
version of the logs.

This is one remedy for that.

Other options considered:

1. Opening the actual log file. Turns out that is huge. On Linux right
now it's 5 megabyte after 5 minutes.
2. Opening the file and adding it on the buffer. That is tricky and
weird, because you have to modify the underlying buffer and set the
file, after having to add it to the workspace and getting its entry,
etc.
3. Setting a `display_file_path` on Buffer. That would require also
adding it on `BufferSnapshot` and then threading that through so that it
gets returned by the multi-buffer and then in the editor. And ultimately
this here is a "view concern", so we thought we just add it as such.

So yes, not the best change possible, but it's not that invasive and
makes it clear that it's a view-only concern.

Release Notes:

- N/A

Co-authored-by: Kirill <kirill@zed.dev>
2024-06-19 12:21:28 +02:00
Mikayla Maki
d4891a62bb
Conform to wayland spec on resize (#13243)
Fixes https://github.com/zed-industries/zed/issues/10976

Release Notes:

- N/A

Co-authored-by: conrad <conrad@zed.dev>
2024-06-18 21:01:15 -07:00
Mikayla Maki
17bc0d1b17
Dynamically link libwayland (#13241)
Fixes a bug in current nightly.

Release Notes:

- N/A
2024-06-18 15:07:45 -07:00
Marshall Bowers
db0d843fb1
Allow completing slash command arguments from extensions (#13240)
This PR extends the extension API with support for completing slash
command arguments for slash commands defined in extensions.

Release Notes:

- N/A
2024-06-18 17:58:57 -04:00
Marshall Bowers
ad4e52842c
Make slash commands defined in extensions return SlashCommandOutput (#13237)
This PR extends the interface for slash commands defined in extensions
to have them return `SlashCommandOutput`.

This allows for slash commands to return multiple output sections for a
single piece of generated text.

Note that we don't allow specifying the icon to display in the
placeholder, as we don't want to commit to that in our API at the
moment.

Release Notes:

- N/A
2024-06-18 17:28:01 -04:00
Conrad Irwin
ca18549e02
Keyboardable buttons in linux alerts (#13235)
Release Notes:

- N/A
2024-06-18 14:58:10 -06:00
Marshall Bowers
5cbb360952
zed_extension_api: Add default implementation for language_server_command (#13234)
This PR adds a default implementation for the `language_server_command`
method on the `Extension` trait.

This will allow for extensions to be defined without having to implement
this method, which will be useful for extensions that may just want to
provide slash commands.

Release Notes:

- N/A
2024-06-18 16:55:33 -04:00
Conrad Irwin
5ff7c893be
Fix panic trying to go to next of 0 matches (#13233)
Release Notes:

- Fixed a panic when going to next search result when there are none
2024-06-18 14:46:33 -06:00
Joseph T. Lyons
9af4b6bfc7
Allow telemetry from unofficial builds (#13224)
Release Notes:

- N/A

Co-authored-by: Peter Tripp <notpeter@users.noreply.github.com>
2024-06-18 16:00:47 -04:00
Marshall Bowers
c84d432b5f
Fix modality indicators in user menu (#13228)
This PR updates the modality indicators in the user menu after #12940.

We use the ellipsis throughout the app to indicate that a menu action
will open a modal (e.g., the theme selector), so "Themes" needs the
trailing ellipsis.

Whereas the "Extensions" entry opens up a new tab, which we don't
indicate that same way.

Release Notes:

- N/A
2024-06-18 15:50:18 -04:00
Conrad Irwin
490a75aee6
Fix bug where window contents could appear outside of window bounds on X11 (#13181)
Release Notes:

- N/A
2024-06-18 13:49:01 -06:00
Conrad Irwin
4f364d6d09
Hide old linux panics (#13221)
Remove noise from the #panics channel by excluding any linux build
before
0.139.x. We filter on the os_version and os_name because evern older
versions
of linux set app_version = 1.0.0.

Release Notes:

- N/A
2024-06-18 13:48:26 -06:00
Max Brunsfeld
89d2ace713
Make LSP task cancellation discoverable (#13226)
Release Notes:

- Added the ability to cancel a cargo check by clicking on the status
bar item.
2024-06-18 12:44:35 -07:00
Marshall Bowers
84a44bef8a
storybook: Use theme::setup_ui_font helper function (#13227)
This PR updates the storybook to use the new `theme::setup_ui_font`
helper function to initialize the UI font.

Release Notes:

- N/A
2024-06-18 15:38:11 -04:00
Mikayla Maki
6b9ddbfef2
Add more menus to Zed (#12940)
### TODO

- [x] Make sure keybinding shows up in pane + menu
- [x] Selection tool in the editor toolbar
- [x] Application Menu
- [x] Add more options to pane + menu
   - Go to File...
  - Go to Symbol in Project... 
- [x] Add go items to the selection tool in the editor:
   - Go to Symbol in Editor...
   - Go to Line/Column...
   - Next Problem
   - Previous Problem
- [x] Fix a bug where modals opened from a context menu aren't focused
correclty
- [x] Determine if or what needs to be done with project actions:
- Difficulty is that these are exposed in the UI via clicking the
project name in the titlebar or by right clicking the root entry in the
project panel. But they require reading and are two clicks away. Is that
sufficient?
    - Add Folder to Project
    - Open a new project
    - Open recent
 - [x] Get a style pass 
 - [x] Implement style pass
   - [x] Fix the wrong actions in the selection menu
   - [x] Show selection tool toggle in the 'editor settings' thing
- [x] Put preferences section from the app menu onto the right hand user
menu
- [x] Add Project menu into app menu to replace 'preferences' section,
and put the rest of the actions there
- [ ] ~~Adopt `...` convention for opening a surface~~ uncertain what
this convention is.
   - [x] Adopt link styling  for webview actions
   - [x] Set lucide hamburger for menu icon
   - [x] Gate application menu to only show on Linux and Windows




Release Notes:

- Added a 'selection and movement' tool to the Editor's toolbar, as well
as controls to toggle it and a setting to remove it (`"toolbar":
{"selections_menu": true/false }`)
- Changed the behavior of the `+` menu in the tab bar to use standard
actions and keybindings. Replaced 'New Center Terminal' with 'New
Terminal', and 'New Search', with the usual 'Deploy Search'. Also added
item-creating actions to this menu.
- Added an 'application' menu to the titlebar to Linux and Windows
builds of Zed
2024-06-18 12:16:54 -07:00
Piotr Osiewicz
8af8493da6
typescript: Make VTSLS the default language server for Typescript (#13140)
Additionally, limit # of returned completion items + use fuzzy filtering
on VTSLS side. Prime LSP handler for response handling.


Release Notes:

- VTSLS is now a default language server for TypeScript, TSX, and
JavaScript.
2024-06-18 20:16:03 +02:00
apricotbucket28
f6fa6600bc
wayland: Refactor clipboard implementation (#12405)
Fixes https://github.com/zed-industries/zed/issues/12054

Replaces the `copypasta`/`smithay-clipboard` implementation with a new,
custom one

TODO list:

- [x] Cleanup code
- [x] Remove `smithay-clipboard`
- [x] Add more mime types to the supported list

Release Notes:

- Fixed drag and drop on Gnome
- Fixed clipboard paste on Hyprland
2024-06-18 10:04:19 -07:00
Marshall Bowers
01b836a191
util: Replace lazy_static! with OnceLock (#13215)
This PR replaces the `lazy_static!` usages in the `util` crate with
`OnceLock` from the standard library.

This allows us to drop the `lazy_static` dependency from this crate.

Release Notes:

- N/A
2024-06-18 12:44:58 -04:00
Marshall Bowers
41180b8d81
util: Remove leftover http module (#13214)
This PR removes a leftover `http` module in `util` that was lingering
from #11680.

Release Notes:

- N/A
2024-06-18 12:31:50 -04:00
Marshall Bowers
81475ac4cd
paths: Replace lazy_static! with OnceLock (#13213)
This PR replaces the `lazy_static!` usages in the `paths` crate with
`OnceLock` from the standard library.

This allows us to drop the `lazy_static` dependency from this crate.

The paths are now exposed as accessor functions that reference a private
static value.

Release Notes:

- N/A
2024-06-18 12:22:37 -04:00
Nigel Jose
ba59e66314
Improve Python syntax highlighting (#12868)
Release Notes:

- Improve syntax highlighting in Python #12578 

Before:
<img width="1181" alt="Screenshot 2024-06-08 at 01 44 54"
src="https://github.com/zed-industries/zed/assets/87859239/0b8ab26b-149b-477e-af08-8cd9f2b1c117">

After:

<img width="1184" alt="Screenshot 2024-06-10 at 01 02 35"
src="https://github.com/zed-industries/zed/assets/87859239/a319a5ea-54b7-4681-951d-130ea26aa390">

---------

Co-authored-by: Joseph T Lyons <JosephTLyons@gmail.com>
2024-06-18 12:21:18 -04:00
Panghu
3701e190ce
Add runnable for rust main function (#13087)
Release Notes:

- N/A



https://github.com/zed-industries/zed/assets/21101490/7a57805c-1d31-48b2-bc2c-3a6f0b730d72
2024-06-18 16:25:20 +02:00
Piotr Osiewicz
5dc26c261d
util: Use GlobSet in PathMatcher (#13197)
Previously we were using a single globset::Glob in PathMatcher; higher
up the stack, we were then resorting to using a list of PathMatchers.
globset crate exposes a GlobSet type that's better suited for this use
case. In my benchmarks, using a single PathMatcher with GlobSet instead
of a Vec of PathMatchers with Globs is about 3 times faster with the
default 'file_scan_exclusions' values. This slightly improves our
project load time for projects with large # of files, as showcased in
the following videos of loading a project with 100k source files. This
project is *not* a git repository, so it should measure raw overhead on
our side.

Current nightly: 51404d4ea0


https://github.com/zed-industries/zed/assets/24362066/e0aa9f8c-aae6-4348-8d42-d20bd41fcd76

versus this PR:


https://github.com/zed-industries/zed/assets/24362066/408dcab1-cee2-4c9e-a541-a31d14772dd7



Release Notes:

- Improved performance in large worktrees
2024-06-18 16:12:24 +02:00
Thorsten Ball
64d815a176
linux/x11: Fix closing of GPUI windows not working (#13201)
This fixes everything but the main Zed window (GPUI examples, prompt
library, etc.) not being closable by clicking on the X in X11.

We had a dangling reference before: we would remove the window from the
X11 state, but GPUI itself would still have the window in its
references.

In order to fix this we have to call `window.close()`, which ends up
calling `cx.remove_window()`, which removes the reference.

That in turn then causes the reference to be dropped, which cleans up
the X11 state for the window.

Release Notes:

- N/A
2024-06-18 15:22:26 +02:00
Piotr Osiewicz
5dc54863a4
project panel: Improve performance in large projects (#13202)
In #12980 I've hoisted out creation of HashSet<PathInWorktree> out of
render_entry, which made us not create that hash set for each entry in a
worktree on each frame. In current nightly, we do it once per call to
render() on the whole worktree, which is better.

However, we can still reuse the hashed between the frames, if the
worktree has not changed. Once we calculate the hashset for a given
worktree state, we keep it around for as long as the state is valid for.
We calculate the HashSet lazily, as we may not necessarily need it if
the project panel is collapsed. In large worktrees, this helps keep the
CPU usage of the main thread low-ish.


Release Notes:

- Improved performance of project panel in large worktrees.
2024-06-18 15:09:52 +02:00
Antonio Scandurra
e4ba336971
Preserve sections generated by slash commands when reloading a context (#13199)
Release Notes:

- N/A
2024-06-18 14:49:53 +02:00
Thorsten Ball
195a270e18
vim: Display pending keys in Vim mode indicator (#13195)
This changes the mode indicator to now show pending keys and not just
pending operators.


Release Notes:

- Added pending keys to the mode indicator in Vim mode.

Demo:



https://github.com/zed-industries/zed/assets/1185253/4fc4ffd9-2ba7-4e2c-b2c3-cd19b40cb640
2024-06-18 13:30:18 +02:00
Piotr Osiewicz
3a26a4809d
lsp: Revert URL type change (#13193)
This reverts URI changes made in
https://github.com/zed-industries/zed/pull/12928 while keeping the perf
goodies in tact. We should keep an eye out for
https://github.com/gluon-lang/lsp-types/issues/284
Fixes: https://github.com/zed-industries/zed/issues/13135
Fixes: https://github.com/zed-industries/zed/issues/13131
Release Notes:

- N/A
2024-06-18 12:39:56 +02:00
Conrad Irwin
51404d4ea0
Fix ci" on a brazillian keyboard (#13185)
Fixes: #12523

Release Notes:

- vim: Fix ci" on keyboards where typing a " requires the IME (#12523)
2024-06-17 22:38:36 -06:00
Conrad Irwin
05c4c7872c
Fix ctrl-r with no register (#13184)
Release Notes:

- N/A
2024-06-17 22:17:33 -06:00
Conrad Irwin
0af6e442a7
Don't generate invalid ranges for C code (#13183)
Fixes: #13128

Release Notes:

- Fixed a panic when editing C code
([#13128](https://github.com/zed-industries/zed/issues/13128)).
2024-06-17 21:13:42 -06:00
Max Brunsfeld
7003b0f211
Allow canceling in-progress language server work (e.g. cargo check) (#13173)
Release Notes:

- Added a more detailed message in place of the generic `checking...`
messages when Rust-analyzer is running.
- Added a rate limit for language server status messages, to reduce
noisiness of those updates.
- Added a `cancel language server work` action which will cancel
long-running language server tasks.

---------

Co-authored-by: Richard <richard@zed.dev>
2024-06-17 17:58:47 -07:00
Joseph T. Lyons
f489c8b79f
Allow for non-official builds to report telemetry (#13175)
Release Notes:

- N/A
2024-06-17 20:24:18 -04:00
Marshall Bowers
258a8a37d8
Extract paths out of util (#13182)
This PR extracts the definition of the various Zed paths out of `util`
and into a new `paths` crate.

`util` is for generic utils, while these paths are Zed-specific. For
instance, `gpui` depends on `util`, and it shouldn't have knowledge of
these paths, since they are only used by Zed.

Release Notes:

- N/A
2024-06-17 19:27:42 -04:00
Marshall Bowers
78e0f71a28
ui: Use PopoverMenu::new for constructing PopoverMenus (#13178)
This PR replaces the `popover_menu` function for constructing
`PopoverMenu`s with a `PopoverMenu::new` associated function.

This brings `PopoverMenu` in line with our other UI components.

Release Notes:

- N/A
2024-06-17 18:14:37 -04:00
Marshall Bowers
59104a08fd
assistant: Show an indicator when a crate is being indexed (#13174)
This PR adds an indicator when a crate is being indexed as part of the
`/rustdoc` command invocation.


https://github.com/zed-industries/zed/assets/1486634/0dd4b663-658c-4be5-a342-cfbd7a938fca

Release Notes:

- N/A
2024-06-17 17:39:38 -04:00
Marshall Bowers
7aa28c9b24
rustdoc: Strip out additional chrome (#13172)
This PR updates the HTML to Markdown converter for rustdoc to strip out
some additional chrome.

Namely, anchors and links to source files.

Release Notes:

- N/A
2024-06-17 16:44:15 -04:00
Joseph T. Lyons
ca035dbdd8
Move project event logic to telemetry.rs (#13166)
I previously put this logic directly into `project.rs`, but it doesn't
feel good to pollute that code with telemetry logic, so I've moved it
over to `telemetry.rs`.

Release Notes:

- N/A
2024-06-17 15:52:59 -04:00
Marshall Bowers
71cc95d315
Remove copilot and show_copilot_suggestions setting aliases (#13167)
This PR removes the Copilot-specific aliases for the
`inline_completions` and `show_inline_completions` settings.

While these aliases were added to maintain backward-compatibility, the
aliasing behavior here can lead to a confusing experience when both keys
end up in the `settings.json`.

Release Notes:

- Breaking Change: Removed the `copilot` alias for the
`inline_completions` setting. If you have settings under `copilot` they
should get moved to `inline_completions`.
- Breaking Change: Removed the `show_copilot_suggestions` alias for the
`show_inline_completions` setting.
2024-06-17 15:51:37 -04:00
张小白
3707734f0a
windows: Fix executable display name (#13091)
Closes #12907 

**Note:** To actually take effect, delete the registered key of `Zed` in
`HKEY_CLASSES_ROOT\Local
Settings\Software\Microsoft\Windows\Shell\MuiCache`, for example, delete
this:

![Screenshot 2024-06-15
180939](https://github.com/zed-industries/zed/assets/14981363/8da94188-a869-48bb-9ecf-18a0a2cd3061)


### Before

1. In Taskmanager

![Screenshot 2024-06-15
175146](https://github.com/zed-industries/zed/assets/14981363/bb58a136-9f28-4f7f-9079-d83bc8b27580)

2. Right click taskbar

![Screenshot 2024-06-15
175211](https://github.com/zed-industries/zed/assets/14981363/113797c5-fa38-494e-a939-7a05adfa6d9e)

### After

![Screenshot 2024-06-15
174800](https://github.com/zed-industries/zed/assets/14981363/a1e9c1f5-da05-4a47-a97f-bd297f22ae37)

![Screenshot 2024-06-15
175847](https://github.com/zed-industries/zed/assets/14981363/692ed3ac-6ad0-4804-894e-1fae375ebd3d)

Release Notes:

- N/A
2024-06-17 13:02:09 -06:00
张小白
e19627d92f
windows: Fix regression introduced by a prev PR (#13090)
Fix regression introduced by #12991 

### Before

The re-position and re-size of a window is broken.


https://github.com/zed-industries/zed/assets/14981363/d4fb9dce-707e-4ab1-9ff5-f355b7fdd8a8

### After



https://github.com/zed-industries/zed/assets/14981363/7fd232e6-ff6c-4b7f-ad32-c284acd4f6db




Release Notes:

- N/A
2024-06-17 13:01:35 -06:00
Marshall Bowers
bb75d87285
Remove language_overrides setting alias (#13164)
This PR removes the `language_overrides` alias for the `languages`
setting.

I've seen a number of people run into issues where they have both
`languages` and `language_overrides` in their settings and get confused
when their settings don't seem to apply as expected.

This is a breaking change, but I think it is a necessary one to prevent
more users from running into issues.

Release Notes:

- Breaking Change: Removed the `language_overrides` alias for the
`languages` setting. If you have settings under `language_overrides`
they should get moved to `languages`.
2024-06-17 14:50:45 -04:00
Conrad Irwin
eecbf203dc
Fix 100s freeze on boot on X11 (#13156)
Release Notes:

- Fixed switching between dark and light mode with no windows open.
2024-06-17 12:44:32 -06:00
Marshall Bowers
7fe5c27597
repl: Add missing LICENSE file (#13161)
This PR adds a missing LICENSE file to the `repl` crate.

Release Notes:

- N/A
2024-06-17 14:13:12 -04:00
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
Antonio Scandurra
d95c424d18
Show correct line number for entry placeholders in /search (#13151)
Release Notes:

- N/A
2024-06-17 18:19:44 +02:00
Kirill Bulatov
d6d56191da
Properly propagate git statuses in the outline panel (#13150)
Release Notes:

- N/A

Co-authored-by: Max <max@zed.dev>
2024-06-17 19:06:35 +03:00
Marshall Bowers
2e87e1d26e
assistant: Fix loading local crate docs (#13147)
This PR fixes an issue where loading the crate-level docs with
`/rustdoc` wasn't working as expected.

Release Notes:

- N/A
2024-06-17 11:55:53 -04:00
Marshall Bowers
e8862c45cc
assistant: Indicate when the /rustdoc output is from the index (#13148)
This PR makes it so that when `/rustdoc` returns content from the local
index it indicates as such in the placeholder.

Release Notes:

- N/A
2024-06-17 11:53:23 -04:00
Marshall Bowers
0c28b6a11a
rustdoc: Don't start indexing if a crate is already being indexed (#13149)
This PR updates the rustdoc indexing to not start indexing a crate that
is already being indexed.

Currently the indexing of a crate might get continuously interrupted by
the user's typing, resulting in thrashing of the indexing task and never
indexing the crate in its entirety.

Release Notes:

- N/A
2024-06-17 11:52:05 -04:00
dontwanttothink
16fce64d3a
Fix Hide Copilot context menu item (#13113)
The `features.copilot` setting appears to have been replaced by
`"inline_completion_provider": "none"` at some point, but the Hide
Copilot context menu was never updated to reflect that.

Release Notes:

- Fixed the Hide Copilot context menu item to modify the appropriate
setting.
2024-06-17 11:23:03 -04:00
Antonio Scandurra
b075ce8f04
Rename flaps to creases (#13144)
This is a simple rename and should be transparent for users.

Release Notes:

- N/A
2024-06-17 16:58:59 +02:00
Antonio Scandurra
6322351f00
Draw gutter highlights and indicators on top of blocks (#13142)
This ensures that the gutter progress in the inline assistant is
contiguous.

Release Notes:

- N/A
2024-06-17 15:34:05 +02:00
Antonio Scandurra
78091fa91e
Don't include prompt titles / "Default Prompt:" in slash command output (#13139)
This only includes a newline to ensure there's always something to fold.

Release Notes:

- N/A
2024-06-17 13:53:52 +02:00
Bennet Bo Fenner
d5735dab9a
assistant: Add glob matching for file slash command (#13137)
This PR adds support for glob matching when using the `file` slash
command inside the assistant panel:


https://github.com/zed-industries/zed/assets/53836821/696612d2-486c-4ab0-bf3c-d23a3eeefd25

Release Notes:

- N/A
2024-06-17 13:53:27 +02:00
Antonio Scandurra
03c54623d4
Allow cursor to be moved into an unconfirmed prompt editor via esc (#13134)
This also swaps the icons in the prompt editor.

Release Notes:

- N/A
2024-06-17 12:19:06 +02:00
Kirill Bulatov
0afb3abfd2
Improve outline panel entries' revealing and grouping (#13127)
Release Notes:

- N/A
2024-06-17 13:08:25 +03:00
Antonio Scandurra
2b46a4a0e9
Ensure context inserted via commands is syntax-highlighted (#13133)
Release Notes:

- N/A
2024-06-17 11:57:56 +02:00
Antonio Scandurra
bedf57db89
Fix cursor blinking not working (#13130)
This was a bug in https://github.com/zed-industries/zed/pull/12990, due
to the new focus restoration logic introduced with the editor.

With this pull request, the editor will only restore focus when a
descendant lost it. If the focus was lost by the editor itself, there's
no need to restore it and we can instead proceed with starting the
cursor blink.

Release Notes:

- N/A
2024-06-17 11:31:49 +02:00
Richard Feldman
4855da53df
Don't hide inline assist when editor loses focus (#12990)
Release Notes:

- Now when an editor loses focus (e.g. from switching tabs) and then
gains focus again, it doesn't close the inline assist. Instead, it only
closes when you move the cursor outside of it, e.g. by clicking
somewhere else in its parent editor.

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
2024-06-17 09:43:52 +02:00
Edwin Aronsson
15d3e54ae3
Remove textDocument/diagnostic capability (#13102)
Zed currently does not support pull diagnostics, yet still has the
capability for it (`textDocument/diagnostic`) (added in
14993e0876).
Some language servers therefore assume Zed will use pull diagnostics,
which leads to there being no diagnostics at all. This PR removes this
capability, making it possible to get diagnostics with more language
servers.

Release Notes:

- N/A
2024-06-16 10:39:04 +03:00
Marshall Bowers
064bdab459
theme: Warn when deprecated scrollbar_thumb.background style is used (#13081)
This PR adds a warning when the deprecated `scrollbar_thumb.background`
style property is present in a theme.

This property has been succeeded by `scrollbar.thumb.background`.

The primary reason for this is to get it into the `zed-extension` CLI so
that we can use it to detect which themes need to be updated.

Release Notes:

- N/A
2024-06-15 22:14:39 -04:00
apricotbucket28
38cb95f427
linux: Update cosmic_text (#13095)
Bumps cosmic_text, removes some stale `todo`s and stores a ShapeBuffer
to prevent reallocations

Improvements:

- Performance should be a lot better (haven't actually tested it)
- Fixed display of `\t` in the terminal

![image](https://github.com/zed-industries/zed/assets/71973804/ca994912-851d-48ef-8dc7-b244c9eb484d)

![image](https://github.com/zed-industries/zed/assets/71973804/42fa9acf-ec10-4247-a5e3-2d4fe664ded6)


Release Notes:

- N/A
2024-06-15 15:23:00 -07:00
Conrad Irwin
fc19cc0ddf
vim: ctrl-r while we're on a register kick (#13085)
Release Notes:

- vim: Support `ctrl-r X` to paste in insert mode (#4308)
2024-06-14 22:38:38 -06:00
Conrad Irwin
e6def62c23
Silence git related errors on linux (#13083)
It's hard to imagine a world where we should package this on linux.

Release Notes:

- N/A
2024-06-14 22:38:13 -06:00
Joseph T. Lyons
ff2347dff5
Add events for identifying node projects (#13078)
Release Notes:

- N/A
2024-06-15 00:34:04 -04:00
Marshall Bowers
6319ae0b4a
extension_cli: Allow building without dynamically linking WebRTC (#13080)
This PR fixes an issue where the `zed-extension` CLI could no longer be
run as a static binary due to the following error:

```
dyld[36964]: Library not loaded: @rpath/WebRTC.framework/WebRTC
  Referenced from: <56332E1D-292E-3F9B-97B9-8A9962D21599> /Users/maxdeviant/projects/zed-extensions/zed-extension
  Reason: no LC_RPATH's found
fish: Job 1, './zed-extension --scratch-dir .…' terminated by signal SIGABRT (Abort)
```

This is the result of the addition of a dependency on `workspace` to the
`extension` crate (and thus, the `extension_cli` crate) in #12360.

Since we don't actually _need_ WebRTC in the extension CLI, we don't
care about dynamically linking it.

To resolve this, a new `no-webrtc` feature has been added to the
`live_kit_client` client crate and threaded through all of the crates
between it and the `extension_cli`.

Enabling the `no-webrtc` feature will prevent linking to the LiveKit
Swift SDK as well as linking the WebRTC framework.

Release Notes:

- N/A
2024-06-14 20:13:31 -04:00
Max Brunsfeld
a8bd602334 Remove stray eprintln 2024-06-14 16:11:24 -07:00
Max Brunsfeld
af45db6d1e
Fix FS-related issues that were causing a test failure on linux (#13072)
This fixes `project_tests::rescan_and_remote_updates` .

That test was actually correctly failing, revealing two bugs on Linux.

Release Notes:

- Fixed an issue where file renames were not detected on Linux.
- Fixed performance problems caused by excessive file system events on
Linux.

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2024-06-14 16:03:34 -07:00
Conrad Irwin
fab4b01655
Make linux prompts a bit better (#13067)
Also prompt with a sensible error on install:cli

Release Notes:

- N/A
2024-06-14 16:40:54 -06:00
Conrad Irwin
411ee7a47c
Move keyboard focus when foregrounding windows on X11 (#13071)
Release Notes:

- N/A
2024-06-14 16:16:03 -06:00
Joseph T. Lyons
d5a6ca4914
Add os_name and os_version to all event types (#13063)
Release Notes:

- N/A
2024-06-14 16:38:08 -04:00
Marshall Bowers
ea69846281
Silence error logs in zed tests (#13069)
This PR silences the remaining error logs in the `zed` crate tests by
initializing `env_logger` in test mode.

This means that the logs will no longer be shown unless `--nocapture` is
passed to `cargo test`.

Release Notes:

- N/A
2024-06-14 16:30:15 -04:00
Kirill Bulatov
ff8486e67f
Properly align excerpt and outline items (#13070) 2024-06-14 23:26:07 +03:00
Marshall Bowers
9bc3c6810b
Register Markdown language in some tests to silence error logs (#13066)
This PR registers the Markdown language in some of the tests in the
`zed` crate to silence the error logs about the language not being found
when the chat panel attempts to load it.

Release Notes:

- N/A
2024-06-14 15:29:20 -04:00
Conrad Irwin
45ae0dcc2d
Fix dw at the end of a soft wrapped line (#13065)
Co-Authored-By: Richard <richard@zed.dev>
Release Notes:

- vim: Fixed behavior of `dw` at the end of a soft wrapped line

Co-authored-by: Richard <richard@zed.dev>
2024-06-14 13:18:28 -06:00
Joseph T. Lyons
e40c49a143
Fix incorrect data being assigned to os_name (#13064)
Release Notes:

- N/A
2024-06-14 14:40:22 -04:00
versecafe
0d43d484f6
Use square buttons for code action and run indicators in the gutter (#12906)
### Before

<img width="94" alt="Screenshot 2024-06-14 at 1 34 54 PM"
src="https://github.com/zed-industries/zed/assets/1486634/fe756434-f072-4506-8fd2-c220c17cf112">

<img width="115" alt="Screenshot 2024-06-14 at 1 35 04 PM"
src="https://github.com/zed-industries/zed/assets/1486634/e378f02b-cb55-467d-9a5e-04e162d6daab">

### After

<img width="128" alt="Screenshot 2024-06-14 at 1 34 27 PM"
src="https://github.com/zed-industries/zed/assets/1486634/3d857a85-7673-43b1-8c48-56766455dd81">

<img width="134" alt="Screenshot 2024-06-14 at 1 34 33 PM"
src="https://github.com/zed-industries/zed/assets/1486634/b04c1fef-0a30-4eb1-b8f7-4eff351fcdc7">


Release Notes:

- Improved the look of code action and run indicators in the gutter
([#12803](https://github.com/zed-industries/zed/issues/12803)).

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-06-14 14:21:16 -04:00
Marshall Bowers
6ca09bd4ba
project: Disable project_tests::test_rescan_and_remote_updates on Linux (#13062)
This PR disables the
`project::project_tests::test_rescan_and_remote_updates` test on Linux,
as we've been seeing it fail quite consistently in CI.

We can re-enable it once we've had a chance to investigate and fix.

Release Notes:

- N/A
2024-06-14 14:20:52 -04:00
Kyle Kelley
53f702c92f
Allow Ollama Model KeepAlive to be None, defaulting to indefinite (#13059)
Putting this back to `Option<KeepAlive>` to make existing configs keep
working.

Release Notes:

- N/A
2024-06-14 10:33:28 -07:00
Conrad Irwin
993109aee1
Fix panic in worktree scanning (#13057)
Release Notes:

- Fixed a panic when worktree paths are incorrectly relative.
2024-06-14 10:23:20 -07:00
张小白
4cb45e63f4
windows: Update windows-rs crate and better error handling in DirectWrite (#12818)
- Update `windows-rs` from `0.56` to `0.57`
- Use the newly introduced `Owned` struct in `0.57` to handle the RAII
stuff of `HANDLE`
- Better error handling in `DirectWrite`

Release Notes:

- N/A
2024-06-14 10:12:20 -07:00
Kyle Kelley
1413b5af93
Select the first available model when none configured for Ollama (#13048)
Selects the first available model for Ollama if a model is not
configured.

Release Notes:

- N/A
2024-06-14 09:35:13 -07:00
Kyle Kelley
d9c21b4eb1
Accept numeric keep alive in Ollama settings (#13046)
This adds the ability to set the keep alive as an integer, including
`-1` for staying alive indefinitely until a new model is loaded or
Ollama exits. I've also set the default to `-1` so that models stay
ready to go for Zed to use.

Release Notes:

- N/A
2024-06-14 09:35:04 -07:00
Marshall Bowers
44f66aa426
rustdoc: Add CrateName newtype (#13056)
This PR adds a `CrateName` newtype used to represent crate names.

This makes the code a bit more self-descriptive and prevents confusing
other string values for a crate name.

It also changes the internal representation from a `String` to an
`Arc<str>` for cheaper clones.

Release Notes:

- N/A
2024-06-14 12:21:03 -04:00
Conrad Irwin
3b84b106e2
vim gigv (#13028)
Release Notes:

- vim: Fix `gi` when the insert ended at the end of a line (#12162)
- vim: Add `gv` to restore previous visual selection (#12888)
- vim: Fix `gl` when the first match is at the end of a line
2024-06-14 10:16:59 -06:00
Marshall Bowers
3539a7c04a
Fix a cargo doc warning in the zed crate (#13054)
This PR fixes a warning I observed when running `cargo doc` against the
`zed` crate:

```
 Documenting zed v0.141.0 (/Users/maxdeviant/projects/zed/crates/zed)
warning: this URL is not a hyperlink
   --> crates/zed/src/main.rs:860:69
    |
860 |     /// URLs can either be file:// or zed:// scheme, or relative to https://zed.dev.
    |                                                                     ^^^^^^^^^^^^^^^^ help: use an automatic link instead: `<https://zed.dev.>`
    |
    = note: bare URLs are not automatically turned into clickable links
    = note: `#[warn(rustdoc::bare_urls)]` on by default
```

Release Notes:

- N/A
2024-06-14 11:41:11 -04:00
Kirill Bulatov
a8481099ca
Prefer the same order of entries inside outline and project panels, project search multi buffer (#13044)
Release Notes:

- N/A
2024-06-14 18:33:36 +03:00
Bennet Bo Fenner
0d8e6e6b12
assistant: Add diagnostics slash command (#12998)
This adds a `diagnostics` command to the assistant which allows to
inject compile errors/warnings into the context.

Release Notes:

- N/A
2024-06-14 17:14:50 +02:00
Peter Tripp
0f59607100
docs: wrap_guides (#12992)
- Add 'wrap_guides' to website config docs.
- Add the word 'ruler' to improve searchability.
2024-06-14 09:48:25 -04:00
Piotr Osiewicz
902d7150fe
collab_ui: Re-enable deafening and screen share on Mac (#13040)
Fixes regression from https://github.com/zed-industries/zed/pull/12994
Release Notes:

- N/A
2024-06-14 15:47:53 +02:00
Piotr Osiewicz
55ba80ddd1
lsp: Add support for label_details in completions (#13043)
This fixes an issue reported by @Spoutnik97 in
https://github.com/zed-industries/zed/issues/12711#issuecomment-2163785111
- vtsls returns auxiliary docs via .label_details and not plain .details
field.

Release Notes:

- Improved quality of auxiliary details in completions returned by VTSLS
2024-06-14 13:49:08 +02:00
Piotr Osiewicz
dcb8dc16ca
editor: Update insert_text_format based on resolved completion (#13041)
Fixes #12920

VTSLS does not mark snippet completions as such in the initial
completion response - not until we resolve them; however, we do not
touch initial contents of completion during resolution, which led to us
not treating a snippet as such.

Release Notes:

- Fixed snippet completions sometimes being treated as plain text
completions when using VTSLS
2024-06-14 13:31:02 +02:00
Kirill Bulatov
eb7a09b459
Add excerpts into outline panel (#13034)
Follow-up of https://github.com/zed-industries/zed/pull/12637

Adds excerpt items into the outline panel: now all outline items are
initially hidden under excerpt items that could be toggled open/closed
similar to directories.


![Screenshot 2024-06-14 at 10 45
04](https://github.com/zed-industries/zed/assets/2690773/9c9ef91b-1666-43c3-acc4-96f850098a28)

On active editor's selection change, a corresponding outline will be
revealed still, expanding the corresponding excerpt

![Screenshot 2024-06-14 at 10 45
13](https://github.com/zed-industries/zed/assets/2690773/7dfd14f7-4aca-48f2-8760-8e1362b9a043)

Release Notes:

- N/A
2024-06-14 12:03:16 +03:00
Angelo.Mateus
64bb79b71d
Allow held key events if key is modifier (#13000)
Release Notes:

- (Fixed) Allows held down key events for modifier keys.
([#12566](https://github.com/zed-industries/zed/issues/12566))

---------

Co-authored-by: Angelo <>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-06-13 20:54:59 -06:00
Conrad Irwin
a5af5b2883
Multicursor vim registers (#13025)
Release Notes:

- vim: Added support for multicursor registers (#11687)
- vim: Added support for the `"/` register
2024-06-13 20:32:58 -06:00
Yan Qian
8edfd0a963
ui: Fix doctest (#12985)
Fix the documentation tests failed when running `cargo test --workspace`

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-06-13 20:32:41 -04:00
Owen Law
0ed5327b1c
Fix Flatpak desktop entry (#13019)
Fixes a problem where the env variable was being set in the wrong spot
in #12951

Release Notes:

- N/A
2024-06-13 20:23:49 -04:00
Mikayla Maki
10d3ad4e33
Enable linux tests (#12493)
Note:
- We have disabled all tests that rely on Postgres in the Linux CI. We
only really need to test these once, and as macOS is our team's primary
platform, we'll only enable them on macOS for local reproduction.
- We have disabled all tests that rely on the font metrics. We
standardized on Zed Mono in many fonts, but our CoreText Text System and
Cosmic Text System proved to be very different in effect. We should
revisit if we decide to standardize our text system across platforms
(e.g. using Harfbuzz everywhere)
- Extended the condition timeout significantly. Our CI machines are slow
enough that this is causing spurious errors in random tests.

Release Notes:

- N/A

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-06-13 16:38:53 -07:00
Max Brunsfeld
066cdc2297
Fix panic when doing various cursor movements with a pending mouse selection (#13016)
This fixes a panic in the `SelectionsCollection::first_anchor` when
there was a pending mouse selection and no other selections. Until
recently, this method was only used in vim mode, but as of
53b0720d54,
it's also used in the normal `move_up` and `move_down` actions.

So until recently, the panic that this fixes could only happen in vim
mode.

Release Notes:

- Fixed a crash that could happen when using certain cursor-motion
bindings with a pending mouse selection.
2024-06-13 16:22:45 -07:00
Marshall Bowers
01ba1ddef7
gpui_macros: Disable doctests (#13015)
This PR disables the doctests in the `gpui_macros` crate, as they depend
on `gpui` to run.

Since `gpui` depends on `gpui_macros`, we don't really want to add a
dependency on `gpui` (even though it _appears_ to work as a dev
dependency).

Also did some minor stylistic cleanup of some doc comments.

Release Notes:

- N/A
2024-06-13 18:45:28 -04:00
Marshall Bowers
86167138a9
rustdoc: Automatically index crates (#13014)
This PR removes the need to use `/rustdoc --index <CRATE_NAME>` and
instead indexes the crates once they are referenced.

As soon as the first `:` is added after the crate name, the indexing
will kick off in the background and update the index as it goes.

Release Notes:

- N/A
2024-06-13 18:30:15 -04:00
Marshall Bowers
e0c1ab650e
rustdoc: Fix duplicated item path (#13013)
This PR fixes a bug that was introduced in #13011 where the item path
would get duplicated twice in the database key.

Release Notes:

- N/A
2024-06-13 18:21:52 -04:00
Marshall Bowers
6181ac6bad
rustdoc: Index crates progressively (#13011)
This PR updates the rustdoc indexing to be more progressive.

Rather than waiting until we've crawled the entire crate to begin
writing to the database, we instead start writing the docs as we go.

This makes it so you can start getting completions while the indexing is
still running.

Release Notes:

- N/A
2024-06-13 16:40:06 -04:00