Commit Graph

111 Commits

Author SHA1 Message Date
Kirill Bulatov
df41435d1a
Introduce DisplayRow, MultiBufferRow newtypes and BufferRow type alias (#11656)
Part of https://github.com/zed-industries/zed/issues/8081

To avoid confusion and bugs when converting between various row `u32`'s,
use different types for each.
Further PRs should split `Point` into buffer and multi buffer variants
and make the code more readable.

Release Notes:

- N/A

---------

Co-authored-by: Piotr <piotr@zed.dev>
2024-05-11 00:06:51 +03:00
Kirill Bulatov
4762e52d31
Properly calculate expanded git diff hunk highlight ranges (#11632)
Closes https://github.com/zed-industries/zed/issues/11576

Release Notes:

- Fixed expanded diff hunks highlighting an extra row as added
([11576](https://github.com/zed-industries/zed/issues/11576))
2024-05-10 02:02:56 +03:00
Kirill Bulatov
caa0d35b8b
Allow to toggle git hunk diffs (#11080)
Part of https://github.com/zed-industries/zed/issues/4523

Added two new actions with the default keybindings

```
"cmd-'": "editor::ToggleHunkDiff",
"cmd-\"": "editor::ExpandAllHunkDiffs",
```

that allow to browse git hunk diffs in Zed:


https://github.com/zed-industries/zed/assets/2690773/9a8a7d10-ed06-4960-b4ee-fe28fc5c4768


The hunks are dynamic and alter on user folds and modifications, or
toggle hidden, if the modifications were not adjacent to the expanded
hunk.


Release Notes:

- Added `editor::ToggleHunkDiff` (`cmd-'`) and
`editor::ExpandAllHunkDiffs` (`cmd-"`) actions to browse git hunk diffs
in Zed
2024-05-01 22:47:36 +03:00
张小白
11dc3c2582
windows: Support all OpenType font features (#10756)
Release Notes:

- Added support for all `OpenType` font features to DirectWrite.



https://github.com/zed-industries/zed/assets/14981363/cb2848cd-9178-4d87-881a-54dc646b2b61

---------

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2024-04-26 13:58:12 -07:00
Nate Butler
366d7e7728
Break typography styles out of StyledExt (#11013)
- Centralizes typography-related UI styles and methods in
`styles/typography.rs`
- Breaks the typography-related styles out of `StyledExt`. This means we
add a `StyledTypography` trait – this should more or less be an
invisible change as we publish it in the prelude.
- adds the ability to easily grab the UI or Buffer font sizes
(`ui_font_size`, `buffer_font_size`) with `TextSize::UI`,
`TextSize::Editor`

Release Notes:

- N/A
2024-04-25 17:42:53 -04:00
Marshall Bowers
3610b076a0
Restore --all-targets for clippy (#9346)
This PR restores the `--all-targets` flag when running `cargo clippy`.

Without it, there are areas that Clippy does not check, as evidenced by
the violations that were caught once the flag was re-added.

Release Notes:

- N/A
2024-03-14 12:39:45 -04:00
Kirill Bulatov
2f6c78b0c0
Fix incorrect outline selections after submit (#9160)
Follow-up of https://github.com/zed-industries/zed/pull/9153

Release Notes:

- N/A
2024-03-11 12:07:42 +02:00
Kirill Bulatov
41dc5fc412
Allow highlighting editor rows from multiple sources concurrently (#9153) 2024-03-11 02:17:32 +02:00
Marshall Bowers
22fe03913c
Move Clippy configuration to the workspace level (#8891)
This PR moves the Clippy configuration up to the workspace level.

We're using the [`lints`
table](https://doc.rust-lang.org/cargo/reference/workspaces.html#the-lints-table)
to configure the Clippy ruleset in the workspace's `Cargo.toml`.

Each crate in the workspace now has the following in their own
`Cargo.toml` to inherit the lints from the workspace:

```toml
[lints]
workspace = true
```

This allows for configuring rust-analyzer to show Clippy lints in the
editor by using the following configuration in your Zed `settings.json`:

```json
{
  "lsp": {
    "rust-analyzer": {
      "initialization_options": {
        "check": {
          "command": "clippy"
        }
      }
    }
  }
```

Release Notes:

- N/A
2024-03-05 12:01:17 -05:00
Marshall Bowers
fe04f69caf
Enable clippy::useless_conversion (#8767)
This PR enables the
[`clippy::useless_conversion`](https://rust-lang.github.io/rust-clippy/master/index.html#/useless_conversion)
rule and fixes the outstanding violations.

Release Notes:

- N/A
2024-03-03 10:22:55 -05:00
Dzmitry Malyshau
a44fc24445
Clean up many small dependencies (part 3) (#8425)
Follow-up to #8353

Release Notes:
- N/A
2024-02-26 11:08:57 +02:00
Kirill Bulatov
c29ea9bdbc Allow using context in the placeholder_text method 2024-02-25 00:08:57 +02:00
Bennet Bo Fenner
c33efe8cd0
recent projects: cleanup ui (#7528)
As the ui for the file finder was recently changed in #7364, I think it
makes sense to also update the ui of the recent projects overlay.

Before:

![image](https://github.com/zed-industries/zed/assets/53836821/8a0f5bef-9b37-40f3-a974-9dfd7833cc71)

After:

![image](https://github.com/zed-industries/zed/assets/53836821/7e9f934a-1ac3-4716-b7b6-67a7435f3bde)


Release Notes:

- Improved UI of recent project overlay
2024-02-19 14:37:52 +02:00
Kirill Bulatov
f734365b7b
Avoid another confirmation when submitting/discarding feedback (#7569)
Fixes https://github.com/zed-industries/zed/issues/7515

Release Notes:

- Fixed feedback modal spawning extra confirmations on cancel and submit
([7515](https://github.com/zed-industries/zed/issues/7515))
2024-02-08 16:13:54 +02:00
Kieran Gill
ad3940c66f
text rendering: support strikethroughs (#7363)
<img width="1269" alt="image"
src="https://github.com/zed-industries/zed/assets/18583882/d4c93033-b2ac-4ae0-8e12-457f256ee869">

Release Notes:

- Added support for styling text with strikethrough.

Related: 
- https://github.com/zed-industries/zed/issues/5364
- https://github.com/zed-industries/zed/pull/7345
2024-02-07 16:51:27 +02:00
Piotr Osiewicz
743f9b345f
chore: Move workspace dependencies to workspace.dependencies (#7454)
We should prefer referring to local deps via `.workspace = true` from
now on.

Release Notes:

- N/A
2024-02-06 20:41:36 +01:00
Marshall Bowers
e338f34097
Sort dependencies in Cargo.toml files (#7126)
This PR sorts the dependency lists in our `Cargo.toml` files so that
they are in alphabetical order.

This should make them easier to visually scan when looking for a
dependency.

Apologies in advance for any merge conflicts 🙈 

Release Notes:

- N/A
2024-01-30 21:41:29 -05:00
Marshall Bowers
0cb8b0e451
Clean up Cargo.toml files (#7044)
This PR cleans up some inconsistencies in the `Cargo.toml` files that
were driving me crazy.

Release Notes:

- N/A
2024-01-29 23:47:20 -05:00
Piotr Osiewicz
0a0a866dd5
Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535)
Release Notes:
- N/A
2024-01-27 13:51:16 +01:00
Piotr Osiewicz
f2ff7fa4d5
chore: Change AGPL-licensed crates to GPL (except for collab) (#4231)
- [x] Fill in GPL license text.
- [x] live_kit_client depends on live_kit_server as non-dev dependency,
even though it seems to only be used for tests. Is that an issue?

Release Notes:
- N/A
2024-01-24 00:26:58 +01:00
Piotr Osiewicz
21e6b09361
Remove license-file from Cargo.toml as it is apparently redundant (#4218)
Release Notes:

- N/A
2024-01-23 17:40:30 +01:00
Piotr Osiewicz
678bdddd7d
chore: Add crate licenses. (#4158)
- GPUI and all dependencies: Apache 2
- Everything else: AGPL

Here's a script that I've generated for it:
https://gist.github.com/osiewicz/6afdd6626e517da24a2092807e6f0b6e

Release Notes:
- N/A

---------

Co-authored-by: David <david@zed.dev>
2024-01-23 16:56:22 +01:00
Piotr Osiewicz
6cbc49e5f0
Editor docs (#4097)
Release Notes:

- N/A

---------

Co-authored-by: Kirill <kirill@zed.dev>
2024-01-18 00:48:37 +01:00
Marshall Bowers
90f4c70a82
Rename h_stack and v_stack to h_flex and v_flex, respectively (#4053)
This PR renames the `h_stack` and `v_stack` to `h_flex` and `v_flex`,
respectively.

We were previously using `h_stack` and `v_stack` to match SwiftUI, but
`h_flex` and `v_flex` fit better with the web/flexbox terminology that
the rest of GPUI uses.

Additionally, we were already calling the utility functions used to
implement `h_stack` and `v_stack` by the new names.

Release Notes:

- N/A
2024-01-15 11:34:06 -05:00
Kirill Bulatov
2ca17bd03e Clean up outline selections when its modal gets closed 2024-01-08 21:52:03 +02:00
Max Brunsfeld
f5ba22659b Remove 2 suffix from gpui
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:59:39 -08:00
Max Brunsfeld
dfcb17fe74 Remove 2 suffix for theme
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:41:01 -08:00
Max Brunsfeld
4305c5fdbe Remove 2 suffix for ui, storybook, text
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:33:51 -08:00
Max Brunsfeld
0cf65223ce Remove 2 suffix for collab, rope, settings, menu
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:29:16 -08:00
Max Brunsfeld
9f99e58834 Remove 2 suffix for lsp, language, fuzzy
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 11:58:02 -08:00
Max Brunsfeld
789ce8dd75 Remove 2 suffix for workspace
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 11:08:51 -08:00
Max Brunsfeld
492805af9c Remove 2 suffix for multi_buffer, outline, copilot
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 11:01:58 -08:00
Alex Viscreanu
c7669317ec
feat(workspace): allow alternative actions to open files and symbols in split
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2023-07-14 21:49:15 +02:00
Piotr Osiewicz
e92015b12f
Split out Interactive<T> into Toggle<T> and Interactive<T> 2023-06-20 16:05:20 -07:00
Nathan Sobo
986eafd84e Enable test-support on editor in tests 2023-05-20 09:54:38 -06:00
Max Brunsfeld
67a25126d4 Define theme/ui text style settings in theme crate 2023-05-17 14:44:59 -07:00
Antonio Scandurra
c4472b0786 Remove ViewContext::dispatch_action 2023-05-01 16:27:36 +02:00
Max Brunsfeld
c15dadbb8c Remove highlighted rows when confirming outline view 2023-04-26 15:46:29 -07:00
Max Brunsfeld
ebbe52e6b0 🎨 Specify more dependencies at the workspace level 2023-04-24 17:41:55 -07:00
Nathan Sobo
fe492eacbf Refine naming of element-related types and traits
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-04-21 13:06:37 -06:00
Antonio Scandurra
03619dfa55 Rename Drawable::boxed to into_element and make containers generic
Multi-element are now generic over any drawable child, which can be converted
into an element.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-04-21 12:43:19 -06:00
Antonio Scandurra
e282c7ad45 Finish converting all the pickers to the new API 2023-04-20 15:26:05 +02:00
Nathan Sobo
d70644618a WIP: Make PickerDelegate a fully owned object instead of a view
This avoids issues with the parent view being on the stack when we want to
interact with the delegate from the picker. Still have several picker usages
to convert.
2023-04-19 22:05:29 -06:00
Antonio Scandurra
38ab6b123f Make production code compile again 2023-04-17 12:33:33 +02:00
Nathan Sobo
a25f962185 WIP 2023-04-12 12:13:35 -06:00
Nathan Sobo
868301bedb WIP 2023-04-12 10:07:17 -06:00
Nathan Sobo
e115baa60c WIP 2023-04-11 18:21:56 -06:00
Nathan Sobo
de9bf6dfbd Merge MutableAppContext into AppContext
There may have been a good reason for the difference at some point, or I was
still learning Rust. But now it's just &mut AppContext vs &AppContext.
2023-04-06 15:49:03 -06:00
Nathan Sobo
82a713fd1d Store AnyViewHandle inside ViewHandle and Deref to it 2023-04-02 14:59:55 -06:00
Max Brunsfeld
cbeb6e692d Move postage crate version specification to workspace Cargo.toml 2023-03-21 11:26:13 -07:00