Commit Graph
189 Commits
Author SHA1 Message Date
Marshall Bowers 4353bdb9d5 Restore theme sorting in Zed2 (#3563)
This PR restores the sorting of themes in the theme selector in Zed2.

Release Notes:

- N/A
2023-12-08 15:08:35 -05:00
Marshall Bowers 27501d2929 Pull in colors for selected ghost elements 2023-12-08 14:19:56 -05:00
Marshall Bowers 77c8108f9b Use dropdown.background from VS Code for elevated surface background 2023-12-08 14:13:50 -05:00
Marshall Bowers 1c850f495c Use breadcrumb.background from VS Code for toolbar background (#3559)
This PR changes the color we use for the toolbar background from the VS
Code theme to `breadcrumb.background`.

If this value isn't set then we fall back to the `editor.background`.

Release Notes:

- N/A
2023-12-08 14:03:18 -05:00
Marshall Bowers 1d35a815a6 Use editorGroupHeader.tabsBackground from VS Code as tab bar background (#3558)
This PR changes the color we use for the tab bar background from the VS
Code theme to `editorGroupHeader.tabsBackground`.

Release Notes:

- N/A
2023-12-08 13:50:56 -05:00
Marshall Bowers 62155f3a88 Add fallback to constant tokens for numbers 2023-12-08 13:20:00 -05:00
Marshall Bowers ab5b76e943 Pull Git status colors from VS Code themes 2023-12-08 13:14:22 -05:00
Marshall Bowers 52e4c577d2 Re-import Rosé Pine source themes 2023-12-08 11:45:08 -05:00
Marshall Bowers 6f064cfc36 Improve matching for constructor tokens 2023-12-08 11:34:39 -05:00
Marshall Bowers 6634a5e9f6 Improve matching for constant tokens further 2023-12-08 11:23:42 -05:00
Marshall Bowers 1b6721170a Improve matching for constant tokens 2023-12-08 11:21:40 -05:00
Marshall Bowers 63ce7cd407 Improve matching for preprocessor tokens 2023-12-08 11:17:05 -05:00
Marshall Bowers 40a95221ea Improve matching for string tokens 2023-12-08 11:13:28 -05:00
Marshall Bowers a8a5b9524d Improve matching for punctuation tokens 2023-12-08 11:07:52 -05:00
Marshall Bowers 53d77b192a Don't match support.function for function 2023-12-08 10:48:27 -05:00
Marshall Bowers 7a9f764aa0 Add support for theme family-specific syntax mapping overrides (#3551)
This PR adds support for adding a specific set of mappings from Zed
syntax tokens to VS Code scopes for a particular theme family.

We can use this as a fallback when we aren't otherwise able to rely on
the mappings in the theme importer, as sometimes it isn't possible to
make a specific enough matcher that works across all of the themes.

Release Notes:

- N/A
2023-12-07 23:37:49 -05:00
Marshall Bowers efb4ff816a Set tab bar and toolbar backgrounds 2023-12-07 22:32:41 -05:00
Marshall Bowers a88372dc99 Set background colors for title and status bars 2023-12-07 22:24:10 -05:00
Marshall Bowers f272881a6b theme_importer: Improve syntax token matching (#3549)
This PR improves the approach we use to match syntax tokens between Zed
and VS Code in the `theme_importer`.

We now use the list of scopes assigned to each Zed syntax token to rank
the possible candidates in the VS Code and then pick the candidate with
the highest rank.

So far this has proved to provide better colors across the board, but
we'll continue to refine the matching over time.

Release Notes:

- N/A
2023-12-07 22:11:31 -05:00
Marshall Bowers c7e19c0bcd Emit accurate hex colors in generated themes (#3547)
This PR fixes an issues where the hex colors in the generated themes
were not correct.

We're using the [`palette`](https://crates.io/crates/palette) crate to
perform the conversions, as this gives us accurate hex codes that match
the VS Code source themes.

Release Notes:

- N/A
2023-12-07 18:34:03 -05:00
Marshall Bowers fa223e0c6f Pull editor inlay hints from VS Code themes 2023-12-07 15:36:13 -05:00
Nate Butler da3ba35d1c add color_alpha function 2023-12-07 00:15:43 -05:00
Mikayla fd31e429f5 Merge branch 'main' into terminal-element 2023-12-06 15:20:04 -08:00
Max BrunsfeldandNathan 89c8a7c242 Enable buffer font size adjustment in zed2
Co-authored-by: Nathan <nathan@zed.dev>
2023-12-06 13:52:33 -08:00
Kirill Bulatov f76e1cfd91 Pass proper theme colors for inlays and suggestions 2023-12-06 21:48:39 +02:00
Marshall Bowers 8141f4fd86 Format code 2023-12-05 14:17:22 -05:00
Mikayla 8d57d6ca6f Merge branch 'main' into terminal-element 2023-12-05 09:33:46 -08:00
Nate Butler 5bdaf0e074 Work on light theme, update tab 2023-12-04 17:54:37 -05:00
Nate Butler 118c9b5fe8 Ensure disabled buttons don't have interaction styles 2023-12-04 09:37:56 -05:00
Mikayla 6730ff3624 Merge branch 'main' into terminal-element 2023-12-01 16:21:38 -08:00
Mikayla 39887be7d0 WIP: layout compiling 2023-11-30 11:01:36 -08:00
Antonio Scandurra fac029b808 Fix errors in theme2 2023-11-30 12:08:00 +01:00
Mikayla a41c857855 Merge branch 'main' into welcome2 2023-11-28 15:38:51 -08:00
Nate Butler f33cd3d463 Merge branch 'main' into refine-keybindings 2023-11-28 14:00:09 -05:00
Mikayla 8faa1f6e58 Merge branch 'main' into welcome 2023-11-27 18:55:23 -08:00
Nate Butler c40ab3c3da Update theme2.rs 2023-11-27 09:11:51 -05:00
Nate Butler 48a9f2be4c Update one theme colors 2023-11-24 16:57:35 -05:00
Mikayla 663bbb06d9 WIP 2023-11-21 12:40:00 -08:00
Marshall BowersandNate Butler 1b05aad30c Extract Story into separate story crate (#3378)
This PR extracts the `Story` component into a separate `story` crate so
that it can be shared among various crates that define stories.

Release Notes:

- N/A

---------

Co-authored-by: Nate Butler <iamnbutler@gmail.com>
2023-11-21 13:42:00 -05:00
Marshall Bowers 6cd0bcc578 Fix panic when opening settings in zed2 (#3375)
This PR fixes a panic that occurs when opening the settings in zed2.

We store the `ThemeRegistry` as a global without wrapping it in an
`Arc`, so we need to retrieve it the same way.

Release Notes:

- N/A
2023-11-21 10:58:52 -05:00
2c4d83c9af WIP
co-authored-by: conrad <conrad@zed.dev>
co-authored-by: Nathan <nathan@zed.dev>
2023-11-20 14:46:01 -08:00
Conrad Irwin 0798cfd58c Merge branch 'main' into derive-element-redux 2023-11-20 09:15:38 -07:00
Nate Butler 176a68f90f kb 2023-11-20 10:46:23 -05:00
Nathan Sobo adc355a1e6 Element refinement passing on ui2 2023-11-18 20:05:47 -07:00
Nathan Sobo 23ffce9fbe WIP: Work toward eliminating Component trait
This refactor enhances the overall design by promoting reusable and composable UI component structures within the Zed project codebase.
2023-11-18 00:03:23 -07:00
Julia 3655a96e54 Merge branch 'main' into unborked-git-zed2-diagnostics-view 2023-11-17 16:32:35 -05:00
Julia c6d22af416 Get diagnostic2 tests building and running 2023-11-17 16:32:35 -05:00
Nate Butler a526f23c81 Add ui_font settings and set default rem size accordingly (#3346)
[[PR Description]]
- Adds ui_font_family, ui_font_features, ui_font_size to settings and
default settings
- Use the new ui font settings to set the rem size when the workspace is
created.

Release Notes:

- N/A
2023-11-16 15:40:33 -05:00
Marshall Bowers b559bfd80f Parameterize theme2::init to allow loading just the base theme (#3345)
This PR adds a parameter to the `theme2::init` method to indicate what
the theme-loading behavior should be.

This allows us to indicate when we want to load all of the additional
built-in user themes (like in the Zed binary and in the storybook), and
when we don't want to load the user themes (like in tests).

We're using an enum over just a `bool` here for clarity at the call
site.

Release Notes:

- N/A
2023-11-16 13:03:30 -05:00
Nate ButlerandMarshall Bowers c71e522b4e Allow users to set UI font properties in their settings
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-11-16 11:37:46 -05:00