Commit log

a73265a Merge branch 'main' into command_palette2

Conrad Irwin created

77d92ff Tidy up

Conrad Irwin created

b9e098e Start work on creating gpui2 version of project panel

Max Brunsfeld created

cb8c534 theme_importer: Support importing themes containing comments (#3298)

Click to expand commit body
This PR updates the `theme_importer` with support for parsing theme
files containing comments.

Up until now we've been manually removing comments from the VS Code
theme files.

Release Notes:

- N/A

Marshall Bowers created

6bc1cf0 Re-import the Synthwave 84 theme (#3297)

Click to expand commit body
This PR re-imports the Synthwave 84 theme now that we support 3-value
hex colors.

Release Notes:

- N/A

Marshall Bowers created

6f23894 Fix editor settings deserialization in editor2

Max Brunsfeld created

ff15ddf Render more than one item

Conrad Irwin created

8bd02fd Extend RGBA hex color parsing to support 3-value and 4-value variants (#3295)

Click to expand commit body
This PR extends our support for parsing hex color codes to `Rgba` to
additionally support 3-value (`#rgb`) and 4-value (`#rgba`) formats.

See [here](https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color)
for more details on these hex color variants.

Release Notes:

- N/A

Marshall Bowers created

82861e3 Improve digit duplication

Marshall Bowers created

8f5adeb Improve error conditions when parsing hex colors

Marshall Bowers created

417279e Add support for parsing 3-value and 4-value hex codes

Marshall Bowers created

2347576 Extend theme converter to allow multimatching against vscode colors (#3294)

Click to expand commit body
[[PR Description]]

Adds the ability to specify a vec of VScode syntax scopes to match
against for a given syntax style.

Example:

```rust
pub fn to_vscode(&self) -> Vec<&'static str> {
        use ZedSyntaxToken::*;

        match self {
            SyntaxAttribute => vec!["entity.other.attribute-name"],
            SyntaxBoolean => vec!["constant.language"],
            SyntaxComment => vec!["comment"],
            SyntaxCommentDoc => vec!["comment.block.documentation"],
            SyntaxConstant => vec!["constant.character"],
            SyntaxConstructor => vec!["entity.name.function.definition.special.constructor"],
            SyntaxEmbedded => vec!["meta.embedded"],
            SyntaxEmphasis => vec!["markup.italic"],
            SyntaxEmphasisStrong => vec![
                "markup.bold",
                "markup.italic markup.bold",
                "markup.bold markup.italic",
            ],
            SyntaxEnum => vec!["support.type.enum"],
            SyntaxFunction => vec![
                "entity.name.function",
                "variable.function",
                "support.function",
            ],
            SyntaxKeyword => vec!["keyword"],
            SyntaxLabel => vec![
                "label",
                "entity.name",
                "entity.name.import",
                "entity.name.package",
            ],
            // .. more styles
}}
```

Useful `settings.json` for testing themes:

```json5
{
  // --- Dark Themes ---
  "theme": "Ayu Dark"
  // "theme": "Ayu Mirage"
  // "theme": "Dracula"
  // "theme": "Gruvbox Dark Hard"
  // "theme": "Gruvbox Dark Medium"
  // "theme": "Gruvbox Dark Soft"
  // "theme": "Night Owl"
  // "theme": "Noctis Obscuro"
  // "theme": "Noctis"
  // "theme": "Nord"
  // "theme": "Palenight (Mild Contrast)"
  // "theme": "Palenight Operator"
  // "theme": "Palenight"
  // "theme": "Rose Pine Moon"
  // "theme": "Rose Pine"
  // "theme": "Solarized Dark"
  // "theme": "Synthwave 84"
  // --- Light Themes ---
  // "theme": "Ayu Light"
  // "theme": "Gruvbox Light Hard"
  // "theme": "Gruvbox Light Medium"
  // "theme": "Gruvbox Light Soft"
  // "theme": "Noctis Lux"
  // "theme": "Rose Pine Dawn"
  // "theme": "Solarized Light"
}
```

Release Notes:

- N/A

Nate Butler created

7586ef1 Refine search query suggestions (#3293)

Click to expand commit body
This PR fixes some issues in response to feedback from Dan Abramov and
Jose Valim.

To do:

* [x] fix non-word search suggestions
* [x] add setting for disabling search suggestions

Release Notes:

- Fixed an issue where opening a search without text selected would
populate the search query with non-word characters adjacent to the
cursor.
- Added a setting, `seed_search_query_from_cursor`, which controls
whether the search query is automatically populated from the buffer when
starting a new buffer search or project search.

By default, the search query will always be set to the word under the
cursor. If you want to only populate the search query when text is
selected, you can add the following to your `~/.zed/settings.json`:
  
  ```json
  {
    "seed_search_query_from_cursor": "selection"
  }
  ```

If you don't want the search query to be automatically populated, even
when there is text selected, add the following:
  
  ```json
  {
    "seed_search_query_from_cursor": "never"
  }
  ```

Max Brunsfeld created

b6eef26 Merge branch 'main' into search-query-suggestion-fixes

Max Brunsfeld created

fa153a0 Make command dispatching work

Conrad Irwin created

6b8ce3c Add a setting for when to seed the search query from the text under the cursor

Max Brunsfeld created

6b65aca regenerate themes, format

Nate Butler created

00b298a Fix incorrect `Rose Pine Dawn` theme name

Nate Butler created

024fb4f Remove unused import

Nate Butler created

4cd37e6 Extend theme converter to allow multimatching against vscode colors

Nate Butler created

28d3d21 Generalize Refineable derive macro to derive arbitrary traits on the refinement type

Max Brunsfeld created

dba41e9 Avoid suggesting search query if cursor is not on a word

Max Brunsfeld created

31a6409 Refine theme styles (#3291)

Click to expand commit body
This PR refines a number of styles in the default theme, as well as
updates the theme importer to support importing syntax styles from VS
Code themes.

Release Notes:

- N/A

Marshall Bowers created

7b489f5 Allow user-theme related methods to be unused

Marshall Bowers created

408a495 Call init

Nathan Sobo created

1c6a960 Deal with special case where a VSCode theme doesn't have a `foreground` color

Click to expand commit body
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>

Nate Butler and Marshall Bowers created

54157eb Finish passing Syntax from VSCode themes to Zed Themes

Click to expand commit body
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>

Nate Butler and Marshall Bowers created

c6b76d9 Use normal JS comments within JSX tags and JSX expression blocks (#3290)

Click to expand commit body
This fix only required changing the `overrides` queries for JavaScript
and TSX. I've made the fix in both the `zed2` and `zed` crates.

Release Notes:

- Fixed an issue in JavaScript and TSX files, where the 'toggle
comments' command used the wrong comment syntax inside of JSX tags and
expressions within JSX.

Max Brunsfeld created

e50318e Duplicate buffer test changes in language2 version

Max Brunsfeld created

4c89b28 Use normal JS comments within JSX tags and JSX expression blocks

Click to expand commit body
Co-authored-by: Kirill <kirill@zed.dev>

Max Brunsfeld and Kirill created

f5f9d88 Polish actions macros

Nathan Sobo created

ff05389 Extend UserSyntax to allow font_style and font_weight to be specified

Click to expand commit body
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>

Nate Butler and Marshall Bowers created

72de5cb Fix escape in GoToLine with new event emitter (#3289)

Click to expand commit body
[[PR Description]]

Release Notes:

- N/A

Conrad Irwin created

978cff8 Use `IndexMap` for a deterministic order when importing syntax colors

Marshall Bowers created

1a0ddc4 WIP

Antonio Scandurra created

1f0fccc Reorganize `theme_importer`

Marshall Bowers created

b029083 Start on rendering context menu in editor2

Click to expand commit body
Co-Authored-By: Nathan <nathan@zed.dev>
Co-Authored-By: Mikayla <mikayla@zed.dev>

Antonio Scandurra , Nathan , and Mikayla created

34e31fd Properly emit `UserHighlightStyle`s

Marshall Bowers created

98271fb zed2: Get tsserver running again (#3288)

Click to expand commit body
Port these changes to the zed2 directory

Release Notes:

- N/A

Julia created

3c689ba Fix escape in GoToLine with new event emitter

Conrad Irwin created

a1d9f35 Some more woogaloo around action dispatch

Click to expand commit body
Co-authored-by: Conrad <conrad@zed.dev>

Piotr Osiewicz and Conrad created

ff19a0c Add `importing-themes` feature flag to `theme2` crate

Click to expand commit body
When this feature is set the `themes` module won't be compiled.
This allows us to run the `theme_importer` even when the `themes` module
has compile errors in it.

Marshall Bowers created

60eae3e Emit unique highlights for each syntax token

Marshall Bowers created

5d15886 Render code actions indicator

Click to expand commit body
Co-Authored-By: Nathan <nathan@zed.dev>

Antonio Scandurra and Nathan created

194d615 Fix up keybindings propagation

Click to expand commit body
Co-authored-by: Conrad <conrad@zed.dev>

Piotr Osiewicz and Conrad created

efd1db1 WIP – Add Syntax themes to importer

Click to expand commit body
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>

Nate Butler and Marshall Bowers created

d184e0d Start working on command_palette2

Piotr Osiewicz created

9cb14c1 zed2: Get tsserver running again

Julia created

4b5ca3e Allow imported themes to refine StatusColors

Click to expand commit body
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>

Nate Butler and Marshall Bowers created

cfee140 Extract `AnyElement::{measure,draw}`

Click to expand commit body
Co-Authored-By: Nathan Sobo <nathan@zed.dev>

Antonio Scandurra and Nathan Sobo created