Commit graph

665 commits

Author SHA1 Message Date
Mikayla Maki
9613084f59
Move git status out of Entry (#22224)
Some checks are pending
CI / check_docs_only (push) Waiting to run
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Build Remote Server (push) Blocked by required conditions
CI / (Windows) Run Clippy and tests (push) Blocked by required conditions
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
- [x] Rewrite worktree git handling
- [x] Fix tests
- [x] Fix `test_propagate_statuses_for_repos_under_project`
- [x] Replace `WorkDirectoryEntry` with `WorkDirectory` in
`RepositoryEntry`
- [x] Add a worktree event for capturing git status changes
- [x] Confirm that the local repositories are correctly updating the new
WorkDirectory field
- [x] Implement the git statuses query as a join when pulling entries
out of worktree
- [x] Use this new join to implement the project panel and outline
panel.
- [x] Synchronize git statuses over the wire for collab and remote dev
(use the existing `worktree_repository_statuses` table, adjust as
needed)
- [x] Only send changed statuses to collab

Release Notes:

- N/A

---------

Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.com>
Co-authored-by: Nathan <nathan@zed.dev>
2025-01-04 01:00:16 +00:00
Piotr Osiewicz
b3e36c93b4
deps: Bump indexmap to 2.0 (#22567)
Closes #ISSUE

Release Notes:

- N/A
2025-01-02 12:07:46 +00:00
Danilo Leal
0511768b22
project panel: Use theme token for focused border color (#21593)
Closes https://github.com/zed-industries/zed/issues/12723

This PR makes the border color of a focused project panel item use the
`panel_focused_border` theme token. This allow theme makers to customize
that independently of the `text_accent` color, which was the one being
previously used.

### One Dark

| Before | After |
|--------|--------|
| <img width="800" alt="Screenshot 2024-12-05 at 18 37 00"
src="https://github.com/user-attachments/assets/8b21f1e3-1738-42ab-af30-ad7d589007c1">
| <img width="800" alt="Screenshot 2024-12-05 at 18 39 42"
src="https://github.com/user-attachments/assets/1a424765-a1b6-48eb-ae75-1ffba2b59da3">
|
| <img width="800" alt="Screenshot 2024-12-05 at 18 37 08"
src="https://github.com/user-attachments/assets/d1955cf2-e194-46a5-9518-dc3af7f70cfe">
| <img width="800" alt="Screenshot 2024-12-05 at 18 39 51"
src="https://github.com/user-attachments/assets/99413075-f021-4961-8f03-ad1b40503ea6">
|

### Gruvbox Hard

| Before | After |
|--------|--------|
| <img width="800" alt="Screenshot 2024-12-05 at 18 38 05"
src="https://github.com/user-attachments/assets/cf84ce75-ac8a-4cb6-aaab-81e02bfb4835">
| <img width="800" alt="Screenshot 2024-12-05 at 18 40 15"
src="https://github.com/user-attachments/assets/f62b815b-8bed-41d8-85a1-7091d04bfbd2">
|
| <img width="800" alt="Screenshot 2024-12-05 at 18 38 16"
src="https://github.com/user-attachments/assets/fb458fa2-6ce1-4af0-a7a6-83584f3e5ed0">
| <img width="800" alt="Screenshot 2024-12-05 at 18 39 57"
src="https://github.com/user-attachments/assets/8bf44fe6-7090-4ef0-8b56-b8aa2e1f314d">
|

Release Notes:

- N/A
2024-12-05 19:17:26 -03:00
Nate Butler
a35b73e63e Revert "remove usages of theme::color_alpha"
This reverts commit c0d11be75f.
2024-11-19 00:24:48 -05:00
Nate Butler
c0d11be75f remove usages of theme::color_alpha 2024-11-19 00:24:37 -05:00
Danilo Leal
0e7770a9a2
theme: Add color darken function (#20746)
This PR adds a `darken` function that allows to reduce the lightness of
a color by a certain factor. This popped up as I wanted to add hover
styles to tinted-colors buttons.

Release Notes:

- N/A
2024-11-18 12:44:49 -03:00
Marshall Bowers
273173ec8a
Revert "theme: Turn ThemeRegistry into a trait (#20076)" (#20094)
This PR reverts #20076 to turn the `ThemeRegistry` back into a regular
struct again.

It doesn't actually help us by having it behind a trait.

Release Notes:

- N/A
2024-11-01 15:34:20 -04:00
Marshall Bowers
a960344301
theme: Remove unused staff parameter for listing themes (#20077)
This PR removes the `staff` parameter for listing themes, as it was not
used.

Release Notes:

- N/A
2024-11-01 10:54:21 -04:00
Marshall Bowers
af9e7f1f96
theme: Turn ThemeRegistry into a trait (#20076)
This PR converts the `ThemeRegistry` type into a trait instead of a
concrete implementation.

This allows for the extension store to depend on an abstraction rather
than the concrete theme registry implementation.

We currently have two `ThemeRegistry` implementations:

- `RealThemeRegistry` — this was previously the `ThemeRegistry` and
contains the real implementation of the registry.
- `VoidThemeRegistry` — a null object that doesn't have any behavior.

Release Notes:

- N/A
2024-11-01 10:19:09 -04:00
Nate Butler
a347c4def7
Add theme preview (#20039)
Some checks are pending
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Linux) Build Remote Server (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
This PR adds a theme preview tab to help get an at a glance overview of
the styles in a theme.

![CleanShot 2024-10-31 at 11 27
18@2x](https://github.com/user-attachments/assets/798e97cf-9f80-4994-b2fd-ac1dcd58e4d9)

You can open it using `debug: open theme preview`.

The next major theme preview PR will move this into it's own crate, as
it will grow substantially as we add content.

Next for theme preview:

- Update layout to two columns, with controls on the right for selecting
theme, layer/elevation-index, etc.
- Cover more UI elements in preview
- Display theme colors in a more helpful way
- Add syntax & markdown previews


Release Notes:

- Added a way to preview the current theme's styles with the `debug:
open theme preview` command.
2024-10-31 11:40:38 -04:00
Nate Butler
a5f52f0f04
Use theme families to refine user themes (#19936)
This PR changes the way we load user themes into the ThemeRegistry. 

Rather than directly pass a theme family's themes to
`insert_user_themes`, instead we use the new `refine_theme_family ` and
`ThemeFamily::refine_theme`.

This PR should have net zero change to themes today, but sets up
enabling theme variables. We need to do it this way so each theme has
access to it's family when it is refined.

Release Notes:

- N/A
2024-10-29 22:30:58 -04:00
Kirill Bulatov
6de5ace116
Update outline panel representation when a theme is changed (#19747)
Release Notes:

- N/A
2024-10-25 22:04:02 +03:00
Bennet Bo Fenner
4214ed927f
project panel: Add indent guides (#18260)
See #12673



https://github.com/user-attachments/assets/94079afc-a851-4206-9c9b-4fad3542334e



TODO:
- [x] Make active indent guides work for autofolded directories
- [x] Figure out which theme colors to use
- [x] Fix horizontal scrolling
- [x] Make indent guides easier to click
- [x] Fix selected background flashing when hovering over entry/indent
guide
- [x] Docs

Release Notes:

- Added indent guides to the project panel
2024-10-24 13:07:20 +02:00
Mikayla Maki
f944ebc4cb
Add settings to remote servers, use XDG paths on remote, and enable node LSPs (#19176)
Supersedes https://github.com/zed-industries/zed/pull/19166

TODO:
- [x] Update basic zed paths
- [x] update create_state_directory
- [x] Use this with `NodeRuntime`
- [x] Add server settings
- [x] Add an 'open server settings command'
- [x] Make sure it all works


Release Notes:

- Updated the actions `zed::OpenLocalSettings` and `zed::OpenLocalTasks`
to `zed::OpenProjectSettings` and `zed::OpenProjectTasks`.

---------

Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Richard <richard@zed.dev>
2024-10-15 23:32:44 -07:00
Piotr Osiewicz
03c84466c2
chore: Fix some violations of 'needless_pass_by_ref_mut' lint (#18795)
Some checks are pending
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
While this lint is allow-by-default, it seems pretty useful to get rid
of mutable borrows when they're not needed.

Closes #ISSUE

Release Notes:

- N/A
2024-10-07 01:29:58 +02:00
Nate Butler
8c95b8d89a
theme crate spring cleaning (#18695)
This PR does some spring cleaning on the `theme` crate:

- Removed two unused stories and the story dep
- Removed the `one` theme family (from the `theme` crate, not the app),
this is now `zed_default_themes`.
- This will hopefully remove some confusion caused by this theme we
started in rust but didn't end up using
- Removed `theme::prelude` (it just re-exported scale colors, which we
don't use outside `theme`)
- Removed completely unused `zed_pro` themes (we started on these during
the gpui2 port and didn't finish them.)

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-10-03 13:17:31 -04:00
Nate Butler
773ad6bfd1
Document the theme crate (#18690)
This PR enables required documentation for the `theme` crate starts on
documenting it.

The end goal is to have all meaningful documentation in the crate filled
out – However I'm not sure that just adding `#![deny(missing_docs)]` to
the whole crate is the right approach.

I don't know that having 200+ "The color of the _ color" field docs is
useful however–In the short term I've excluded some of the modules that
contain structs with a ton of fields (`colors, `status`, etc.) until we
decide what the right solution here is.

Next steps are to clean up the crate, removing unused modules or those
with low usage in favor of other approaches.

Changes in this PR:
- Enable the `deny(missing_docs)` lint for the `theme` crate 
- Start documenting a subset of the crate.
- Enable `#![allow(missing_docs)]` for some modules.


Release Notes:

- N/A
2024-10-03 10:27:19 -04:00
Junkui Zhang
9b148f3dcc
Limit the value can be set for font weight (#18594)
Some checks are pending
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Closes #18531



This PR limits the range of values that can be set for `FontWeight`.
Since any value less than 1.0 or greater than 999.9 causes Zed to crash
on Windows, I’ve restricted `FontWeight` to this range.

I could apply this constraint only on Windows, but considering the
documentation at https://zed.dev/docs/configuring-zed#buffer-font-weight
indicates that `FontWeight` should be between 100 and 900, I thought it
might be a good idea to apply this restriction in the settings.


Release Notes:

- Changed `ui_font_weight` and `buffer_font_weight` settings to require
values to be between `100` and `950` (inclusive).

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-10-01 13:32:31 -04:00
thataboy
11058765be
Add ability to separately set background color for highlighted brackets (#17566)
Closes https://github.com/zed-industries/zed/issues/16380

Currently brackets are highlighted with
`editor.document_highlight.read_background`. This commit adds a separate
`editor.document_highlight.bracket_background` theme setting so bracket
highlights can be made more prominent without doing the same to other
highlights, making the display too busy.

(My own theme)


https://github.com/user-attachments/assets/29a8c05e-2f1a-4c16-9be8-a4b4cb143548

I set defaults for light and dark theme that I hope are sensible and not
too obnoxious, but noticeable so people can change it if they don't like
it.

Release Notes:

- Added `editor.document_highlight.bracket_background` field to the
theme to set background color of highlighted brackets.
- This will fall back to `editor.document_highlight.read_background`, if
not set.

<img width="355" alt="Screenshot 2024-09-08 at 8 46 57 AM"
src="https://github.com/user-attachments/assets/3270bb4d-19f5-4b34-8003-982377b2ceb6">
<img width="444" alt="Screenshot 2024-09-08 at 9 03 27 AM"
src="https://github.com/user-attachments/assets/3b12d84d-913c-4bde-9132-9b10f4a8d49b">

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-09-26 12:48:23 -04:00
Marshall Bowers
ac5c35b3df
theme: Fix casing of "ANSI" in doc comments (#17952)
This PR fixes the casing of "ANSI" in some doc comments after #17611.

Release Notes:

- N/A
2024-09-17 13:26:34 -04:00
Albert Marashi
0070635b4d
Styling option for separating terminal view background from background color (#17611)
Closes #17313

Release Notes:

- Added theme styling option to separate terminal background view from
terminal background color, for transparent terminal backgrounds
2024-09-17 12:51:31 -04:00
Galen Elias
7d97855ed7
Use AppContext for UI font adjustments (#17858)
Appologies if this PR is off base, I'm still not super familiar with the
Zed codebase.

I was trying to integrate with
https://github.com/zed-industries/zed/pull/12940 
and found it awkward to hook up global bindings to adjust the UI font
size due to the fact it takes a WindowContext. Looking at the API, it
seemed odd that it took a WindowContext, yet the editor font methods
take an AppContext.

I couldn't find a compelling reason for this to be tied to a
WindowContext, so I personally think it makes sense to switch it.

This does have a behavior change, which hopefully is actually desirable:

Currently, if you have two open and visible Zed windows, and trigger a
UI font adjustment in one, the non-active windows won't update. However,
once you switch focus to the second one it will snap to the new UI font
size. This is inconsistent with adjusting the editor font size, which
applies to all open windows immediately.

Release Notes:

- N/A
2024-09-16 22:23:03 -06:00
Marshall Bowers
4d8c3855c2
theme: Clamp font sizes between 6px and 100px (#17829)
This PR clamps the `ui_font_size` and `buffer_font_size` settings
between 6px and 100px.

Release Notes:

- Changed `ui_font_size` and `buffer_font_size` to require values to be
between 6px and 100px (inclusive).
2024-09-14 15:44:54 -04:00
Piotr Osiewicz
e6c1c51b37
chore: Fix several style lints (#17488)
Some checks are pending
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
It's not comprehensive enough to start linting on `style` group, but
hey, it's a start.

Release Notes:

- N/A
2024-09-06 11:58:39 +02:00
apricotbucket28
a28700a74d
theme: Fallback to opaque color for title_bar.inactive_background (#16833)
Fixes https://github.com/zed-industries/zed/issues/16699, fixes
https://github.com/zed-industries/zed/issues/15112, fixes
https://github.com/zed-industries/zed/issues/14955

| Before | After |
|--------|--------|
|
![image](https://github.com/user-attachments/assets/3c93dc02-3421-4fd8-b34e-c54644202caa)
|
![image](https://github.com/user-attachments/assets/f938d77f-7e9b-4c1f-9beb-38ff77a5fa93)
|

Release Notes:

- Linux: Fixed title bar becoming transparent when the window lost
focus.
2024-08-26 10:26:47 -04:00
张小白
30a677e257
theme: Change autocomplete value for *_font_fallbacks (#16759)
This PR follows up #16466, changes the default value used when
autocompleting the `ui_font_fallbacks` and `ui_font_fallbacks` settings
from `null` to `[]`.

Special thanks to @maxdeviant for the guidance on writing better code!


Release Notes:

- N/A
2024-08-23 12:12:43 -04:00
狐狸
46ecd7d190
Fix typo in theme schema (#16711)
Release Notes:

- N/A
2024-08-22 22:36:00 -04:00
Matthew D. Scholefield
5c0d800b21
Make unnecessary code fade configurable (#14442)
This PR allows configuring the intensity of code fade applied to unused
code (relates to #4785).

_Note: Right now I included it as a top level config which might be a
little out of place (but is easiest to instrument). Open for suggestions
on where else it would be better suited for._

_Note 2: I am unfamiliar with the codebase. Feel free to either close
this PR and re-implement in a better way or suggest high level changes
if I'm approaching anything wrong :)._

Release Notes:

- Added `unnecesary_code_fade` setting to control how strongly to fade
unused code.

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-08-20 13:13:27 -04:00
Marshall Bowers
0bea4d5fa6
theme: Change autocomplete value for ui_font_features and buffer_font_features (#16466)
This PR changes the default value used when autocompleting the
`ui_font_features` and `ui_font_features` settings from `null` to `{}`.

Release Notes:

- N/A
2024-08-19 10:55:25 -04:00
Peter Tripp
eb3c4b0e46
Docs Party 2024 (#15876)
Co-authored-by: Raunak Raj <nkray21111983@gmail.com>
Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
Co-authored-by: Bennet <bennet@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Co-authored-by: Joseph T Lyons <JosephTLyons@gmail.com>
Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Jason <jason@zed.dev>
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Jason Mancuso <7891333+jvmncs@users.noreply.github.com>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2024-08-09 13:37:54 -04:00
Marshall Bowers
5c54596027
theme: Use a non-transparent color for the fallback title_bar.inactive_background (#15709)
This PR changes the fallback color for the
`title_bar.inactive_background` theme property so that the title bar
doesn't just disappear when a theme doesn't have a value set.

You're welcome, @naomieow.

Release Notes:

- linux: Changed the fallback color of `title_bar.inactive_background`
to a non-transparent value.
2024-08-02 18:44:22 -04:00
Marshall Bowers
b8982ad385
Factor out construction of font-related JSON schemas (#15341)
This PR factors out the construction of the font-related JSON schemas,
as they were used in multiple places.

Release Notes:

- N/A
2024-07-27 12:28:50 -04:00
Marshall Bowers
1ffb34c5fc
Fix more instances of JSON schema getting clobbered when attaching references (#15339)
This PR extends the fix from #15336 to more places that had the same
issue.

An `add_references_to_properties` helper function has been added to
handle these cases uniformly.

Release Notes:

- N/A
2024-07-27 11:44:40 -04:00
Marshall Bowers
8b22f09b6f
Don't clobber other schema fields when attaching references (#15336)
This PR fixes an issue where we would clobber the other JSON Schema
fields for any field that we attached a reference to.

This resulted in these fields (e.g., `buffer_font_family`,
`ui_font_family`) losing things like their descriptions.

The approach has been adjusted that references are now added in an
additive fashion, rather than overriding the entire schema object.

Release Notes:

- Fixed an issue where font-related settings in `settings.json` were
missing their descriptions.
2024-07-27 11:08:13 -04:00
Mikayla Maki
a1bd7a1297
Feature/fallback fonts (#15306)
Supersedes https://github.com/zed-industries/zed/pull/12090

fixes #5180
fixes #5055

See original PR for an example of the feature at work.

This PR changes the settings interface to be backwards compatible, and
adds the `ui_font_fallbacks`, `buffer_font_fallbacks`, and
`terminal.font_fallbacks` settings.

Release Notes:

- Added support for font fallbacks via three new settings:
`ui_font_fallbacks`, `buffer_font_fallbacks`, and
`terminal.font_fallbacks`.(#5180, #5055).

---------

Co-authored-by: Junkui Zhang <364772080@qq.com>
2024-07-26 16:42:21 -07:00
Marshall Bowers
659f34bf21
settings_ui: Add UI and buffer font family controls (#15124)
This PR adds settings controls for changing the UI and buffer font
families.

Release Notes:

- N/A
2024-07-24 18:01:35 -04:00
Marshall Bowers
740c444089
settings_ui: Add theme settings controls (#15115)
This PR adds settings controls for the theme settings.

Release Notes:

- N/A
2024-07-24 16:25:52 -04:00
Mikayla Maki
fe3fe945a9
linux: Indicate when the window is focused (#14266)
fixes #14202

Release Notes:

- Added a representation of the current focus state to Zed's window
style ([#14202](https://github.com/zed-industries/zed/issues/14202))
2024-07-12 14:20:58 -07: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
Mikayla Maki
47aa761ca9
Linux window decorations (#13611)
This PR adds support for full client side decorations on X11 and Wayland

TODO:
- [x] Adjust GPUI APIs to expose CSD related information
- [x] Implement remaining CSD features (Resizing, window border, window
shadow)
- [x] Integrate with existing background appearance and window
transparency
- [x] Figure out how to check if the window is tiled on X11
- [x] Implement in Zed
- [x] Repeatedly maximizing and unmaximizing can panic
- [x] Resizing is strangely slow
- [x] X11 resizing and movement doesn't work for this:
https://discord.com/channels/869392257814519848/1204679850208657418/1256816908519604305
- [x] The top corner can clip with current styling
- [x] Pressing titlebar buttons doesn't work
- [x] Not showing maximize / unmaximize buttons
- [x] Noisy transparency logs / surface transparency problem
https://github.com/zed-industries/zed/pull/13611#issuecomment-2201685030
- [x] Strange offsets when dragging the project panel
https://github.com/zed-industries/zed/pull/13611#pullrequestreview-2154606261
- [x] Shadow inset with `_GTK_FRAME_EXTENTS` doesn't respect tiling on
X11 (observe by snapping an X11 window in any direction)

Release Notes:

- N/A

---------

Co-authored-by: conrad <conrad@zed.dev>
Co-authored-by: Owen Law <81528246+someone13574@users.noreply.github.com>
Co-authored-by: apricotbucket28 <71973804+apricotbucket28@users.noreply.github.com>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-07-03 11:28:09 -07:00
Mikayla Maki
6b9ddbfef2
Add more menus to Zed (#12940)
### TODO

- [x] Make sure keybinding shows up in pane + menu
- [x] Selection tool in the editor toolbar
- [x] Application Menu
- [x] Add more options to pane + menu
   - Go to File...
  - Go to Symbol in Project... 
- [x] Add go items to the selection tool in the editor:
   - Go to Symbol in Editor...
   - Go to Line/Column...
   - Next Problem
   - Previous Problem
- [x] Fix a bug where modals opened from a context menu aren't focused
correclty
- [x] Determine if or what needs to be done with project actions:
- Difficulty is that these are exposed in the UI via clicking the
project name in the titlebar or by right clicking the root entry in the
project panel. But they require reading and are two clicks away. Is that
sufficient?
    - Add Folder to Project
    - Open a new project
    - Open recent
 - [x] Get a style pass 
 - [x] Implement style pass
   - [x] Fix the wrong actions in the selection menu
   - [x] Show selection tool toggle in the 'editor settings' thing
- [x] Put preferences section from the app menu onto the right hand user
menu
- [x] Add Project menu into app menu to replace 'preferences' section,
and put the rest of the actions there
- [ ] ~~Adopt `...` convention for opening a surface~~ uncertain what
this convention is.
   - [x] Adopt link styling  for webview actions
   - [x] Set lucide hamburger for menu icon
   - [x] Gate application menu to only show on Linux and Windows




Release Notes:

- Added a 'selection and movement' tool to the Editor's toolbar, as well
as controls to toggle it and a setting to remove it (`"toolbar":
{"selections_menu": true/false }`)
- Changed the behavior of the `+` menu in the tab bar to use standard
actions and keybindings. Replaced 'New Center Terminal' with 'New
Terminal', and 'New Search', with the usual 'Deploy Search'. Also added
item-creating actions to this menu.
- Added an 'application' menu to the titlebar to Linux and Windows
builds of Zed
2024-06-18 12:16:54 -07:00
Marshall Bowers
064bdab459
theme: Warn when deprecated scrollbar_thumb.background style is used (#13081)
Some checks are pending
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
This PR adds a warning when the deprecated `scrollbar_thumb.background`
style property is present in a theme.

This property has been succeeded by `scrollbar.thumb.background`.

The primary reason for this is to get it into the `zed-extension` CLI so
that we can use it to detect which themes need to be updated.

Release Notes:

- N/A
2024-06-15 22:14:39 -04:00
Marshall Bowers
57b87be3a0
Hoist indexmap to workspace level (#12901)
This PR hoists `indexmap` up to a workspace dependency.

Release Notes:

- N/A
2024-06-11 15:31:55 -04:00
Marshall Bowers
8078e58494
Remove unused color crate (#12860)
This PR removes the `color` crate, as it was not used anywhere.

We had added this experimentally, but right now its existence is just a
source of confusion.

Release Notes:

- N/A
2024-06-10 15:35:44 -04:00
Mikayla Maki
5a149b970c
Make tests less noisy (#12463)
Some checks are pending
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
When running the tests for linux, I found a lot of benign errors getting
logged. This PR cuts down some of the noise from unnecessary workspace
serialization and SVG renders

Release Notes:

- N/A
2024-05-29 18:06:45 -07:00
Antonio Scandurra
a0644ac601
Allow specifying a custom limit for /search results (#12423)
Some checks are pending
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
<img width="497" alt="image"
src="https://github.com/zed-industries/zed/assets/482957/94e94326-fb3c-4f9b-b4d9-7dd6f6f8d537">


e.g.

```
/search --9 foobar
```

Release Notes:

- N/A
2024-05-29 14:11:05 +02:00
Danielle Maywood
7969a10643
Support setting custom background color for syntax highlighting (#12400)
Release Notes:

- Added support for `background_color` in `syntax` map in `theme.json`.

This adds support for setting a `background_color` for styles inside the
`syntax` map for themes defined in `theme.json`. The field is optional
so there should be no backwards compatibility issues.

It is worth noting that the current behaviour for selecting text is that
the background colours will mix/blend (I'm not sure the correct term
here). Changing this behaviour, or making it configurable, looks to be a
far more complex issue and I'm not sure I know how to do it.
2024-05-28 19:25:09 -04:00
Nathan Sobo
e19339bc1d
Allow UI font weight to be assigned in settings (#12333)
Release Notes:

- Added the ability to configure the weight of your UI font in standard
CSS weight units from 0 to 900.
2024-05-26 23:06:58 -06:00
Bennet Bo Fenner
feea607bac
Indent guides (#11503)
Builds on top of existing work from #2249, but here's a showcase:


https://github.com/zed-industries/zed/assets/53836821/4b346965-6654-496c-b379-75425d9b493f

TODO:
- [x] handle line wrapping
- [x] implement handling in multibuffer (crashes currently)
- [x] add configuration option
- [x] new theme properties? What colors to use?
- [x] Possibly support indents with different colors or background
colors
- [x] investigate edge cases (e.g. indent guides and folds continue on
empty lines even if the next indent is different)
- [x] add more tests (also test `find_active_indent_index`)
- [x] docs (will do in a follow up PR)
- [x] benchmark performance impact

Release Notes:

- Added indent guides
([#5373](https://github.com/zed-industries/zed/issues/5373))

---------

Co-authored-by: Nate Butler <1714999+iamnbutler@users.noreply.github.com>
Co-authored-by: Remco <djsmits12@gmail.com>
2024-05-23 15:50:59 +02:00
Marshall Bowers
79098671e6
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
2024-05-17 10:54:51 -04:00