Commit log

86eafb6 zed 0.112.3

Joseph T. Lyons created

2d3a34c 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

67068fa zed 0.112.2

Joseph T. Lyons created

1d175b4 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

c51d54d Do not use prettier for formatting node_modules/** files (#3286)

Click to expand commit body
Fixes

> the most annoying thing i'm running into right now is that when i'm
patching something inside node_modules, Zed tries to pretty-format it
according to my prettier config. this messes up the patch because it has
formatting changes now. i need the pretty formatting on save to be off
inside node_modules, that never makes sense

feedback from #influencers 

Do note though, that language servers will still format any file inside
node_modules, but at least it's not prettier now.
VSCode seem to format the node_modules/** files via language servers
too, so that seems ok for now, and the rest could be fixed during

> "project diagnostics" (eslint) seem to be running inside node_modules,
e.g. i'm seeing 3182 "errors" in my project. that doesn't make sense and
probably wastes resources in addition to being annoying

feedback later.

Release Notes:

- Fixed prettier formatting files inside node_modules

Kirill Bulatov created

dc55644 zed 0.112.1

Joseph T. Lyons created

af9af3f Get tsserver running again

Julia created

8539d97 v0.112.x preview

Joseph T. Lyons created

1310747 Wire up mouse interaction in `editor2` (#3267)

Click to expand commit body
Release Notes:

- N/A

Antonio Scandurra created

55dca1e :lipstick:

Antonio Scandurra created

15d40d6 Determine whether the gutter was hovered

Antonio Scandurra created

dfc536b Handle MouseUpEvent in editor2

Antonio Scandurra created

e500c05 Move building of key listeners outside of EditorElement::initialize

Antonio Scandurra created

bef3b80 Clear hover background highlights

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

Antonio Scandurra and Piotr created

e5f78ec Uncomment mouse_dragged event

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

Piotr Osiewicz and Antonio created

1b085bd Extract mouse event handlers into paint_mouse_listeners

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

Piotr Osiewicz and Antonio created

dd20032 Hook up mouse_down function handler

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

Piotr Osiewicz and Antonio created

e30449e Pass text_bounds instead of full editor bounds into mouse_moved.

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

Piotr Osiewicz and Antonio created

334829f uncomment show_hover

Piotr Osiewicz created

cd37735 uncomment mouse moved

Piotr Osiewicz created

e4bc032 gpui2: Type-erase futures. (#3266)

Click to expand commit body
Project2's LLVM IR size is ~33-44% bigger than project1 due to the fact
that in gpui2 we call async_task::spawn(_local) with impl Future instead
of dyn Future, which leads to quite a few more instantiations of
RawTask.

LLVM-IR size for project2:
|  build_type  |  main   |  this branch  | project1 |
|  debug       | 2617795 |    2022814    | 1817866  |
|  release     | 4439033 |    3715086    | 3314489  |

Note that this PR is in line with what was done in GPUI1 (we've also
boxed futures there).
Release Notes:

- N/A

Antonio Scandurra created

b1f5723 Re-enable most of the features in editor2 (#3265)

Click to expand commit body
Release Notes:

- N/A

Antonio Scandurra created

2364f6b gpui2: Type-erase futures.

Click to expand commit body
Project2's LLVM IR size is ~20-25% bigger than project1 due to the fact that in gpui2 we call async_task::spawn(_local) with impl Future instead of dyn Future, which leads to quite a few more instantiations of RawTask.

LLVM-IR size for project2:
|  build_type  |  main   |  this branch  | project1 |
|  debug       | 2617795 |    2022814    | 1817866  |
|  release     | 4439033 |    3715086    | 3314489  |

Piotr Osiewicz created

c5d5571 Fix warnings when generating function name for `ctor`

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

Antonio Scandurra and Piotr created

6a0789c Don't alpha blend when rasterizing paths

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

Antonio Scandurra and Piotr created

8ac8a6f Re-enable most of the functionalities in editor2

Antonio Scandurra created

d675818 Register actions statically / globally (#3264)

Click to expand commit body
This updates our approach to action registration to make it
static/global.

There are 3 different approaches to creating an action, depending on the
complexity of your action's implementation. All of them involve defining
a data type with the correct trait implementations and registering it,
each a bit more powerful / verbose.

* Define a simple list of unit structs that implement `Action` -
`actions!(Foo, Bar, Baz)`
* Make a more complex data type into an action with `#[action]`. This
derives all the necessary traits and registers the action.
  ```rs
  #[action]
  struct MoveLeft {
    word: true
  }
  ```
* Implement all traits yourself and just register the action with
`#[register_action]`.

Release Notes:

N/A

Nathan Sobo created

408edaa Remove call to removed method

Nathan Sobo created

1949fa5 Merge remote-tracking branch 'origin/main' into register-actions

Nathan Sobo created

2a55b0d Simplify actions macro.

Nathan Sobo created

fdc9ea7 Docs and cleanup

Nathan Sobo created

814e620 Register actions globally before main

Nathan Sobo created

80630cd WIP

Nathan Sobo created

776338d Update default theme player colors and add players story (#3263)

Click to expand commit body
[[PR Description]]

- Update the default theme player colors for `Zed Pro Moonlight` and
`Zed Pro Daylight`
- Adds the ability to create stories in the `theme2` crate


![image](https://github.com/zed-industries/zed/assets/1714999/61fca222-1512-43b1-a229-fae1080d07fa)

You can see them by running:
- `cargo run -p storybook2 -- components/players --theme "Zed Pro
Daylight"`
- `cargo run -p storybook2 -- components/players --theme`

The player colors crisscross back and forth on the color wheel so that
the colors are as distinct as possible.


![image](https://github.com/zed-industries/zed/assets/1714999/255c9fd2-34da-4f75-9aad-0dd02f7009bf)

We do have room to add additional players if needed. Just let me know if
we feel like the default 8 aren't cutting it.


Release Notes:

- N/A

Nate Butler created

0dd6ea6 Add new default player colors and the players story.

Nate Butler created

79b4f78 Extend the theme crate to enable stories, add players story

Nate Butler created

a39865b Update default player colors

Nate Butler created

bcc92e9 Implement basic text input handling (#3262)

Click to expand commit body
This PR adds basic text input to Editors in zed2.

Note that we have *not* yet implemented the
`InputHandler::bounds_for_range` method on `Editor`, so the composition
and emoji picker windows are not yet positioned correctly.

Max Brunsfeld created

9fe3073 Get basic text input working

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

Max Brunsfeld and Marshall created

bd12e3e Assign editors as text input handlers

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

Max Brunsfeld and Marshall created

b2ae08b Implement an InputHandler trait for gpui2

Click to expand commit body
Co-Authored-By: Marshall <marshall@zed.dev>
Co-Authored-By: Max <max@zed.dev>
Co-Authored-By: Julia <julia@zed.dev>

Conrad Irwin , Marshall , Max , and Julia created

9cdfce4 Make it possible to render a single line editor (#3259)

Click to expand commit body
[[PR Description]]

Release Notes:

- (Added|Fixed|Improved) ...
([#<public_issue_number_if_exists>](https://github.com/zed-industries/community/issues/<public_issue_number_if_exists>)).

Conrad Irwin created

5c45084 Add text and focus to editor

Conrad Irwin created

a21c49c Make it possible to render a single line editor

Conrad Irwin created

c7f5888 editor singleline (#3257)

Click to expand commit body
- Implement Editor::single_line
- Fix confusing error message
- Fix loading keyfiles
- Wire up GoToLine modal

Mikayla Maki created

b692fb1 Start documenting `ThemeColors` (#3258)

Click to expand commit body
[[PR Description]]
- Adds doc comments for most fields on ThemeColors
- Scaffolds out some upcoming additional fields (Will add in a later PR)
- Renames a few fields:
    - `element_placeholder` -> `element_placeholder_text`
    - `element_drop_target` -> `drop_target_background`
- Removes the redundant `element_placeholder_text` (This should be set
using `text_placeholder`

Release Notes:

- N/A

Nate Butler created

1e6a0f1 Wire up GoToLine modal

Conrad Irwin created

0233864 Fix loading keyfiles

Conrad Irwin created

b804b25 Fix confusing error message

Conrad Irwin created

df84ba4 Continue documenting theme colors

Nate Butler created