Commit Graph

20873 Commits

Author SHA1 Message Date
Conrad Irwin
c65673feae
Fix linux prompts (#14021)
Release Notes:

- N/A
2024-07-09 13:00:33 -07:00
Mikayla Maki
6c9da838b7
Update README.md 2024-07-09 12:57:49 -07:00
Mikayla Maki
a173beeb81
Set minversion to next Zed Linux release 2024-07-09 12:55:29 -07:00
Mikayla Maki
002ce6c343
Update README.md 2024-07-09 12:51:52 -07:00
Mikayla Maki
2c30b8836e
Update README.md 2024-07-09 12:46:46 -07:00
Conrad Irwin
0d527dfb9e
Better zsh install fix (#14017)
Fix it on linux too 🤦

Release Notes:

- N/A
2024-07-09 13:34:32 -06:00
Peter Tripp
110ce8a267
Python: Fix auto close for single quotes (#14014)
Fixes #13972
2024-07-09 15:27:57 -04:00
Marshall Bowers
c6b9f1920f
Remove additional wrapping elements in the chat panel (#14013)
This PR removes some wrapping elements that were used inside of the chat
panel.

To facilitate this, the `Label` component now has a `weight` method to
change the font weight.

Release Notes:

- N/A
2024-07-09 15:27:37 -04:00
张小白
df935df5a3
windows: Obtain mouse double-click information from the system instead of hardcoding (#13391)
Release Notes:

- N/A
2024-07-09 12:17:55 -07:00
Matin Aniss
68b5ea4e60
windows: Fix and simplify title bar padding (#13420)
This PR fixes the off by one pixel of the top client rect when not
maximized due to the added border. It also simplifies and properly fixes
the title bar padding problem when maximized, it is now properly taken
care of in GPUI rather then adding the padding in the UI.

Release Notes:

- N/A
2024-07-09 12:15:15 -07:00
Aleksei Gusev
5e1521eded
Change the default shortcut for git blame on Linux (#13637)
Zed already has a shortcut assigned to ctrl-alt-g and it's mapped to
`search::SelectNextMatch`. Having another multi shortcut with the same
prefix makes `ctrl-alt-g` to have a very noticeable delay when pressed.

This commit changes the default shortcut for git blame to `alt-g b`

Release Notes:

- N/A
2024-07-09 12:13:20 -07:00
Mikayla Maki
ba28827de5
Add support for numpad keys on linux (#14018)
Fixes https://github.com/zed-industries/zed/issues/12117

Partial application of the changes in
https://github.com/zed-industries/zed/pull/13396

Release Notes:

- N/A
2024-07-09 12:07:48 -07:00
张小白
c22dbbebe2
windows: Fix tailwindcss-language-server (#13891)
We should run this server with `powershell`, or we will get some runtime
errors.

![Screenshot 2024-07-06
180154](https://github.com/zed-industries/zed/assets/14981363/e272e146-d4a8-4447-aa65-b657a49622de)


Release Notes:

- Fixed `tailwindcss-language-server` on Windows.
2024-07-09 12:07:20 -07:00
张小白
8f29ff8a63
windows: Fix font clipping issue (#13854)
Closes #12737 . Left before this PR, right after.

![Screenshot 2024-07-05
180308](https://github.com/zed-industries/zed/assets/14981363/437baec3-2672-4b19-8595-17a6c564506e)


Release Notes:

- Fixed font rendering clipping issue on Windows.(#12737 )
2024-07-09 12:06:14 -07:00
Jason Lee
ae414e21f0
gpui: Fix hide titlebar on Windows, with titlebar: None option (#13975)
Release Notes:

- N/A

Ref the macOS Window:

When the `titlebar` is none, the titlebar should be hidden.


adaa483176/crates/gpui/src/platform/mac/window.rs (L516-L528)

```
cargo run -p gpui --example window_positioning
```

## Before


![img_v3_02ck_939c23d0-acc6-40c1-aaf7-c6dd73ddf7ag](https://github.com/zed-industries/zed/assets/5518/f2c7aa02-a102-4f24-8243-74219957d16b)

## After

<img width="466" alt="image"
src="https://github.com/zed-industries/zed/assets/5518/176ce4ea-14e9-44c8-8f2d-01e20ff3e543">
2024-07-09 12:04:55 -07:00
francesco-gaglione
2dd486733b
Reveal in files instead of Finder (#13432)
fixes: #12776 

Release Notes:

- Renamed `editor::RevealInFinder` to `editor::RevealInFileManager`

---------

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2024-07-09 11:54:14 -07:00
Mikayla Maki
f44e81b3b5
Add more package managers to docs (#14015)
Release Notes:

- N/A
2024-07-09 11:47:58 -07:00
Andy Weiss
c093bc8aa8
Fix search/replace start of line anchor (#13920)
This is related to #9428 

I noticed that doing a search and replace for the beginning of a line
`^` results in the trailing line being included in the search. This
seems to be because of the way the range is generated for generating
matches being the up to the start of the trailing line rather than up to
the end of the last line.

I added a test and took a stab at fixing it but it is a bit yolo as this
is the first time I've seen this codebase.
2024-07-09 12:39:24 -06:00
Piotr Osiewicz
09e7b481b8
lsp: Add support for ShowMessage notification (#14012)
When "one newer language" sends these messages, "one newer editor" will
display a pop-up for users to see. :)

Related to https://github.com/gleam-lang/gleam/issues/3274


![image](https://github.com/zed-industries/zed/assets/24362066/00d2c168-59f0-4033-91c8-af29c47516b3)

Release Notes:

- A certain popular language recently had to work around a missing LSP
notification. This has been fixed
2024-07-09 20:12:05 +02:00
Conrad Irwin
8cfa690271
Fix transparency (#14010)
Release Notes:

- (preview only) Fix transparent themes
2024-07-09 12:11:18 -06:00
Marshall Bowers
3cdd465226
gpui: Make style macros more composable (#14007)
This PR begins the process of breaking up the `style_helpers!` macro
into smaller macros that can be used to generate methods for a related
subset of styles.

The style method macros also now accept an optional `visibility`
parameter to control the visibility of the generated methods. This
allows for adding these methods to a struct instead of a just a trait.

For example, to expose just the padding styles on a `Facepile` we can do
this:

```rs
impl Facepile {
    fn style(&mut self) -> &mut StyleRefinement {
        self.base.style()
    }

    gpui::padding_style_methods!({
        visibility: pub
    });
}
```

Release Notes:

- N/A
2024-07-09 13:52:52 -04:00
张小白
8203b6875b
windows: Remove more todos (#13818)
Release Notes:

- N/A
2024-07-09 10:44:42 -07:00
Antonio Scandurra
ce7074c883
Fix panic when opening the same context twice (#14004)
Release Notes:

- Fixed a crash that occurred when opening the same context twice in the
assistant panel (preview-only).
2024-07-09 19:10:20 +02:00
Peter Tripp
6cc8412a05
Prevent dumping of temporary files in config_dir (#14002)
Move telemetry temp files from `config_dir` to `log_dir`. Fixes #7155 

- On MacOS: from `~/.config/zed` to `~/Library/Logs/Zed`
- On Linux: from `~/.config/zed` to `.local/share/zed/logs` (or
`$FLATPAK_XDG_DATA_HOME/zed/logs`).

Release Notes:

- Fixed telemetry putting temporary files in config_dir
([#7155](https://github.com/zed-industries/zed/issues/7155)).
2024-07-09 12:59:17 -04:00
Stanislav Alekseev
2a97aad273
Fix scrolling sticking to top (#13874)
The problem seemingly was that scrolling only started after autoscroll
has finished. I have added a function to forcefully stop it, which I
call when scroll event happens
Release Notes:

- Fixed delay when changing scrolling direction (#13720)

---------

Co-authored-by: Piotr <piotr@zed.dev>
2024-07-09 18:44:46 +02:00
Marshall Bowers
275dd3fa81
Remove extraneous Cargo.lock files (#14001)
This PR removes some extraneous `Cargo.lock` files for the `storybook`
and `sqlez` crates.

These lockfiles were not used, as everything uses the workspace's
`Cargo.lock`.

Release Notes:

- N/A
2024-07-09 12:15:34 -04:00
Marshall Bowers
3cb2a1404c
gpui_macros: Refactor style helpers (#13999)
This PR refactors the style definitions in the `gpui_macros` style
helpers to use structs instead of tuples for additional clarity.

Release Notes:

- N/A
2024-07-09 11:35:54 -04:00
Peter Tripp
dd9b2e2cde
PR template: Make issue numbers double clickable (no brackets) (#13989)
Release Notes:

- N/A
2024-07-09 11:30:06 -04:00
Nate Butler
b691d1baf2
Improve experience when themes provide transparent status colors (#13996)
We shouldn't assume all themes will give us solid status color
backgrounds.

This change makes it so the status color renders on top of a normal
elevated surface background.

#### Before | After (Transparent status background color – Fixed)

![CleanShot 2024-07-09 at 10 50
17@2x](https://github.com/zed-industries/zed/assets/1714999/5f4b24c1-335a-4ed8-a1d0-f511e217e4a5)

![CleanShot 2024-07-09 at 10 50
31@2x](https://github.com/zed-industries/zed/assets/1714999/38c06533-bda5-4cfb-822a-ed5a9639fc33)

---

#### Before | After (Solid status background color – No change)

![CleanShot 2024-07-09 at 10 49
43@2x](https://github.com/zed-industries/zed/assets/1714999/bd60c807-a7bb-4f60-ab47-ddba17288e93)

![CleanShot 2024-07-09 at 10 49
58@2x](https://github.com/zed-industries/zed/assets/1714999/6ab27d60-5a77-448c-a23b-569b337f11e1)



Release Notes:

- Improved support for transparent status colors in themes.
2024-07-09 11:27:47 -04:00
Conrad Irwin
bc0359a474
gpui: Input example log keystrokes (#13963)
Release Notes:

- N/A
2024-07-09 08:33:29 -06:00
apricotbucket28
23c84f8dc0
linux: Treat fullscreen as tiled on X11 and prevent resizing while maximized (#13990)
Two quick fixes for issues I noticed:

1. Fullscreening an unmaximized X11 window still showed rounded window
corners and allowed resizing
2. Maximized windows still allowed for resizing on corners due to
missing checks

![image](https://github.com/zed-industries/zed/assets/71973804/47df4de2-4013-4e51-88c3-d33b52a909f5)


Release Notes:

- N/A
2024-07-09 16:30:30 +02:00
Danilo Leal
29226170f1
docs: Add tiny tweaks to the Linux page (#13994)
Release Notes:

- N/A
2024-07-09 11:26:22 -03:00
Peter Tripp
9a523ef730
Fix keybind conflicts (atom mac/linux default) (#13988)
- atom(mac): Cmd+j conflicts with `workspace: ToggleBottomDock` in
default map. Revert.
- default(linux): `ctrl-shift-t` conflict. Move
`project_symbols::Toggle` to `ctrl-t` to match vscode linux. Leave
`pane::ReopenClosedItem` at `ctrl-shift-t` to match vscode/chrome on
linux.
- Fixes #13973
2024-07-09 10:02:21 -04:00
Kirill Bulatov
9b688655a8
Add a way to filter items in the outline panel (#13984)
https://github.com/zed-industries/zed/assets/2690773/145a7cf2-332c-46c9-ab2f-42a77504f54f

Adds a way to filter entries in the outline panel, by showing all
entries (even if their parents were collapsed) that fuzzy match a given
query.

Release Notes:

- Added a way to filter items in the outline panel
2024-07-09 16:44:24 +03:00
Piotr Osiewicz
9a6f30fd95
Snippets: Move snippets into the core of editor (#13937)
Release Notes:

- Move snippet support into core editor experience, marking the official
extension as deprecated. Snippets now show up in any buffer (including
plain text buffers).
2024-07-09 14:02:36 +02:00
Thorsten Ball
b3dad0bfcb
Revert "x11: Differentiate between mouse and keyboard focus #13943" (#13974)
This reverts #13943 and reopens #13897 since the fix in #13943 comes
with a regression:

Sometimes Zed loses keyboard focus and can't be restored. I haven't
figured out yet exactly when and how this happens and can't reliably
reproduce it yet, but there's something off with focus handling.

One reliable way to reproduce _one_ of the problems:

1. Open two zed windows
2. Focus one Zed window
3. Hover with the mouse over the other
4. Try to type in the window that should still be focused

So, to be careful, I'm going to revert the PR first, since I couldn't
find an obvious fix yet. If we do find a fix, we can unrevert.


Release Notes:

- N/A
2024-07-09 11:12:42 +02:00
Aleksei Gusev
18d6be250f
Add keyboard shortcuts for the prompts on Linux (#13915)
This change adds ability to choose any action from prompts, not just the
default one and cancel as Zed has right now. For example, when a user
tries to close a file with edits in it the prompt offers "Don't save"
option that can be selected only with mouse. Now you can use arrows,
tab/shift-tab to pick action and enter/space to confirm it.

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


Release Notes:

- Added keyboard navigation in the prompts on Linux
([#13906](https://github.com/zed-industries/zed/issues/13906)).


Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
2024-07-09 10:50:13 +02:00
killian
5e1c690888
Add Nix/NixOS dev-shell (#13407)
This PR adds a Nix/NixOS development-shell (`shell.nix`), which is based
on the upstream
[nixpkgs](c5d4d45811/pkgs/by-name/ze/zed-editor/package.nix),
as well as its corresponding `flake.nix` file.

To use it, run either the `nix-shell` command (uses the `shell.nix`
file), or the newer but experimental `nix develop` command (uses
`flake.nix`)

~~This has not been tested on macOS, tho preliminary code is there to
try and support it, feel free to report any issues.~~ Zed unfortunately
doesn't build on nix-darwin (see
https://github.com/NixOS/nixpkgs/issues/320084), so this PR doesn't aim
to add darwin support.

---

Release Notes:

- N/A

---------

Signed-off-by: xtrm <oss@xtrm.me>
Co-authored-by: Niklas Korz <niklas@niklaskorz.de>
2024-07-09 09:21:42 +02:00
Matt Fellenz
034d905435
Allow vim counts with undo and redo (#13950)
These were previously passed directly to the editor module, which knows
nothing about vim counts. Instead, implement new actions in the vim
module which take the count and use it to invoke the corresponding
action in the editor module, properly repeated.

Release Notes:

- Fixed vim undo and redo commands not taking counts.
2024-07-08 23:16:52 -06:00
Conrad Irwin
0d7bd0c535
vim: Disable default ctrl-x/ctrl-w on linux (#13966)
Release Notes:

- N/A
2024-07-08 22:36:21 -06:00
Stanislav Alekseev
ed50dea042
Only clear selections when right click was performed outside of selection (#13701)
Release Notes:

- Fixed selections being cleared when right-click was performed outside
of a selection
([#4267](https://github.com/zed-industries/zed/pull/13701)).

<img width="1136" alt="Screenshot 2024-07-01 at 16 53 58"
src="https://github.com/zed-industries/zed/assets/43210583/082bfb0a-c679-4e87-a4e8-7dd751d8f4a2">
2024-07-08 22:07:09 -06:00
Conrad Irwin
5c95d2806b
Ensure people who hit /linux directly have the right instructions (#13959)
Release Notes:

- N/A
2024-07-08 21:43:12 -06:00
Conrad Irwin
05e2e4d929
Send IME-supported key downs (#13964)
Release Notes:

- N/A
2024-07-08 21:37:19 -06:00
Sebastijan Kelnerič
30479bf062
Improve window decorations: check for compositor support (#13822)
Adds the `compositor_support` to the `X11WindowState` struct so that
correct window decorations are selected

Release notes:

- N/A

---------

Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-07-08 20:34:37 -06:00
Conrad Irwin
a40a16ab98
zsh instructions too (#13944)
Release Notes:

- N/A
2024-07-08 20:18:03 -06:00
Conrad Irwin
2e7db8f855
Add mouse handling to gpui input example (#13960)
Release Notes:

- N/A
2024-07-08 20:04:28 -06:00
Conrad Irwin
b0ecda6370
x11 calloop 2 (#13955)
Release Notes:

- N/A

---------

Co-authored-by: Max <max@zed.dev>
2024-07-08 18:38:36 -06:00
Marshall Bowers
efc2336be5
title_bar: Factor out collab-related code into collab module (#13957)
This PR refactors the `TitleBar` component to move all of the
collab-related code into the `collab` module.

This simplifies the top-level `Render` implementation of `TitleBar` by a
lot and makes it easier to read.

Release Notes:

- N/A
2024-07-08 19:43:20 -04:00
Marshall Bowers
9e36a66fec
ui: Add NumericStepper component (#13954)
This PR adds a `NumericStepper` component that can be used to display a
numeric value along with controls to increment, decrement, and reset the
value.

The `ApplicationMenu` has been updated to use the `NumericStepper` for
adjusting the buffer and UI font size.

Here it is in action:


https://github.com/zed-industries/zed/assets/1486634/03cffe67-1256-4283-aa3d-560fffa06dad

Note: Due to the way we do font adjustments, once modified the reset
button will be displayed until it is clicked (or the font size
adjustment is otherwise reset). Simply returning to the original value
will currently not hide the reset button.

Release Notes:

- N/A
2024-07-08 18:45:49 -04:00
Conrad Irwin
97f315356d
Linux docs (#13945)
Release Notes:

- N/A

---------

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-07-08 15:29:28 -07:00