Commit log

7a90b11 html: release 0.1.0 (#12083)

Click to expand commit body
Add config for tag autoclosing: add following to lsp section of your
settings:
    "vscode-html-language-server": {
      "settings": {
        "html": { "tagAutoclosing": true }
      }
    }

It also accepts `css`, `js/ts` and `javascript` as options.

Disable HTML language server in JS/TS/TSX files for now. I decided to
disable it for now as it caused excessive edits in these types of files
(as reported by @mariansimecek in
https://github.com/zed-industries/zed/pull/11761#issuecomment-2122038107);
it looks like HTML language server tries to track language ranges (e.g.
whether a particular span is TS/HTML fragment etc) just like we do.
However in plain JS/TSX files it seems like it treats the whole file as
one big chunk of HTML, which is.. not right, to say the least.

No release note, as HTML extension goodies are not on Preview yet.

Release Notes:

- N/A

Piotr Osiewicz created

a5b14de project panel: Add Duplicate action (#12081)

Click to expand commit body
This fixes #5304 by adding a new Duplicate action to the project panel
context menu.

It really is implemented on top of copy&paste.



Release Notes:

- Added a Duplicate action to the project panel.
([#5304](https://github.com/zed-industries/zed/issues/5304)).



https://github.com/zed-industries/zed/assets/1185253/f0fa6a4b-f066-47df-84f0-257a049800d1

Thorsten Ball created

ba1d28f Add `.gql` and `.graphqls` extensions for GraphQL icon (#12073)

Click to expand commit body
There are `.gql` and `.graphqls` suffix support in [GraphQL VSCode
extension](https://marketplace.visualstudio.com/items?itemName=GraphQL.vscode-graphql-syntax).
I use those file extensions in my projects, hence I wanted them to be
graphql icons.

Release Notes:

- Added GraphQL icon for `.gql` and `.graphqls` files.

currently:

![resim](https://github.com/zed-industries/zed/assets/1047345/4c333129-00cc-401a-88e6-fd44f74caea3)

after this pr:

![resim](https://github.com/zed-industries/zed/assets/1047345/103a0b5a-1c8b-4dea-998c-e768940887c4)

in vscode:

![resim](https://github.com/zed-industries/zed/assets/1047345/29f438d6-ff9e-4a95-8ef2-e5d8d27c0fe9)

Anıl Şenay created

2f31026 ui: Don't break flex layout when using `WithRemSize` (#12076)

Click to expand commit body
This PR fixes an issue where the flex hierarchy wasn't getting broken by
the use of `WithRemSize`.

Release Notes:

- N/A

Marshall Bowers created

315e45f Match the startup behavior of the CLI to the main app (#12044)

Click to expand commit body
Currently the main binary will open an empty file if no previous
workspaces exist or, if it is the first startup, show the welcome page.
When starting via the CLI it will simply drop you in an empty workspace:
no empty file and no welcome page.

This changes the CLI startup to match the behavior of the non-CLI
startup, so they will both create an empty file or show the welcome page
if no path was given and no workspaces were opened in the past.

Release Notes:

- Matched startup behavior of the CLI to the behavior of the main app.

Owen Law created

1e18bcb vim: Fix %s replace not working more than twice (#12045)

Click to expand commit body
close: #11981 

Release Notes:

- N/A

---------

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

CharlesChen0823 and Conrad Irwin created

f2357c7 terminal: Add coloration to task icons based on status (#12066)

Click to expand commit body
Release Notes:

- Fixes: ([#11968](https://github.com/zed-industries/zed/issues/11968)).

Adds colouration to task icons in terminal based off status


![image](https://github.com/zed-industries/zed/assets/147033096/32578358-3da8-4082-9212-637dcd346576)

versecafe created

42ea2be Add "new window" option to the dock menu (#12067)

Click to expand commit body
Fixes: #11651
Co-Authored-By: versecafe <147033096+versecafe@users.noreply.github.com>



Release Notes:

- Added a "New Window" item to the dock menu
([#11651](https://github.com/zed-industries/zed/issues/11651)).

---------

Co-authored-by: versecafe <147033096+versecafe@users.noreply.github.com>

Conrad Irwin and versecafe created

1732ea9 Better private file sharing for remote projects (#12002)

Click to expand commit body
Release Notes:

- N/A

---------

Co-authored-by: Mikayla <mikayla@zed.dev>

Conrad Irwin and Mikayla created

3a79aa8 Fuzzy-match lines when applying edits from the assistant (#12056)

Click to expand commit body
This uses Jaro-Winkler similarity for now, which seemed to produce
pretty good results in my tests. We can easily swap it with something
else if needed.

Release Notes:

- N/A

Antonio Scandurra created

0b8c168 html: Add support for autoclosing of tags (#11761)

Click to expand commit body
Fixes #5267 
TODO:
- [x] Publish our fork of vscode-langservers-extracted on GH and wire
that through as a language server of choice for HTML extension.
- [x] Figure out how to prevent edits made by remote participants from
moving the cursor of a host.

Release Notes:

- Added support for autoclosing of HTML tags in local projects.

Piotr Osiewicz created

0970323 add `PickerDelegate::selected_index_changed` (#12059)

Click to expand commit body
Adds the ability to have some effect run when a selection changes in a
picker.

If the `PickerDelegate` implements something other than `None` for
`selected_index_changed` then each time the selection changes it will
run that effect.

For example:

```rs
impl PickerDelegate for PromptManagerDelegate {
    //...

    fn selected_index_changed(
        &self,
        ix: usize,
        cx: &mut ViewContext<Picker<Self>>,
    ) -> Option<Box<dyn Fn(&mut WindowContext) + 'static>> {
        Some(self.prompt_manager.set_active_prompt(ix, cx))
    }

    //...
}
```

This isn't currently used in any picker, but I'm adding this to allow
the functionality we intended for the prompt library, we're changing
selections, activates a preview in the right column.

This will be useful for building any sort of UI where there's a picker
on the left and a preview on the right, such as a UI like them
telescope.

Release Notes:

- N/A

Nate Butler created

7db85b0 golang: autoclose backticks (#12050)

Click to expand commit body
Fixes #12025



Release Notes:
- Fixed backtick characters not getting autoclosed in Golang files
(#12025).

Piotr Osiewicz created

ab7ce32 Add glob support for custom file type language (#12043)

Click to expand commit body
Release Notes:

- Added glob support for file_types configuration
([#10765](https://github.com/zed-industries/zed/issues/10765)).

`file_types` can now be written like this:

```json
"file_types": {
  "Dockerfile": [
    "Dockerfile",
    "Dockerfile.*",
  ]
}
```

Joshua Farayola created

4e935f9 Remove F2 keybind for Rename on MacOS and Linux (#12037)

Click to expand commit body
Fix [#11608](https://github.com/zed-industries/zed/issues/11608)

Release Notes:

- Changed rename keybind from F2 to Enter in right-click context menu
([#11608](https://github.com/zed-industries/zed/issues/11608)).

![image](https://github.com/zed-industries/zed/assets/30131536/5ebdbb04-ff4e-46ff-80fb-9e95b2b3d285)

Nipun Shukla created

2f4890a ruby: Pass initialization options to LSPs (#12012)

Click to expand commit body
This pull request adds ability to pass `initialization_options` to both
`solargraph` and `ruby-lsp` language servers. Additionally it updates
the documentation to reflect that and the recently added `ruby-lsp`
server.

Release Notes:

- Pass `initialization_options` to Ruby LSP servers.

Vitaly Slobodin created

5ddd343 Update tree-sitter-go (#12020)

Click to expand commit body
Release Notes:

- N/A

d1y created

a9f35d2 Suggest extension for `.wit` files (#12031)

Click to expand commit body
Release Notes:

- Added an extension suggestion for `.wit` files.

d1y created

410c46a Trigger columnar selection behavior on middle mouse down (#12005)

Click to expand commit body
fixes https://github.com/zed-industries/zed/issues/11990

Release Notes:

- Changed middle mouse down to trigger a columnar selection, creating a
rectangle of multi cursors over a dragged region.
([#11990](https://github.com/zed-industries/zed/issues/11990))

Mikayla Maki created

1f611a9 Allow copy-pasting dev-server-token (#11992)

Click to expand commit body
Release Notes:

- N/A

Conrad Irwin created

84affa9 Allow the assistant to suggest edits to files in the project (#11993)

Click to expand commit body
### Todo

* [x] tuck the new system prompt away somehow
* for now, we're treating it as built-in, and not editable. once we have
a way to fold away default prompts, let's make it a default prompt.
* [x] when applying edits, re-parse the edit from the latest content of
the assistant buffer (to allow for manual editing of edits)
* [x] automatically adjust the indentation of edits suggested by the
assistant
* [x] fix edit row highlights persisting even when assistant messages
with edits are deleted
* ~adjust the fuzzy search to allow for small errors in the old text,
using some string similarity routine~

We decided to defer the fuzzy searching thing to a separate PR, since
it's a little bit involved, and the current functionality works well
enough to be worth landing. A couple of notes on the fuzzy searching:
* sometimes the assistant accidentally omits line breaks from the text
that it wants to replace
* when the old text has hallucinations, the new text often contains the
same hallucinations. so we'll probably need to use a more fine-grained
editing strategy where we perform a character-wise diff of the old and
new text as reported by the assistant, and then adjust that diff so that
it can be applied to the actual buffer text

Release Notes:

- Added the ability to request edits to project files using the
assistant panel.

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Nathan <nathan@zed.dev>

Max Brunsfeld , Antonio Scandurra , Marshall , Antonio , and Nathan created

4386268 Avoid extra completion requests (#11875)

Click to expand commit body
Do not spawn a second completion request when completion menu is open and a new edit is made.

Release Notes:

- N/A

Gus created

e5a4421 Reduce spamming of inline completion discard events (#11999)

Click to expand commit body
I'm not a huge fan of passing around a boolean all around the place, but
this will tame the events for now until we have a better solution.

Release Notes:

- N/A

Joseph T. Lyons created

99c6389 gleam: Bump to v0.1.3 (#12000)

Click to expand commit body
This PR bumps the Gleam extension to v0.1.3.

Changes:

- #11998

Release Notes:

- N/A

Marshall Bowers created

0325051 gleam: Update tree-sitter-gleam (#11998)

Click to expand commit body
#11996

Release Notes:

- N/A

d1y created

11c97a3 Implement 'Cmd+W with no open tabs closes the window', with a setting (#11989)

Click to expand commit body
Follow up to: https://github.com/zed-industries/zed/pull/10986

However, I have set this to have a default behavior of 'auto': matching
the current platform's conventions, rather than a default value of
'off'.

fixes https://github.com/zed-industries/zed/issues/5322.

Release Notes:

- Changed the behavior of `workspace::CloseActiveItem`: when you're
using macOS and there are no open tabs, it now closes the window
([#5322](https://github.com/zed-industries/zed/issues/5322)). This can
be controlled with a new setting, `when_closing_with_no_tabs`, to
disable it on macOS, or enable it on other platforms.

Mikayla Maki created

7fd736e docs: Update macOS development docs with dispatch.h error solution (#11986)

Click to expand commit body
### Title
Update macOS Development Documentation with Dispatch.h Error Solution

### Description
This PR updates the macOS development documentation to include a
solution for the `dispatch/dispatch.h` file not found error. This error
is encountered during local development when using the `cargo run`
command. The documentation now includes steps to ensure the Xcode
command line tools are properly installed and set, and instructions to
set the `BINDGEN_EXTRA_CLANG_ARGS` environment variable.

### Changes
- Added troubleshooting section for `dispatch/dispatch.h` error in
`development/macos.md`.

### Related Issues
- Closes [#11963](https://github.com/zed-industries/zed/issues/11963)

### Testing Instructions
1. Follow the steps in the updated `development/macos.md` to configure
your environment.
2. Run `cargo clean` and `cargo run` to ensure the build completes
successfully.

Release Notes:

- N/A

Bosco created

4dd83da Fix hang when opening URL in first browser window (#11961)

Click to expand commit body
If opening a url opens the first browser window the call does not return
completely blocking the ui until the browser window is closed. Using
spawn instead of status does not block, but we will loose the exitstatus
of the browser window.

Release Notes:

- N/A

Moritz Bitsch created

719e6e9 linux: Add more missing dependencies on Fedora (#11868)

Click to expand commit body
see https://docs.rs/openssl/latest/openssl/

Release Notes:

- N/A

yodatak created

64ba08c Add documentation for auto-switching theme (#11908)

Click to expand commit body
Added documentation regarding auto-switching themes to the default
settings file, according to
([#9627](https://github.com/zed-industries/zed/issues/9627)).

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>

Kuppjaerk and Marshall Bowers created

b93e564 Format default settings (#11985)

Click to expand commit body
This PR formats `default.json`, as it had gotten out-of-sync with
Prettier.

Release Notes:

- N/A

Marshall Bowers created

483a735 Allow opening a single remote file (#11983)

Click to expand commit body
Release Notes:

- N/A

Conrad Irwin created

a787be6 Clarify `CodeLabel.filter_range` doc (#11383)

Click to expand commit body
Improves documentation for `CodeLabel.filter_range` in
`zed_extension_api` by clarifying that it's a range of only the text
displayed in the label, *not* the `code` field.

Release Notes:

- N/A

Valentine Briese created

b890fa7 Report an error when trying to open ui in linux::headless (#11952)

Click to expand commit body
Release Notes:

- N/A

Conrad Irwin created

9d10969 chore: Fix refining_impl_trait lint occurences (#11979)

Click to expand commit body
These show up when compiling Zed with latest nightly, which means that
we'd have to do it one or two Rust releases down the line.
Release Notes:

- N/A

Piotr Osiewicz created

7909867 theme: Remove default syntax colors (#11980)

Click to expand commit body
This PR removes the default syntax colors from the theme.

With the changes in #11911 these colors could leak through if the theme
didn't provide a value for that syntax color.

Removing them gives themes a clean slate to work with.

Release Notes:

- N/A

Marshall Bowers created

8631280 Support terminals with ssh in remote projects (#11913)

Click to expand commit body
Release Notes:

- Added a way to create terminal tabs in remote projects, if an ssh
connection string is specified

Kirill Bulatov created

70888cf Fix `npm install` command with a `URI://localhost:port` proxy setting (#11955)

Click to expand commit body
NodeRuntime without environment information can not parse `localhost`
correctly.

Release Notes:

- N/A

张小白 created

5ad8e72 Change default Prettier's `useTabs` settings based on Zed settings (#11958)

Click to expand commit body
Part of https://github.com/zed-industries/zed/issues/7656

When a project is formatted by Prettier that Zed installs, make it
respect Zed's `hard_tabs` settings by passing the value into Prettier
config as `useTabs`.


https://github.com/zed-industries/zed/assets/2690773/80345cdd-d4f8-40b2-ab56-dba6b9646c70

Release Notes:

- Fixed default Prettier not respecting Zed's `hard_tabs` settings

Kirill Bulatov created

4ca6e0e Make autoscroll optional when highlighting editor rows (#11950)

Click to expand commit body
Previously, when highlighting editor rows with a color, we always
auto-scrolled to the first highlighted row. This was useful in contexts
like go-to-line and the outline view. We had an explicit special case
for git diff highlights. Now, part of the `highlight_rows` API, you
specify whether or not you want the autoscroll behavior. This is needed
because we want to highlight rows in the assistant panel, and we don't
want the autoscroll.

Release Notes:

- N/A

Max Brunsfeld created

57b5bff Support very large channel membership lists (#11939)

Click to expand commit body
Fixes the channel membership dialogue for the zed channel by not
downloading all 111k people in one go.

Release Notes:

- N/A

Conrad Irwin created

df3bd40 Speed up is_dirty and has_conflict (#11946)

Click to expand commit body
I noticed that scrolling the assistant panel was very slow in debug
mode, after running a completion. From profiling, I saw that it was due
to the buffer's `is_dirty` and `has_conflict` checks, which use
`edits_since` to check if there are any non-undone edits since the saved
version.

I optimized this in two ways:
* I introduced a specialized `has_edits_since` method on text buffers,
which allows us to more cheaply check if the buffer has been edited
since a given version, without some of the overhead involved in
computing what the edits actually are.
* In the case of `has_conflict`, we don't even need to call that method
in the case where the buffer doesn't have a file (is untitled, as is the
case in the assistant panel). Buffers without files cannot be in
conflict.

Release Notes:

- Improved performance of editing the assistant panel and untitled
buffers with many edits.

Max Brunsfeld created

23315d2 Fix country code serialization (#11947)

Click to expand commit body
Release Notes:

- N/A

Conrad Irwin created

0dd5fe3 Revert "Fix aside affecting parent popover height (#11859)" (#11942)

Click to expand commit body
This reverts commit d3dfa91254f8cbc7f4779463b30a3df1677c395d.

This change can cause weird behavior where the completion menu ends up
positioned away from the cursor location:

<img width="1062" alt="Screenshot 2024-05-16 at 6 43 17 PM"
src="https://github.com/zed-industries/zed/assets/1486634/0462a874-4fe3-4ca9-88ce-8d5d0b4009fe">

With the change reverted:

<img width="1026" alt="Screenshot 2024-05-16 at 6 43 35 PM"
src="https://github.com/zed-industries/zed/assets/1486634/9fc7b9a1-0cfb-4a84-8f6b-b481a785ceca">

Release Notes:

- Fixed an issue where the completion menu would sometimes appear
detached from the cursor location (preview only).

Marshall Bowers created

b9ecca7 Remove wiring for `assistant2` (#11940)

Click to expand commit body
This PR removes the wiring for `assistant2` that hooks it up to Zed.

Since we're focusing in on improving the current assistant, we don't
need this present in Zed.

I left the `assistant2` crate intact for now, to make it easier to
reference any code from it.

Release Notes:

- N/A

Marshall Bowers created

b60254f x11: Add XIM support (#11657)

Click to expand commit body
This pull request adds XIM (X Input Method) support to x11 platform.

The implementation utilizes [xim-rs](https://crates.io/crates/xim), a
XIM library written entirely in Rust, to provide asynchronous XIM
communication.
Preedit and candidate positioning are fully supported in the editor
interface, yet notably absent in the terminal environment.

This work is sponsored by [Rainlab Inc.](https://rainlab.co.jp/en/)

Release Notes:
- N/A

---------

Signed-off-by: npmania <np@mkv.li>

npmania created

97691c1 assistant: Remove `unwrap`s in `RecentBuffersContext` (#11938)

Click to expand commit body
This PR removes the `unwrap`s in the `RecentBuffersContext` when
building the message.

We can just make `build_message` return a `Result` to clean things up.

Release Notes:

- N/A

Marshall Bowers created

7462234 wayland: Don't reinvert inverted scroll axes (#11937)

Click to expand commit body
Release Notes:

- Wayland: Fixed Natural Scrolling Being Wrongly Reinverted
([#11874](https://github.com/zed-industries/zed/issues/11874)).

bbb651 created

80caa74 Support setting font feature values (#11898)

Click to expand commit body
Now (on `macOS` and `Windows`) we can set font feature value:
```rust
  "buffer_font_features": {
    "cv01": true,
    "cv03": 3,
    "cv09": 1,
    "VSAH": 7,
    "VSAJ": 8
  }
```

And one can still use `"cv01": true`.



https://github.com/zed-industries/zed/assets/14981363/3e3fcf4f-abdb-4d9e-a0a6-71dc24a515c2




Release Notes:

- Added font feature values, now you can set font features like `"cv01":
7`.

---------

Co-authored-by: Mikayla <mikayla@zed.dev>

张小白 and Mikayla created

b6189b0 Add telemetry for supermaven (#11821)

Click to expand commit body
Data migration plan:

- [X] Make a duplicate table of `copilot_events`
    - Name: `inline_completion_events`
    - Omit `suggestion_id` column
- [X-reverted-skipping] In collab, continue to match on copilot_events,
but simply stuff their data into inline_completion_events, to forward it
to the new table
- [skipping] Once collab is deployed, ensure no events are being sent to
copilot_events, migrate `copilot_events` to new table via a transaction
- [skipping] Delete `copilot_events` table

---

- [X] Locally test that copilot events sent from old clients get put
into inline_completions_table
- [X] Locally test that copilot events and supermaven events sent from
new clients get put into inline_completions_table

---

- [X] Why are discard events being spammed?
- A:
https://github.com/zed-industries/zed/blob/8d4315712bc706a9b04d9daf638b264e5789b1f9/crates/editor/src/editor.rs#L2147


![scr-20240514-pqmg](https://github.com/zed-industries/zed/assets/19867440/e51e7ae4-21b8-47a2-bfaa-f68fb355e409)

This will throw off the past results for accepted / dismissed that I was
wanting to use to evaluate Supermaven quality, by comparing its rate
with copilot's rate.

I'm not super thrilled with this fix, but I think it'll do. In the
`supermaven_completions_provider`, we check if there's a `completion_id`
before sending either an accepted or discard completion event. I don't
see a similar construct in the `copilot_completions_provider` to
piggyback off of, so I begrudgingly introduced
`should_allow_event_to_send` and had it follow the same pattern that
`completion_id` does. Maybe there's a better way?

---

Adds events to supermaven suggestions. Makes "CopilotEvents" generic ->
"InlineCompletionEvents".

Release Notes:

- N/A

Joseph T. Lyons created