Conrad Irwin
891b1c4104
Tighten up KeyBinding ( #11839 )
...
After #11795 , the context menu was looking a little ridiculous on Mac in
vim mode (and the command palette has for a while).
<img width="258" alt="Screenshot 2024-05-14 at 20 35 50"
src="https://github.com/zed-industries/zed/assets/94272/cb0ec8b9-4da6-4ab4-9eec-c60d62f79eff ">
<img width="581" alt="Screenshot 2024-05-14 at 20 56 28"
src="https://github.com/zed-industries/zed/assets/94272/d8fec440-17cc-4c20-80d9-c1d7f2f18315 ">
A future change would be to have a platform style for vim keybindings so
we can render `g A`, but for now this just removes a bunch of (to my
eyes at least) unnecessary space:
<img width="576" alt="Screenshot 2024-05-14 at 21 01 55"
src="https://github.com/zed-industries/zed/assets/94272/a39f4123-dc3b-4bb5-bb8d-5de6b37552e7 ">
cc @iamnbutler
Release Notes:
- N/A
2024-05-14 21:12:17 -06:00
Gus and Conrad Irwin
3b7e131cef
Show buffer_search on vim::MoveToNextMatch ( #11836 )
...
This changes the vim::MoveToNextMatch event callback to open the
buffer_search toolbar. This fixes an issue where highlights would appear
which were only cancellable by opening then closing the toolbar.
Release Notes:
- the buffer search toolbar now opens on vim::MoveToNextMatch fixing the
issue where highlights were not cancellable
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com >
2024-05-14 20:57:58 -06:00
CharlesChen0823
0e9b916228
cleanup ( #11835 )
...
cleanup unneed code.
Release Notes:
- N/A
2024-05-14 18:25:54 -07:00
jansol
e0a3e1f029
blade: Fix display of straight underlines ( #11818 )
...
Fixes : #11715
(also apply alpha of the color to wavy ones while we're at it)
Release Notes:
- Fixed display of straight underlines when using the blade renderer
(#11715 )
2024-05-14 18:03:43 -07:00
Gus and Conrad Irwin
6ccd54c0e2
Fix bug with keymaps flickering in mouse menu ( #11795 )
...
Fixes a bug where Vim bindings would flash in the mouse context menu and
then be replaced by the default keybindings. Also fixes those bindings
not being usable while the mouse context menu was open.
Release Notes:
- Fixed bug where Vim bindings were not available when mouse context
menu was open
---------
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com >
2024-05-14 17:18:21 -06:00
Marshall Bowers
7624695c65
astro: Bump to v0.0.2 ( #11834 )
...
This PR bumps the Astro extension to v0.0.2.
Changes:
- #11830
Release Notes:
- N/A
2024-05-14 19:12:43 -04:00
Marshall Bowers
d1526a10f9
ruby: Bump to v0.0.3 ( #11833 )
...
This PR bumps the Ruby extension to v0.0.3.
Changes:
- #11825
Release Notes:
- N/A
2024-05-14 19:08:39 -04:00
Marshall Bowers
d31799d652
php: Bump to v0.0.3 ( #11832 )
...
This PR bumps the PHP extension to v0.0.3.
Changes:
- #11695
Release Notes:
- N/A
2024-05-14 19:02:39 -04:00
d1y
ab66607da7
astro: Fix broken language injections ( #11830 )
...
Update upstream
https://github.com/virchau13/tree-sitter-astro/commit/4be180759ec13651f72bacee65fa477c64222a1a
This will solve #11827
Before:
<img width="644" alt="image"
src="https://github.com/zed-industries/zed/assets/45585937/f6b10667-9197-4e5d-8513-78ce3d22f9e7 ">
After:
<img width="700" alt="image"
src="https://github.com/zed-industries/zed/assets/45585937/7bd7b0e6-e73c-4d1d-abd6-d6b2d88e97a6 ">
Release Notes:
- N/A
2024-05-14 18:57:10 -04:00
Vitaly Slobodin
df4a059d26
ruby: Fix solargraph completion highlighting ( #11825 )
...
Hi. This pull request fixes a small error with `solargraph` completions
to make them more detailed. It removes the nested match expression to
resolve the problem with highlighting the completion items and their
signatures with the return type as well. Thanks.
See screenshots below.
Release Notes:
- N/A
| Before | After |
| ------------- | ------------- |
| 
| 
|
2024-05-14 18:54:19 -04:00
Marshall Bowers and Nate
24eb176a50
assistant: Add basic current project context ( #11828 )
...
This PR adds the beginnings of current project context to the Assistant.
Currently it supports reading a `Cargo.toml` file and using that to get
some basic information about the project, and its dependencies:
<img width="1264" alt="Screenshot 2024-05-14 at 6 17 03 PM"
src="https://github.com/zed-industries/zed/assets/1486634/cc8ed5ad-0ccb-45da-9c07-c96af84a14e3 ">
Release Notes:
- N/A
---------
Co-authored-by: Nate <nate@zed.dev >
2024-05-14 18:39:52 -04:00
Conrad Irwin
93df316fce
cli: Support --foreground for debugging ( #11819 )
...
Release Notes:
- Added `--foreground` to the cli to allow running zed on the current
PTY.
2024-05-14 16:05:40 -06:00
Conrad Irwin
53dde2fc89
Auto-open remote projects on creation ( #11826 )
...
Release Notes:
- N/A
2024-05-14 16:05:26 -06:00
Kirill Bulatov
7e67ffd1ce
Fix a link to Zed configuring docs ( #11739 )
...
Based on https://github.com/zed-industries/zed/pull/11736
Release Notes:
- N/A
2024-05-14 17:15:14 -04:00
Marshall Bowers
451d8e4222
assistant: Restructure ambient context in preparation for adding more ( #11822 )
...
This PR restructures the ambient context in the `assistant` crate to
make it more amenable to adding more kinds of ambient context.
Release Notes:
- N/A
2024-05-14 17:03:39 -04:00
Conrad Irwin
d1f5f8a3b7
Prevent remoting dialog from losing focus ( #11820 )
...
Release Notes:
- N/A
2024-05-14 14:32:37 -06:00
claytonrcarter
1ec0d3fc4a
php: Highlight PHPDoc comments ( #11695 )
...
This adds highlighting of phpdoc tags and PHP types to phpdoc comments,
using
[tree-sitter-phpdoc](https://github.com/claytonrcarter/tree-sitter-phpdoc )
(maintained by yours me, and also in use by neovim).
<table>
<tr>
<td>
<strong>Before</strong>
<img
src="https://github.com/zed-industries/zed/assets/1420419/bae4c502-8a2c-4399-893f-fcff4e5797b6 ">
</td>
<td>
<strong>After</strong>
<img
src="https://github.com/zed-industries/zed/assets/1420419/8848e9fb-61a0-4938-a118-7041da9589c0 ">
</td>
</tr>
</table>
Release Notes:
- N/A
2024-05-14 15:48:14 -04:00
Piotr Osiewicz
6f5dff1e6a
tasks: Refresh available tasks in editor when tasks.json changes ( #11811 )
...
Release Notes:
- N/A
2024-05-14 21:26:35 +02:00
Thomas Aunvik
72bcd95a9a
linux: Add Keybinds Ctrl-Insert to Copy and Shift-Insert to Paste ( #11799 )
...
Release Notes:
- N/A
2024-05-14 12:03:21 -07:00
Marshall Bowers
47d27c7c12
Scale UI elements in the editor based on the buffer_font_size ( #11817 )
...
This PR adjusts how UI elements are rendered inside of full-size editors
to scale with the configured `buffer_font_size`.
This fixes some issues where UI elements (such as the `IconButton`s used
for code action and task run indicators) would not scale as the
`buffer_font_size` was changed.
We achieve this by changing the rem size when rendering the
`EditorElement`, with a rem size that is derived from the
`buffer_font_size`.
`WindowContext` now has a new `with_rem_size` method that can be used to
render an element with a given rem size. Note that this can only be
called during `request_layout`, `prepaint`, or `paint`, similar to
`with_text_style` or `with_content_mask`.
### Before
<img width="1264" alt="Screenshot 2024-05-14 at 2 15 39 PM"
src="https://github.com/zed-industries/zed/assets/1486634/05ad7f8d-c62f-4baa-bffd-38cace7f3710 ">
<img width="1264" alt="Screenshot 2024-05-14 at 2 15 49 PM"
src="https://github.com/zed-industries/zed/assets/1486634/254cd11c-3723-488f-ab3d-ed653169056c ">
### After
<img width="1264" alt="Screenshot 2024-05-14 at 2 13 02 PM"
src="https://github.com/zed-industries/zed/assets/1486634/c8dad309-62a4-444f-bfeb-a0009dc08c03 ">
<img width="1264" alt="Screenshot 2024-05-14 at 2 13 06 PM"
src="https://github.com/zed-industries/zed/assets/1486634/4d9a3a52-9656-4768-b210-840b4884e381 ">
Note: This diff is best viewed with whitespace changes hidden:
<img width="245" alt="Screenshot 2024-05-14 at 2 22 45 PM"
src="https://github.com/zed-industries/zed/assets/1486634/7cb9829f-9c1b-4224-95be-82182017ed90 ">
Release Notes:
- Changed UI elements within the editor to scale based on
`buffer_font_size` (e.g., code action indicators, task run indicators,
etc.).
2024-05-14 14:34:39 -04:00
Flafy
24935de85f
Fix reveal_path blocks on linux ( #11702 )
...
If you go to the file tree and press "x" (which is
"project_panel::RevealInFinder"). It will open the default file
manager(in my case nautilus). But on Linux it makes Zed unresponsive.
This fixes that.
Release Notes:
- Fixed Zed blocked after opening file manager in the file tree on
Linux.
2024-05-14 11:18:45 -07:00
Mikayla Maki
e8acfb690a
Toss return value ( #11815 )
...
Release Notes:
- N/A
2024-05-14 11:17:10 -07:00
CharlesChen0823
e064e51a6f
linux: Handle modification events from file watcher ( #11778 )
...
Fixed #11595
Release Notes:
- N/A
2024-05-14 11:00:26 -07:00
张小白
f9e41dd39e
windows: Improve handling of the WM_SETTINGCHANGE ( #11738 )
...
This event is broadcast to all windows, so we can handle this message in
the `WindowsWindow` ranther than in `WindowsPlatform`.
Release Notes:
- N/A
2024-05-14 10:57:46 -07:00
张小白
2847dacb9c
windows: Support multi-monitor ( #11699 )
...
Zed can detect changes in monitor connections and disconnections and
provide corresponding feedback. For example, if the current window's
display monitor is disconnected, the window will be moved to the primary
monitor. And now Zed always opens on the monitor specified in
`WindowParams`.
Release Notes:
- N/A
2024-05-14 10:54:18 -07:00
张小白
cbcc8697e0
windows: Update crate Windows from 0.53 to 0.56 ( #11662 )
...
Version 0.56 has fixed many of the previous bugs, and one of the bugs
prevent me implementing some functions.
Release Notes:
- N/A
2024-05-14 09:59:55 -07:00
apricotbucket28 and Akilan Elango
32b2e61f17
wayland: Window controls and drag ( #11525 )
...
Based on https://github.com/zed-industries/zed/pull/11046
- Partially fixes #10346
- Fixes https://github.com/zed-industries/zed/issues/9964
## Features
Window buttons

Window drag

Native window context menu

### Limitations
- No resizing
- Wayland only (though X11 always has window decorations)
### Technical
This PR adds three APIs to gpui.
1. `show_window_menu`: Triggers the native title bar context menu.
2. `start_system_move`: Tells the compositor to start dragging the
window.
3. `should_render_window_controls`: Whether the compositor doesn't
support server side decorations.
These APIs have only been implemented for Wayland, but they should be
portable to other platforms.
Release Notes:
- N/A
---------
Co-authored-by: Akilan Elango <akilan1997@gmail.com >
2024-05-14 09:44:55 -07:00
Thorsten Ball
0fd3f3ca75
git: Support git repos with .git folder above project root ( #11550 )
...
TODOs:
- [x] Add assertions to the test to ensure that the git status is
propagated
- [x] Get collaboration working
- [x] Test opening a git repository inside another git repository
- [x] Test opening the sub-folder of a repository that itself contains
another git repository in a subfolder
Fixes:
- Fixes https://github.com/zed-industries/zed/issues/10154
- Fixes https://github.com/zed-industries/zed/issues/8418
- Fixes https://github.com/zed-industries/zed/issues/8275
- Fixes https://github.com/zed-industries/zed/issues/7816
- Fixes https://github.com/zed-industries/zed/issues/6762
- Fixes https://github.com/zed-industries/zed/issues/4419
- Fixes https://github.com/zed-industries/zed/issues/4672
- Fixes https://github.com/zed-industries/zed/issues/5161
Release Notes:
- Added support for opening subfolders of git repositories and treating
them as part of a repository (show git status in project panel, show git
diff in gutter, git blame works, ...)
([#4672 ](https://github.com/zed-industries/zed/issues/4672 )).
Demo video:
https://github.com/zed-industries/zed/assets/1185253/afc1cdc3-372c-404e-99ea-15708589251c
2024-05-14 18:34:51 +02:00
95b3fd65d4
Report response latency and errors when using (inline) assistant ( #11806 )
...
Release Notes:
- N/A
Co-authored-by: Nathan <nathan@zed.dev >
Co-authored-by: David <davidsp@anthropic.com >
2024-05-14 18:18:26 +02:00
5d73044151
Sanitize messages before sending them to Anthropic ( #11810 )
...
Release Notes:
- N/A
Co-authored-by: Nathan <nathan@zed.dev >
Co-authored-by: David <davidsp@anthropic.com >
2024-05-14 17:47:33 +02:00
Conrad Irwin
1b7f5d08c9
Don't bundle libdl 🤦 ( #11809 )
...
Release Notes:
- N/A
2024-05-14 09:41:35 -06:00
Marshall Bowers
a67f3d7c63
gleam: Bump to v0.1.2 ( #11803 )
...
This PR bumps the Gleam extension to v0.1.2.
Changes:
- #11476
- #11801
Release Notes:
- N/A
2024-05-14 10:53:43 -04:00
Marshall Bowers
a5e2570876
gleam: Add gleam test task ( #11801 )
...
This PR adds a task for running `gleam test`.
Release Notes:
- N/A
2024-05-14 10:45:14 -04:00
Antonio Scandurra
af3fdd65d7
Add support for interacting with Claude in the assistant panel ( #11798 )
...
Release Notes:
- Added support for interacting with Claude in the assistant panel. You
can enable it by adding the following to your `settings.json`:
```json
"assistant": {
"version": "1",
"provider": {
"name": "anthropic"
}
}
```
2024-05-14 15:57:52 +02:00
Antonio Scandurra
1e871d844c
Add support for gpt-4o when using zed.dev as the model provider ( #11794 )
...
Release Notes:
- N/A
2024-05-14 13:55:47 +02:00
Antonio Scandurra and Nathan Sobo
a90b0af12b
Introduce recent files ambient context for assistant ( #11791 )
...
<img width="1637" alt="image"
src="https://github.com/zed-industries/zed/assets/482957/5aaec657-3499-42c9-9528-c83728f2a7a1 ">
Release Notes:
- Added a new ambient context feature that allows showing the model up
to three buffers (along with their diagnostics) that the user interacted
with recently.
---------
Co-authored-by: Nathan Sobo <nathan@zed.dev >
2024-05-14 13:48:36 +02:00
Antonio Scandurra
e9e664e749
Allow using the inline assistant within the assistant panel ( #11754 )
...
Release Notes:
- Added the ability to use the inline assistant within the assistant
panel.
2024-05-14 13:42:32 +02:00
Thorsten Ball
a2a75624bc
docs: Document how to use custom api_url in Assistant ( #11790 )
...
This essentially documents the comment here:
https://github.com/zed-industries/zed/issues/4424#issuecomment-2053646583
Release Notes:
- N/A
2024-05-14 11:39:57 +02:00
Piotr Osiewicz
1f21e778cd
tasks: Reorganize task modal ( #11752 )
...

Release Notes:
- Improved tasks modal by highlighting a distinction between a task
template and concrete task instance and surfacing available keybindings
more prominently. Task templates are now always available in the modal,
even if there's already a history entry with the same label.
- Changed default key binding for "picker::UseSelectedQuery" to `opt-e`.
2024-05-14 11:22:09 +02:00
CharlesChen0823
76d708ced7
terminal: Fix Alacritty key bindings ( #11782 )
...
Close #10502
Release Notes:
- Fixed `ctrl-space` not being forwarded correctly in the terminal view.
([#10502 ](https://github.com/zed-industries/zed/issues/10502 ))
2024-05-14 11:09:21 +02:00
Thorsten Ball
1debc2237a
inline blame: Match icon size to font size in buffer ( #11788 )
...
This fixes #11311 .
Release Notes:
- Fixed icon in inline git blame entry not changing with the buffer font
size. ([#11311 ](https://github.com/zed-industries/zed/issues/11311 )).
Before:

After:

2024-05-14 11:06:16 +02:00
Toon Willems
d17b19b2da
Add GPT-4o as possible model ( #11764 )
...
Resolves : #11766
Release Notes:
- Add GPT-4o support (see: https://openai.com/index/hello-gpt-4o/ ).
GPT-4o is better and faster than 4-turbo, at half the price.
2024-05-14 10:43:24 +02:00
Thorsten Ball
8893a0c30d
shell: Load SHELL from passwd entry if launched as desktop app ( #11758 )
...
This fixes #8794 and other related problems.
The problem, in short, is this: `$SHELL` might be outdated. This code
ensures that we update `$SHELL` to what we can deem the newest version,
if we're started as a desktop application.
The background is that you can get the user's preferred shell in two
ways:
1. Read the `SHELL` env variable
2. Read the `/etc/passwd` file and check which shell is set
Most applications should and do prefer (1) over (2).
Why is it preferred? Reading `SHELL` means that processes can inherit
the variable from each other. And you can do something like
`SHELL=/bin/cool-shell ./my-cool-app`
But what happens if the application was launched from the desktop? Which
SHELL env does it inherit then?
It inherits the env from the process that launched it, which is
Finder.app or launchd or GNOME or something else — these are all
long-running processes that get their environment when the user logs in.
They do *not* get a new environment unless restarted (either process
restarted or computer restarted)
That means the `SHELL` env variable they have might be outdated.
That's a problem if you, for example, change your shell with `chsh` and
then launch the app from the desktop.
That change of the default shell is not reflected in the app if the app
only reads from SHELL. Because that hasn’t been updated. Instead it
should read from passwd file to get the newest value.
Release Notes:
- Fixed SHELL being outdated if Zed was launched via Finder or Raycast
or other desktop launchers.
([#8794 ](https://github.com/zed-industries/zed/issues/8794 ))
2024-05-14 10:16:55 +02:00
Conrad Irwin
f444524722
Try some more linker magic to get it working on ubuntu 20 ( #11784 )
...
Release Notes:
- N/A
2024-05-13 22:08:10 -06:00
Conrad Irwin
a133edc9c3
Fix script/bundle-linux ( #11783 )
...
Release Notes:
- N/A
2024-05-13 20:39:27 -06:00
Marshall Bowers
93e7008ff9
xtask: Check for licenses that are duplicated instead of being symlinked ( #11777 )
...
This PR updates `cargo xtask licenses` to also check for license files
that are not symlinks.
Release Notes:
- N/A
2024-05-13 19:13:09 -04:00
Marshall Bowers
49345fefbd
Add xtask for finding crates with missing licenses ( #11776 )
...
This PR adds a new `cargo xtask licenses` command for finding crates
with missing license files.
A number of crates were uncovered that were missing a license file, and
have had the appropriate license file added.
Release Notes:
- N/A
2024-05-13 18:52:12 -04:00
Marshall Bowers
7c13f2c034
Add missing LICENSE file to http crate ( #11773 )
...
This PR adds a missing LICENSE file to the recently-extracted `http`
crate.
Release Notes:
- N/A
2024-05-13 18:26:12 -04:00
Kirill Bulatov
2ce3c1bf55
Remove selection highlights from deleted diff editors on blur ( #11772 )
...
Follow-up of https://github.com/zed-industries/zed/pull/11710
Release Notes:
- Removed extra line highlights when deleted diff editors loose focus
2024-05-14 01:15:49 +03:00
Danilo Leal
650e7c38bb
docs: Fix typos on the Assistant Panel page ( #11725 )
...
Fix typos on the Assistant Panel page, also including removal of
unnecessary commas and standardization to US English.
Release Notes:
- N/A
PS: Assuming here US English is the preferred style (e.g., "canceled"
vs. "cancelled".) Happy to revert if that's not the case! :)
2024-05-13 18:03:06 -04:00