Commit graph

747 commits

Author SHA1 Message Date
Randa Zraik
a01d2dd798
file_icons: Add separate icon keys for .NET solution and project files (#24851)
Add separate icon keys for .NET solution and project files.

Release Notes:

- Icon themes: Added the ability to change file icons for Visual Studio
project files:
  - Solution files (`.sln`)
  - Solution User Options files (`.suo`)
  - C# Project files (`.csproj`)
  - F# Project files (`.fsproj`)
  - Visual Basic Project files (`.vbproj`)

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-02-14 18:19:22 -05:00
Kirill Bulatov
bd105a5fc7
Continue improving font adjustment settings (#24908)
Follow-up of https://github.com/zed-industries/zed/pull/24857

Based on the feedback,

* made non-persisting font size change as a default in Zed keymaps
JetBrains IDEs seem to persist font size changes by default, hence left
to do so in Zed keymaps too

* fixed a bug with holding a binding to change the font size caused
flickering

Release Notes:

- N/A
2025-02-14 21:00:56 +00:00
Margret Riegert
3040ef416a
file_icons: Add icon key for Crystal and ECR files (#24903)
Release Notes:

- Icon themes: Added the ability to change the file icon for Crystal
(`.cr`, `.ecr`) files.

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-02-14 15:27:43 -05:00
Sanjeev Shrestha
79ee01eb14
theme: Fix icon theme switching changing the theme (#24849)
Closes #24846 

Release Notes:

- Fixed an issue where changing the icon theme would change the theme.
2025-02-14 08:14:00 -05:00
Kirill Bulatov
3b91de8003
Adds a way to toggle font size without settings adjustments (#24857)
Closes https://github.com/zed-industries/zed/issues/23505

Now `zed::IncreaseBufferFontSize` (and all the same UI- and
Buffer-related settings) action is parameterized with `{ "persist": true
}` (default).
Using `"persist": false` brings back resizing behavior prior to
https://github.com/zed-industries/zed/pull/23265


Release Notes:

- Added a way to toggle font size without settings adjustments
2025-02-14 13:27:48 +02:00
Nate Butler
8c202b3b09
editor: Update git hunk indicators to show staging status when hunk is expanded (#24818)
- Update git hunk indicators to show staging status when hunk is
expanded
- Updates uses of status colors to the new version control theme colors
- Adds new version control theme colors to included themes

Before:

![CleanShot 2025-02-13 at 14 42
48@2x](https://github.com/user-attachments/assets/ccca147e-0de2-4e69-9cd4-01b010bf06d0)

After:

![CleanShot 2025-02-13 at 14 42
04@2x](https://github.com/user-attachments/assets/1ab49174-bde5-43b2-83c5-d217533df49a)

(Colors here are from before theme colors were added)


Release Notes:

- N/A *or* Added/Fixed/Improved ...

---------

Co-authored-by: cole-miller <m@cole-miller.net>
2025-02-13 20:12:23 +00:00
Michal Vrbata
7ba1492f0a
file_icons: Add separate icon key for Bicep files (#24757)
This PR adds support for bicep file icon:

Release Notes:

- Icon themes: Added the ability to change the file icon for Bicep
(`.bicep`) files.
2025-02-13 00:36:27 +00:00
Sanjeev Shrestha
1ce6e8d0e3
file_icons: Use separate keys for C#, Cue, GitLab YAML, Luau, and Solidity (#24711)
This PR updates the file icon mappings such that:

- C# (`.cs`) files map to the `csharp` key
- Cue (`.cue`) files map to the `cue` key
- GitLab YAML (`gitlab-ci.yml`) files map to the `gitlab` key
- Luau (`.luau`) files map to the `luau` key
- Solidity (`.sol`) files map to the `solidity` key

Release Notes:

- Icon themes: Added the ability to change the file icon for C# (`.cs`)
files.
- Icon themes: Added the ability to change the file icon for Cue
(`.cue`) files.
- Icon themes: Added the ability to change the file icon for GitLab YAML
(`gitlab-ci.yml`) files.
- Icon themes: Added the ability to change the file icon for Luau
(`.luau`) files.
- Icon themes: Added the ability to change the file icon for Solidity
(`.sol`) files.

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-02-12 14:25:01 +00:00
Marshall Bowers
cc931a8fcc
theme: Add support for setting light/dark icon themes (#24702)
This PR adds support for configuring both a light and dark icon theme in
`settings.json`.

In addition to accepting just an icon theme name, the `icon_theme` field
now also accepts an object in the following form:

```jsonc
{
  "icon_theme": {
    "mode": "system",
    "light": "Zed (Default)",
    "dark": "Zed (Default)"
  }
}
```

Both `light` and `dark` are required, and indicate which icon theme
should be used when the system is in light mode and dark mode,
respectively.

The `mode` field is optional and indicates which icon theme should be
used:
- `"system"` - Use the icon theme that corresponds to the system's
appearance.
- `"light"` - Use the icon theme indicated by the `light` field.
- `"dark"` - Use the icon theme indicated by the `dark` field.

Closes https://github.com/zed-industries/zed/issues/24695.

Release Notes:

- Added support for configuring both a light and dark icon theme and
switching between them based on system preference.
2025-02-11 23:45:37 +00:00
Cameron Radmore
b395beaf93
file_icons: Add Stylelint file icon associations (#24605)
This PR adds file associations for stylelint files.

This is how it looks like in Zed (the icon doesn't exist):
![default javascript file icon is shown for
stylelint.config.js](https://github.com/user-attachments/assets/a873d7fc-1b8a-4a9c-8e92-1be56d5b01b1)

In a dev version of an icon theme it looks like this (icon sourced from:
https://github.com/vscode-icons/vscode-icons/blob/master/icons/file_type_stylelint.svg
):
![stylelint file icon is shown for
stylelint.config.js](https://github.com/user-attachments/assets/ddbb068d-7986-43de-94f8-9c844cb6b96f)

Release Notes:

- Icon themes: Added Stylelint file icon associations.

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-02-11 16:42:54 +00:00
Marshall Bowers
5778e1e6f0
theme: Fix Svelte file icon (#24650)
This PR fixes the file icon used for Svelte files in the default icon
theme, as I used the wrong icon name in #24644.

Release Notes:

- N/A
2025-02-11 14:09:03 +00:00
Marshall Bowers
c61f2dff47
file_icons: Use a separate icon key for Markdown files (#24648)
This PR updates the file icon mappings such that Markdown (`.md`,
`.markdown`) files map to the `markdown` key.

Release Notes:

- Icon themes: Added the ability to change the file icon for Markdown
(`.md`, `.markdown`) files.
2025-02-11 13:58:53 +00:00
Marshall Bowers
6a40a400bd
file_icons: Use a separate icon key for Svelte files (#24644)
This PR updates the file icon mappings such that Svelte (`.svelte`)
files map to the `svelte` key.

Release Notes:

- Icon themes: Added the ability to change the file icon for Svelte
(`.svelte`) files.
2025-02-11 13:22:23 +00:00
Finn Evers
144487bf1a
theme: Implement icon theme reloading (#24449)
Closes #24353 

This PR implements icon theme reload to ensure file icons are properly
updated whenever an icon theme extension is upgraded or uninstalled.

Currently, on both upgrade and uninstall of an icon theme extension the
file icons from the previously installed version will stay visibile and
will not be updated as shown in the linked issue. With this change, file
icons will properly be updated on extension upgrade or reinstall.

The code is primarily a copy for reloading the current color theme
adapted to work for icon themes. Happy for any feedback!


Release Notes:

- Fixed file icons not being properly updated upon icon theme upgrade or
uninstall.
2025-02-07 11:30:53 -05:00
Sanjeev Shrestha
c7cd5b019b
file_icons: Use separate icon key for JSON files (#24432)
This PR updates the file icon mappings for JSON (`.json`) file map to
the`json` key. Also, updates `.json` icon from `storage` to `code`.

This allows for the JSON file icons to be replaced in icon themes.

Release Notes:

- Icon themes: Added the ability to change the file icon for JSON
(`.json`) files.

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
2025-02-07 16:14:26 +00:00
Marshall Bowers
d81a4ec7ec
file_icons: Use a separate icon key for HTML files (#24323)
This PR updates the file icon mappings such that HTML (`.html` and
`.htm`) files map to the `html` key.

This allows for the HTML file icons to be replaced in icon themes.

Release Notes:

- Icon themes: Added the ability to change the file icon for HTML
(`.html`, `.htm`) files.
2025-02-05 18:35:27 -05:00
Max Brunsfeld
13b7be12bd
themes: Make background colors partly transparent by default (#24151)
Certain themes define the `created` and `deleted` status colors, but not
`created_background` and `deleted_background`. Previously, Zed would use
`created` and `deleted` colors, and apply a hard-coded opacity change,
but *not* use `created_background` and `deleted_background`, but that
behavior was inadvertently changed in
https://github.com/zed-industries/zed/pull/22994.

This PR restores the old behavior as a fallback. If a theme defines a
status color, but not the corresponding background color, we'll use a
75% transparent version of the foreground color as a fallback.

Release Notes:

- Fixed an issue in certain themes where diffs would render with the
wrong red and green colors for deletions and insertions.
2025-02-03 22:38:14 +00:00
João Marcos
5bd7eaa173
Solve 50+ cargo doc warnings (#24071)
Release Notes:

- N/A
2025-02-01 06:19:29 +00:00
Marshall Bowers
419780d702
Add support for icon themes (#23987)
This PR adds support for icon themes.

Closes https://github.com/zed-industries/zed/issues/8843.

Here is Zed with Material Icons:

<img width="1136" alt="Screenshot 2025-01-30 at 7 02 06 PM"
src="https://github.com/user-attachments/assets/57d8a0e0-ff38-44d9-8628-af58a60a7c9a"
/>

### Extensions

Extensions can provide icon themes as well as the icons used in those
themes.

Icon themes are defined as JSON files in the `icon_themes` directory,
and icons included in the `icons` directory will be packaged up with the
extension.

All icon paths within an icon theme are interpreted relative to the root
of the extension.

See the [Material Icon
Theme](https://github.com/zed-extensions/material-icon-theme) extension
for an example.

Release Notes:

- Added support for icon themes.
  - Extensions can now provide icon themes.
- Use the `icon theme selector: toggle` action to switch between
installed icon themes.
2025-01-30 19:08:31 -05:00
Marshall Bowers
2c950cf7f5
theme: Properly resolve directory and chevron icons from icon themes (#23984)
This PR fixes an issue where we weren't properly resolving directory and
chevron icons from icon themes the way we were for file icons.

We need to interpret the icon paths as relative to the extension
directory.

Release Notes:

- N/A
2025-01-30 22:34:29 +00:00
Marshall Bowers
7adf9cb1a0
Add icon theme selector (#23976)
This PR adds an icon theme selector for switching between icon themes:


https://github.com/user-attachments/assets/2cdc7ab7-d9f4-4968-a2e9-724e8ad4ef4d

Release Notes:

- N/A
2025-01-30 16:11:42 -05:00
Nathan Sobo
6fca1d2b0b
Eliminate GPUI View, ViewContext, and WindowContext types (#22632)
There's still a bit more work to do on this, but this PR is compiling
(with warnings) after eliminating the key types. When the tasks below
are complete, this will be the new narrative for GPUI:

- `Entity<T>` - This replaces `View<T>`/`Model<T>`. It represents a unit
of state, and if `T` implements `Render`, then `Entity<T>` implements
`Element`.
- `&mut App` This replaces `AppContext` and represents the app.
- `&mut Context<T>` This replaces `ModelContext` and derefs to `App`. It
is provided by the framework when updating an entity.
- `&mut Window` Broken out of `&mut WindowContext` which no longer
exists. Every method that once took `&mut WindowContext` now takes `&mut
Window, &mut App` and every method that took `&mut ViewContext<T>` now
takes `&mut Window, &mut Context<T>`

Not pictured here are the two other failed attempts. It's been quite a
month!

Tasks:

- [x] Remove `View`, `ViewContext`, `WindowContext` and thread through
`Window`
- [x] [@cole-miller @mikayla-maki] Redraw window when entities change
- [x] [@cole-miller @mikayla-maki] Get examples and Zed running
- [x] [@cole-miller @mikayla-maki] Fix Zed rendering
- [x] [@mikayla-maki] Fix todo! macros and comments
- [x] Fix a bug where the editor would not be redrawn because of view
caching
- [x] remove publicness window.notify() and replace with
`AppContext::notify`
- [x] remove `observe_new_window_models`, replace with
`observe_new_models` with an optional window
- [x] Fix a bug where the project panel would not be redrawn because of
the wrong refresh() call being used
- [x] Fix the tests
- [x] Fix warnings by eliminating `Window` params or using `_`
- [x] Fix conflicts
- [x] Simplify generic code where possible
- [x] Rename types
- [ ] Update docs

### issues post merge

- [x] Issues switching between normal and insert mode
- [x] Assistant re-rendering failure
- [x] Vim test failures
- [x] Mac build issue



Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Joseph <joseph@zed.dev>
Co-authored-by: max <max@zed.dev>
Co-authored-by: Michael Sloan <michael@zed.dev>
Co-authored-by: Mikayla Maki <mikaylamaki@Mikaylas-MacBook-Pro.local>
Co-authored-by: Mikayla <mikayla.c.maki@gmail.com>
Co-authored-by: joão <joao@zed.dev>
2025-01-26 03:02:45 +00:00
Nate Butler
f9e354ee9b
theme: Add version control colors (#23529)
This PR adds version control-specific theme tokens to the them to allow
styling entries in the git ui and elsewhere.

Release Notes:

- N/A
2025-01-23 07:56:49 -05:00
Danilo Leal
d011b97830
project_panel: Adjust entry background and border colors (#23403)
Follow up to https://github.com/zed-industries/zed/pull/22658

This PR ensures the background and border color of a project panel entry
is exactly the same with one exception: if the item is focused, active,
and not with mouse down. The point is to not be able to see the border
at all given they're there to act sort of akin to CSS's `outline` (which
doesn't add up to the box model).

Please let me know if there is any edge case I either messed up here or
didn't account for.


https://github.com/user-attachments/assets/29c74f6a-b027-4d19-a7de-b9614f0d7859

Release Notes:

- N/A
2025-01-21 11:13:46 -03:00
Piotr Osiewicz
c9534e8025
chore: Use workspace fields for edition and publish (#23291)
This prepares us for an upcoming bump to Rust 2024 edition.

Release Notes:

- N/A
2025-01-17 17:39:22 +01:00
Danilo Leal
da1c3d8b40
Add hover_line_number color token (#23279)
This enables having a dedicated color for the line number hover state.
That's relevant because line numbers can now be clicked to jump to
cursor location in multibuffers.

Release Notes:

- N/A

---------

Co-authored-by: João Marcos <marcospb19@hotmail.com>
2025-01-17 09:24:42 -03:00
Piotr Osiewicz
795376cb07
ui: Track changes to UI font size made via actions with settings (#23265)
Fixes #5380

Closes #5380

Release Notes:

- Font size changes made with actions are now persisted in user settings
2025-01-16 23:28:18 +00:00
Marshall Bowers
f53915c711
Add infrastructure for loading icon themes from extensions (#23203)
This PR adds the supporting infrastructure to support loading icon
themes defined by extensions.

Here's an example icon theme:

```json
{
  "name": "My Icon Theme",
  "author": "Me <me@example.com>",
  "themes": [
    {
      "name": "My Icon Theme",
      "appearance": "dark",
      "file_icons": {
        "gleam": { "path": "./icons/file_type_gleam.svg" },
        "toml": { "path": "./icons/file_type_toml.svg" }
      }
    }
  ]
}
```

The icon paths are resolved relative to the root of the extension
directory.

Release Notes:

- N/A
2025-01-15 23:33:47 +00:00
Marshall Bowers
a8526d9143
file_icons: Fall back to the default icon theme for icons (#23196)
This PR updates the various `FileIcons` methods to fall back to the
default icon theme if the active icon theme does not have the desired
icon.

Release Notes:

- N/A
2025-01-15 22:06:20 +00:00
Marshall Bowers
167c564509
theme: Pull directory and chevron icons out of IconTheme::file_icons (#23155)
This PR pulls the directory and chevron icons out of the
`IconTheme::file_icons` collection and promotes them to named fields.

This makes things less stringly-typed when looking up these icons.

Release Notes:

- N/A
2025-01-14 23:53:38 +00:00
Marshall Bowers
88e42cc7aa
Refactor file icons to use IconTheme (#23153)
This PR adds the initial concept of an `IconTheme` and refactors
`FileIcons` to use it to resolve the icons.

The `IconTheme` will ultimately be used to allow users to select a
different set of icons to use. Currently, however, this is just laying
the foundation for that work.

The association between file types and icons is now handled by the icon
theme when we resolve file icons. This mapping has been moved out of
`file_types.json` and into `icon_theme.rs`.

Release Notes:

- N/A
2025-01-14 22:49:36 +00:00
Marshall Bowers
ac2d3eec91
Remove commented-out code (#23089)
This PR removes some commented-out code from the codebase.

Release Notes:

- N/A
2025-01-13 21:02:45 +00:00
Mikayla Maki
9613084f59
Move git status out of Entry (#22224)
- [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)
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)
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)
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