Commit log

fb45c30 v0.145.x preview

Joseph T Lyons created

1607e4e elixir: Bump to v0.0.6 (#14657)

Click to expand commit body
This PR bumps the Elixir extension to v0.0.6.

Changes:

- #14655

Release Notes:

- N/A

Marshall Bowers created

ceffc7e elixir: Respect LSP settings for Lexical (#14655)

Click to expand commit body
This PR updates the Elixir extension with support for reading the LSP
settings when using Lexical as the language server.

Release Notes:

- N/A

Marshall Bowers created

e69b995 zig: Bump to v0.1.4 (#14651)

Click to expand commit body
This PR bumps the Zig extension to v0.1.4.

Changes:

- #14379

Release Notes:

- N/A

Thorsten Ball created

f19b51c zig: Revert changes dependent on new `zed_extension_api` (#14652)

Click to expand commit body
This PR reverts the changes to the Zig extension dependent on the new
`zed_extension_api` version so that we can publish the Zig extension.

Release Notes:

- N/A

Marshall Bowers created

1d2d3b2 svelte: Bump to v0.0.3 (#14650)

Click to expand commit body
This PR bumps the Svelte extension to v0.0.3.

Changes:

- #14614

Release Notes:

- N/A

Marshall Bowers created

959fbd5 docs: Fix typo in Svelte docs (#14649)

Click to expand commit body
This PR fixes a typo in the Svelte docs to reflect the fixes from
#14614.

Release Notes:

- N/A

Marshall Bowers created

ff85f1d Fix default sublime tab navigation (#14427)

Click to expand commit body
Co-authored-by: Peter Tripp <peter@zed.dev>

Nemo and Peter Tripp created

d1300b7 Linux Keybinding Improvements (#14600)

Click to expand commit body
- Fixed ctrl-shift-d (duplicate line) conflict.
- Fixes #14458
- Remove some duplicated definitions
- Fix Expand/Shrink selection (was ctrl-shift-up/down, now alt-shift-left/right)
- Add `ctrl-f2` / `cmd-f2` as alias for `editor::SelectAllMatches` matching VSCode
- Moved multi-cursor (Insert cursor above / below) from ctrl-shift-up/down to alt-shift-up/down

Peter Tripp created

62f5503 svelte: Fix typo in LSP config for inlayHints (#14614)

Click to expand commit body
https://github.com/yioneko/vtsls/blob/9b51c5b177860b9b0e527321c47bb4e0d23f1388/packages/service/configuration.schema.json#L158

Before:
![Screenshot from 2024-07-17
02-45-37](https://github.com/user-attachments/assets/15f67b7b-ed29-418a-b6a5-23601c1ad820)

After:
![Screenshot from 2024-07-17
02-38-37](https://github.com/user-attachments/assets/c6cb71fc-70f4-4ea3-91d4-a184342163b4)

Release Notes:

- N/A

Mathias created

738d079 docs: Remove extra backtick within repl docs (#14611)

Kyle Kelley created

4feb994 php: Bump to v0.1.1 (#14647)

Click to expand commit body
This PR bumps the PHP extension to v0.1.1.

Changes:

- #14643

Release Notes:

- N/A

Marshall Bowers created

40ed3b6 php: Allow using `intelephense` from PATH (#14643)

Click to expand commit body
This PR updates the PHP extension to use `intelephense` from the PATH,
if it exists.

Tested using the following Nix shell:

```sh
NIXPKGS_ALLOW_UNFREE=1 nix-shell -p php nodePackages_latest.intelephense
```

Resolves #11994.

Release Notes:

- N/A

Marshall Bowers created

bd02f4f Respect user preference for JS/TS on_type formatting (#14536)

Click to expand commit body
Release Notes:

- Fix user preferences for JS/TS on_type formatting not being respected by VTSLS.
([#13733](https://github.com/zed-industries/zed/issues/13733),
[#14499](https://github.com/zed-industries/zed/issues/14499))

Mathias created

85bc233 vim: Add :bd/:bp/:bn (#14623)

Click to expand commit body
Also refactor command to be less wierd

Release Notes:

- vim: Added :bd/:bn/:bp (#14457)

Conrad Irwin created

33f6888 vim: Fix ctrl-d/u going to top bottom (#14620)

Click to expand commit body
Release Notes:

- vim: Fixed ctrl-d/ctrl-u getting to top/bottom of buffer (#13250)

Conrad Irwin created

acc9c24 Vim rename via menu too? (#14617)

Click to expand commit body
Follow up to #14320

Release Notes:

- N/A

Conrad Irwin created

2cdfae9 Show an initial empty keymap (#14609)

Click to expand commit body
Release Notes:

- Added default content for the user keymap file.

Conrad Irwin created

cf92b83 Update install CLI message for linux (#14616)

Click to expand commit body
This PR updates the `cli: install` message for Linux. It initially threw
me off thinking that because `path_for_auxiliary_executable` is not
implemented for Linux it's failing and I thought it's a bug. Turns out
the CLI gets installed by the package manager and it's just named
something else.

I ended up only updating the message so it's more clear. If you don't
like the message, let me know :)

The old message:

![image](https://github.com/zed-industries/zed/assets/829535/1a02d08d-2c7a-452a-bfee-dc55d29c0c10)

The new message:

![image](https://github.com/user-attachments/assets/82052a43-1cf5-4b86-88e8-1c1f01a0ae3c)

@ConradIrwin thank you for taking the time and explaining it to me.

closes: #14118

Release Notes:

- N/A

Soroush Mirzaei created

252737a Provide installation instructions for the R extension (#14601)

Click to expand commit body
Release Notes:

- N/A

Kyle Kelley created

9c43450 repl: Don't send KernelInfoRequest on launch (#14608)

Click to expand commit body
Closes #14146. This is just for the time being before a networking
refactoring to split reads and writes on the ROUTER/DEALER ZeroMQ
sockets. Some kernels have not been responding with `kernel_info_reply`,
which ends up hanging our shell socket.

Release Notes:

- N/A

Release notes for the REPL feature will be part of its official launch.

Kyle Kelley created

f8cfb50 php: Bump to v0.1.0 (#14607)

Click to expand commit body
This PR bumps the PHP extension to v0.1.0.

Changes:

- #14603
- #14604

Release Notes:

- N/A

Marshall Bowers created

9499adf docs: Adjust the note and warning callout design (#14605)

Click to expand commit body
So they're more consistent and polished. Felt like they could be a bit more refined.

---

Release Notes:

- N/A

Danilo Leal created

696591c php: Add Phpactor support (#14604)

Click to expand commit body
This PR extends the PHP extension with
[Phpactor](https://github.com/phpactor/phpactor) support.

Phpactor seems to provide a better feature set out-of-the-box for free,
so it has been made the default PHP language server.

Thank you to @xtrasmal for informing us of Phpactor's existence!

Release Notes:

- N/A

Marshall Bowers created

f9b0792 Update Configuration docs (#14029)

Click to expand commit body
Release Notes:

- N/A

---

I'd like to help improve Configuration documentation.

Currently I'm often confused by the configuration doc. It's incomplete:
not all settings are documented. It's disorganized: some options are
grouped together but overall there's not much structure or logic to it.
It's inconsistent: some examples show only key and value, some—just the
closes object, and others full nesting. It's confusing: individual keys
are listed but it's hard to understand where in the config structure
they belong.

I suggest the following changes:

- Always specify the full path of the setting
- Document all settings Zed recognises
- List settings in alphabetical order of their full path
- Always use full nesting in examples 

This is an example, of what it might look like. It's first draft, too.
So I'm open to suggestions.

Please let me know if you're interested in this. The whole thing might
need a bit of effort so I'd like to know if this is something you might
want before doing all the work.

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>

Alexander Mankuta and Conrad Irwin created

60b22cf php: Upgrade `zed_extension_api` to v0.0.6 (#14603)

Click to expand commit body
This PR upgrades the PHP extension to use v0.0.6 of the
`zed_extension_api`.

Release Notes:

- N/A

Marshall Bowers created

1fe16f4 Fix context in command palette from application menu (#14599)

Click to expand commit body
Supercedes #14468

Release Notes:

- linux: Fixed the command palette when opened from the application menu

Conrad Irwin created

448ef53 More ignorable commits (#14596)

Click to expand commit body
- More of https://github.com/zed-industries/zed/pull/13889

Peter Tripp created

f612c40 repl: Don't run empty code submission (#14598)

Click to expand commit body
Closes #14565.

Release Notes:

- N/A

Kyle Kelley created

0c61059 Open URIs from the CLI, support for the `zed://` URI scheme on Linux (#14104)

Click to expand commit body
Allows Zed to open custom `zed://` links (redirects from
https://zed.dev/channels) on Linux used XDG MIME types.

This PR also allows the CLI to be able to open Zed (`zed://`) URIs
directly instead of executing the main executable in
`/usr/libexec/zed-editor`.


Release Notes:

- Linux: Allow `zed.dev/channel` (`zed://`) URIs to open on Linux
- CLI: Ability to open URIs from the command line

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>

Cappy Ishihara and Conrad Irwin created

64a796d Fix renaming sometimes not working in vim mode (#14320)

Click to expand commit body
Disable vim key contexts during renaming, to fix renaming being
interfered with vim commands.

Release Notes:

- Fixed renaming sometimes not working in vim mode
[#14292](https://github.com/zed-industries/zed/issues/14292)
[#11882](https://github.com/zed-industries/zed/issues/11882).
- Fixed inline assistant sometimes not working in vim mode #11559

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>

Congyu and Conrad Irwin created

76594ae vim: fix escape while waiting (#14595)

Click to expand commit body
Follow up from #14233

Release Notes:

- N/A

Conrad Irwin created

05de1dc Rename Linux desktop icon to match application name (#14437)

Click to expand commit body
Release Notes:

- Updated the Linux manual installation docs to fix windows not matching
with desktop icons
([#14435](https://github.com/zed-industries/zed/issues/14435)).

The automated `curl | bash` installation script already renames the
`zed.desktop` file to match the window, so most users will not be facing
this issue. This is only affecting users who have downloaded and
extracted the files following the manual instructions.

Since the app ID and the desktop file name are not the same, open
windows are not being matched with the desktop icons, therefore showing
a default one. This PR changes the documentation to tell users they
should rename the `.desktop` file to `dev.zed.Zed.desktop`, and
therefore match the automated install script.

Before:

![image](https://github.com/user-attachments/assets/324b91e6-dae1-4902-b59c-b4f124a29820)

After:

![image](https://github.com/user-attachments/assets/169a4e8c-5c84-4400-8f0d-30cf478ca272)

Robert Sturla created

ef53058 collab: Fix exact extension filtering (#14591)

Click to expand commit body
This PR fixes the exact extension filtering introduced in #14588.

As we traversed the extensions we were always updating `exact_match`,
regardless of whether it matched the extension ID from the filter.

Release Notes:

- N/A

Marshall Bowers created

8028e7f Refactor repl context menu (#14587)

Kyle Kelley created

cb6fc11 Rank exact extension ID matches higher in search results (#14588)

Click to expand commit body
Release Notes:

- Improved relevance of extension search results

Co-authored-by: Marshall <marshall@zed.dev>

Conrad Irwin and Marshall created

cf8bd4a Remoting public alpha (#14541)

Click to expand commit body
Release Notes:

- remoting: An alpha version of remote development is now available to
everyone. For more information on how to use it, and limitations see
https://zed.dev/docs/remote-development.

Conrad Irwin created

62ab6e1 remoting: Allow Add/Remove remote folder (#14532)

Click to expand commit body
Release Notes:

- remoting (alpha only): Allow add/remove folders to projects

---------

Co-authored-by: Max <max@zed.dev>

Conrad Irwin and Max created

be1387f Fix text appearing twice after Chinese character input (#14558)

Click to expand commit body
Release Notes:

- Fixed the issue where text appears twice in the editor after Chinese
Character input.([linux: Fix IME on
fcitx](https://github.com/zed-industries/zed/pull/14508)).

Before:

![zed2](https://github.com/user-attachments/assets/e387d70b-ca91-49c8-93e4-850f9e3ef227)

After Fixed:

![zed](https://github.com/user-attachments/assets/8307c12f-30a7-4e82-8c65-d0b53bb8cf44)

aohanhongzhi created

09459fa wayland: Fix drag and drop for paths with spaces (#14574)

Click to expand commit body
This wasn't doing any proper parsing before, so `%20` or similar encoded
characters weren't handled correctly.

Release Notes:

- N/A

apricotbucket28 created

400ae9c extensions_ui: Add feature upsell for Go (#14586)

Click to expand commit body
This PR adds a feature upsell for Go when searching for it in the
extensions view.

Release Notes:

- N/A

Marshall Bowers created

f9472ce extensions_ui: Add telemetry for docs click-throughs from feature upsells (#14583)

Click to expand commit body
This PR adds some telemetry when the "View docs" button is clicked on a
feature upsell.

The goal here is to get a sense for how effective these upsells are at
getting users to click through if they can't find what they're looking
for.

Release Notes:

- N/A

Marshall Bowers created

0556edd docs: Add Git page (#14582)

Click to expand commit body
This PR adds a basic Git page to the docs so that we have somewhere to
link to from the Git upsell within Zed.

Release Notes:

- N/A

Marshall Bowers created

09c497f editor: Ensure allocation reuse (#14577)

Click to expand commit body
In #14567 I claimed that the underlying allocation is reused. And it
was. At the time I've submitted a PR I was using `.filter_map(|x| x)`,
which got flagged by clippy as something that could be simplified to
`.flatten()` - that however broke the allocation reuse promise.

Thus, this PR goes back to using `filter_map` and additionally in debug
builds it performs checks for allocation reuse. With .flatten in place,
a bunch of unit test fail on that branch, so the checks do work.



Release Notes:

- N/A

Piotr Osiewicz created

1b85438 docs: Fix casing of "REPL" in sidebar (#14579)

Click to expand commit body
This PR fixes the casing of the REPL link in the sidebar.

Release Notes:

- N/A

Marshall Bowers created

b3d0ac3 Show how to switch out kernels and discover them (#14531)

Click to expand commit body
A few new doc changes for the repl feature.

Release Notes:

- N/A

Kyle Kelley created

a51a9b0 docs: Add AOSC OS Installation (#14575)

Click to expand commit body
Added AOSC OS Installation docs

Release Notes:

- N/A

Mag Mell created

6cf6614 Fix xkbcommon overflow more (#14571)

Click to expand commit body
Release Notes:

- linux: Fixed overflow in xkbcommon-rs

Conrad Irwin created

0bf0152 Fix GoForward shortcut on non-US keyboard layouts (#14570)

Click to expand commit body
- Fixes #14418. Originally broken by #13946

Peter Tripp created

d338e4a editor: Improve performance of edit coalescing (#14567)

Click to expand commit body
# Background
In https://github.com/zed-industries/zed/issues/14408 we received a
repro for "Replace all" being slow, even after the work I did
https://github.com/zed-industries/zed/pull/13654. Admittedly #13654 was
a pretty straightforward change.
Under the profiler it turned out that we're spending *10 seconds* in
`memmove` on main thread. Ugh. Not great. The direct ancestor of the
memmove call was
https://github.com/zed-industries/zed/blob/66f0c390a88f5aa16d21047a8982a5888fa0f816/crates/editor/src/display_map/tab_map.rs#L108-L119

What?

# Accidental O(n^2)
We have a bunch of `consolidate_*_edits` functions which take a list of
Fold/Tab/Inlay/Wrap edits and merge consecutive edits if their ranges
overlap/are next to one another. The loop usually goes as follows:
```
while ix < edits.len() {
    let (prev_edits, next_edits) = edits.split_at_mut(ix);
    let prev_edit = prev_edits.last_mut().unwrap();
    let edit = &next_edits[0];
    if PREV_EDIT_CAN_BE_MERGED_WITH_CURRENT_ONE {
        MERGE_EDITS(prev_edit, edit);
        edits.remove(ix); // !!
    } else {
        ix += 1;
    }
}
```
The problem is the call to `.remove` - it has to shift all of the
consecutive elements in the `edits` vector! Thus, when processing the
edits from the original repro (where consolidation shrinks the edit list
from 210k entries to 30k), we mostly spend time moving entries in memory
around.

Thus, the original repro isn't really an issue with replace_all; it's
just that replace_all is one of the few tools available to the end user
that can apply large # of edits in a single transaction.

# Solution
In this PR I address the issue by rewriting the loop in a way that does
not throw items away via `.remove`. Instead, `Iterator::scan` is used,
which lets us achieve the same logic without having the pitfalls of
`.remove`s.
Crucially, **this code does not allocate a new backing buffer for
edits** (see [this article for
rationale](https://blog.polybdenum.com/2024/01/17/identifying-the-collect-vec-memory-leak-footgun.html));
with `vec.into_iter().scan().filter_map().collect()` we still use the
same underlying buffer as the one that's passed into `consolidate_*`
functions. In development I verified that by checking whether the
pointers to backing storage of a Vec are the same before and after the
consolidation.

# Results

### Before
Nightly 0.145.0
[66f0c390a88f5aa16d21047a8982a5888fa0f816](https://github.com/zed-industries/zed/commit/66f0c390a88f5aa16d21047a8982a5888fa0f816)


https://github.com/user-attachments/assets/8b0ad3bc-86d6-4f8a-850c-ebb86e8b3bfc

(~13s end-to-end)
### After


https://github.com/user-attachments/assets/366835db-1d84-4f95-8c74-b1506a9fabec

(~2s end-to-end)

The remaining lag is (I think) lies in `TextSummary` calculation and not
the consolidation itself. Thus, for the purposes of scoping this PR,
I'll tackle it separately.

Release Notes:

- Significantly improved performance of applying large quantities of
concurrent edits (e.g. when running "Replace all").

Piotr Osiewicz created