5ddd343
Update tree-sitter-go (#12020)
Click to expand commit body
Release Notes: - N/A
d1y created
5ddd343
Update tree-sitter-go (#12020)
Release Notes: - N/A
d1y created
a9f35d2
Suggest extension for `.wit` files (#12031)
Release Notes: - Added an extension suggestion for `.wit` files.
d1y created
410c46a
Trigger columnar selection behavior on middle mouse down (#12005)
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)
Release Notes: - N/A
Conrad Irwin created
84affa9
Allow the assistant to suggest edits to files in the project (#11993)
### 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)
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)
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)
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)
#11996 Release Notes: - N/A
d1y created
11c97a3
Implement 'Cmd+W with no open tabs closes the window', with a setting (#11989)
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)
### 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)
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)
see https://docs.rs/openssl/latest/openssl/ Release Notes: - N/A
yodatak created
64ba08c
Add documentation for auto-switching theme (#11908)
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)
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)
Release Notes: - N/A
Conrad Irwin created
a787be6
Clarify `CodeLabel.filter_range` doc (#11383)
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)
Release Notes: - N/A
Conrad Irwin created
9d10969
chore: Fix refining_impl_trait lint occurences (#11979)
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)
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)
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)
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)
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)
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)
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)
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)
Release Notes: - N/A
Conrad Irwin created
0dd5fe3
Revert "Fix aside affecting parent popover height (#11859)" (#11942)
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)
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)
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)
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)
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)
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)
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

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
55f08c0
assistant: Update current project context to work with Cargo workspaces (#11935)
This PR updates the current project context to work with Cargo workspaces. Release Notes: - N/A
Marshall Bowers created
f867228
Add prompt library (#11910)
This PR adds a Prompt Library to Zed, powering custom prompts and any
default prompts we want to package with the assistant.
These are useful for:
- Creating a "default prompt" - a super prompt that includes a
collection of things you want the assistant to know in every
conversation.
- Adding single prompts to your current context to help guide the
assistant's responses.
- (In the future) dynamically adding certain prompts to the assistant
based on the current context, such as the presence of Rust code or a
specific async runtime you want to work with.
These will also be useful for populating the assistant actions typeahead
we plan to build in the near future.
## Prompt Library
The prompt library is a registry of prompts. Initially by default when
opening the assistant, the prompt manager will load any custom prompts
present in your `~/.config/zed/prompts` directory.
Checked prompts are included in your "default prompt", which can be
inserted into the assitant by running `assistant: insert default prompt`
or clicking the `Insert Default Prompt` button in the assistant panel's
more menu.
When the app starts, no prompts are set to default. You can add prompts
to the default by checking them in the Prompt Library.
I plan to improve this UX in the future, allowing your default prompts
to be remembered, and allowing creating, editing and exporting prompts
from the Library.
### Creating a custom prompt
Prompts have a simple format:
```json
{
// ~/.config/zed/prompts/no-comments.json
"title": "No comments in code",
"version": "1.0",
"author": "Nate Butler <iamnbutler@gmail.com>",
"languages": ["*"],
"prompt": "Do not add inline or doc comments to any returned code. Avoid removing existing comments unless they are no longer accurate due to changes in the code."
}
```
Ensure you properly escape your prompt string when creating a new prompt
file.
Example:
```json
{
// ...
"prompt": "This project using the gpui crate as it's UI framework for building UI in Rust. When working in Rust files with gpui components, import it's dependencies using `use gpui::{*, prelude::*}`.\n\nWhen a struct has a `#[derive(IntoElement)]` attribute, it is a UI component that must implement `RenderOnce`. Example:\n\n```rust\n#[derive(IntoElement)]\nstruct MyComponent {\n id: ElementId,\n}\n\nimpl MyComponent {\n pub fn new(id: impl Into<ElementId>) -> Self {\n Self { id.into() }\n }\n}\n\nimpl RenderOnce for MyComponent {\n fn render(self, cx: &mut WindowContext) -> impl IntoElement {\n div().id(self.id.clone()).child(text(\"Hello, world!\"))\n }\n}\n```"
}
```
Release Notes:
- N/A
---------
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Nate Butler and Marshall Bowers created
6237e5e
Stop sending hangs to slack for a bit (#11933)
Release Notes: - N/A
Conrad Irwin created
44105e1
Upload panics via collab instead of zed.dev (#11932)
Release Notes: - N/A
Conrad Irwin created
decfbc6
Disallow multiple save modals for the same pane item (#11931)
Fixes https://github.com/zed-industries/zed/issues/10192 Release Notes: - Fixed multiple save modals appearing for the same file being closed ([10192](https://github.com/zed-industries/zed/issues/10192))
Kirill Bulatov created
6513886
Don't scale context menus in editors with buffer font size (#11930)
With the changes in #11817, context menus within editors would get scaled by the `buffer_font_size` instead of the `ui_font_size`. This seems incorrect, as it results in context menus being sized inconsistently depending on what context they originate from. This PR makes it so that all context menus scale based on the `ui_font_size`. ### Before <img width="1474" alt="Screenshot 2024-05-16 at 2 43 19 PM" src="https://github.com/zed-industries/zed/assets/1486634/a5be8113-ae24-44ad-a2e9-61105e1fcc9e"> ### After <img width="1095" alt="Screenshot 2024-05-16 at 2 43 01 PM" src="https://github.com/zed-industries/zed/assets/1486634/3a8d51cf-fc91-4743-8f44-78344028e447"> Release Notes: - Changed context menus in editors to no longer scale with `buffer_font_size`.
Marshall Bowers created
53815af
Fix small markdown typo in Windows docs (#11888)
Fixed a small issue in the windows docs where a note wasn't displaying correctly Release Notes: - N/A
Justy created
5596a34
Wayland: Implement text_input_v3 and xkb compose (#11712)
Release Notes:
- N/A
Fixes #9207
Known Issues:
- [ ] ~~After launching Zed and immediately trying to change input
method, the input panel will appear at Point{0, 0}~~
- [ ] ~~`ime_handle_preedit` should not trigger `write_to_primary`~~
Move to other PR
- [ ] ~~Cursor is visually stuck at the end.~~ Move to other PR
Currently tested with KDE & fcitx5.
Fernando Tagawa created
fdadbc7
Add `WithRemSize` element (#11928)
This PR adds a new `WithRemSize` element to the `ui` crate. This element can be used to create an element tree that has a different rem size than the base window. `WithRemSize` can be nested, allowing for subtrees that have a different rem size than their parent and their children. <img width="912" alt="Screenshot 2024-05-16 at 2 25 28 PM" src="https://github.com/zed-industries/zed/assets/1486634/f599cd9f-c101-496b-93e8-06e570fbf74f"> Release Notes: - N/A
Marshall Bowers created
13bbaf1
Use `UpdateGlobal` accessors in more places (#11925)
This PR updates a number of instances that were previously using `cx.update_global` to use `UpdateGlobal::update_global` instead. Release Notes: - N/A
Marshall Bowers created
c1e291b
gpui: Improve `Global` ergonomics (#11923)
This PR adds some ergonomic improvements when working with GPUI `Global`s. Two new traits have been added—`ReadGlobal` and `UpdateGlobal`—that provide associated functions on any type that implements `Global` for accessing and updating the global without needing to call the methods on the `cx` directly (which generally involves qualifying the type). I looked into adding `ObserveGlobal` as well, but this seems a bit trickier to implement as the signatures of `cx.observe_global` vary slightly between the different contexts. Release Notes: - N/A
Marshall Bowers created
1b26160
Add basic proxy settings (#11852)
Adding `proxy` keyword to configure proxy while using zed. After setting the proxy, restart Zed to acctually use the proxy. Example setting: ```rust "proxy" = "socks5://localhost:10808" "proxy" = "http://127.0.0.1:10809" ``` Closes #9424, closes #9422, closes #8650, closes #5032, closes #6701, closes #11890 Release Notes: - Added settings to configure proxy in Zed --------- Co-authored-by: Jason Lee <huacnlee@gmail.com>
张小白 and Jason Lee created
90b631f
tailwind: Allow configuring custom tailwind server build (#11921)
This adds the ability to configure the `tailwindcss-language-server`
integration to use a custom build of the server.
Example configuration in Zed `settings.json`:
```json
{
"lsp": {
"tailwindcss-language-server": {
"binary": {
"arguments": [
"/Users/username/tailwindcss-intellisense/packages/tailwindcss-language-server/bin/tailwindcss-language-server",
"--stdio"
]
}
}
}
}
```
This will cause Zed to use its own Node version and run it with the
given arguments.
**Note**: you need to provide `--stdio` as the second argument!
It's also possible to use a custom Node binary:
```json
{
"lsp": {
"tailwindcss-language-server": {
"binary": {
"path": "/Users/username/bin/my-node",
"arguments": [
"/Users/username/tailwindcss-intellisense/packages/tailwindcss-language-server/bin/tailwindcss-language-server",
"--stdio"
]
}
}
}
}
```
This is *super handy* when debugging the language server.
Release Notes:
- Added ability to configure own build of `tailwindcss-language-server`
in Zed settings. Example:
`{"lsp":{"tailwindcss-language-server":{"binary":{"arguments":["/absolute/path/to/tailwindcss-language-server/bin/tailwindcss-language-server",
"--stdio" ]}}}}`
Thorsten Ball created
a414b16
python: Add highlighting to variables (#11851)
Krzysztof Witkowski created
9c02239
chat: Only autocomplete active people (#11892)
Release Notes: - chat: Updated name autocompletion to only consider active users --------- Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Conrad Irwin and Marshall Bowers created
178ffab
theme: Properly merge `SyntaxTheme` styles to allow for partial overrides (#11911)
This PR improves the merging behavior for the `SyntaxTheme` such that user-provided values get merged into the base theme. This makes it possible to override individual styles without clobbering the unspecified styles in the base theme. Release Notes: - Improved merging of `syntax` styles in the theme.
Marshall Bowers created