Commit Graph
302 Commits
Author SHA1 Message Date
Piotr Osiewicz 0f584cb353 chore: Extract languages from zed crate (#8270)
- Moves languages module from `zed` into a separate crate. That way we
have less of a long pole at the end of compilation.
- Removes moot dependencies on editor/picker. This is totally harmless
and might help in the future if we decide to decouple picker from
editor.

Before:
```
Number of crates that depend on 'picker' but not on 'editor': 1
Total number of crates that depend on 'picker': 13
Total number of crates that depend on 'editor': 30
```
After:
```
Number of crates that depend on 'picker' but not on 'editor': 5
Total number of crates that depend on 'picker': 12
Total number of crates that depend on 'editor': 26
```
The more crates depend on just picker but not editor, the better in that
case.

Release Notes:

- N/A
2024-02-23 15:56:08 +01:00
FelipeandConrad Irwin a82f4857f4 Add settings to control gutter elements (#7665)
The current gutter was a bit too big for my taste, so I added some
settings to change which visual elements are shown, including being able
to hide the gutter completely.

This should help with the following issues: #4963, #4382, #7422

New settings:
```json5
"gutter": {
    "line_numbers": true, // Whether line numbers are shown
    "buttons": true // Whether the code action/folding buttons are shown
}
```

The existing `git.git_gutter` setting is also taken into account when
calculating the width of the gutter.

We could also separate the display of the code action and folding
buttons into separate settings, let me know if that is desirable.

## Screenshots:

- Everything on (`gutter.line_numbers`, `gutter.buttons`,
`git.git_gutter`):
<img width="434" alt="SCR-20240210-trfb"
src="https://github.com/zed-industries/zed/assets/17355488/bcc55311-6e1d-4c22-8c43-4f364637959b">

- Only line numbers and git gutter (`gutter.line_numbers`,
`git.git_gutter`):
<img width="406" alt="SCR-20240210-trhm"
src="https://github.com/zed-industries/zed/assets/17355488/0a0e074d-64d0-437c-851b-55560d5a6c6b">

- Only git gutter (`git.git_gutter`):
<img width="356" alt="SCR-20240210-trkb"
src="https://github.com/zed-industries/zed/assets/17355488/7ebdb38d-93a5-4e38-b008-beabf355510d">

- Only git gutter and buttons (`git.git_gutter`, `gutter.buttons`):
<img width="356" alt="SCR-20240210-txyo"
src="https://github.com/zed-industries/zed/assets/17355488/e2c92c05-cc30-43bc-9399-09ea5e376e1b">


- Nothing:
<img width="350" alt="SCR-20240210-trne"
src="https://github.com/zed-industries/zed/assets/17355488/e0cd301d-c3e0-4b31-ac69-997515928b5a">



## Release Notes:
- Added settings to control the display of gutter visual elements. `"gutter": {"line_numbers": true,    "code_actions": true,    "folds": true}` ([#8041](https://github.com/zed-industries/zed/issues/8041))  ([#7422](https://github.com/zed-industries/zed/issues/7422))
```

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-02-22 20:37:13 -07:00
Conrad Irwin 450cf9dd06 Fix rendering of diagnostic blocks
- Distinct colors to make it not confusing
- Avoid overflowing the edge of the editor when the message is long
2024-01-23 16:28:58 -07:00
Mikayla c05edee2b5 Port the rest of the app 2024-01-21 20:26:33 -08:00
Piotr OsiewiczandKirill 6cbc49e5f0 Editor docs (#4097)
Release Notes:

- N/A

---------

Co-authored-by: Kirill <kirill@zed.dev>
2024-01-18 00:48:37 +01:00
Joseph T. Lyons ba9a9f4f17 Add more open events
project search
diagnostics
welcome page
2024-01-15 16:26:04 -05: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
Marshall Bowers fa53353c57 Rename IconElement to just Icon (#3974)
This PR renames the `IconElement` component to just `Icon`.

This better matches the rest of our components, as `IconElement` was the
only one using this naming convention.

The `Icon` enum has been renamed to `IconName` to free up the name.

I was trying to come up with a way that would allow rendering an
`Icon::Zed` directly (and thus make the `IconElement` a hidden part of
the API), but I couldn't come up with a way to do this cleanly.

Release Notes:

- N/A
2024-01-09 10:11:20 -05:00
Piotr OsiewiczandMarshall Bowers e4b1c76895 Display setting documentation in settings.json (#3936)
Let this screenshot of settings.json speak for itself: 

![image](https://github.com/zed-industries/zed/assets/24362066/fca60383-1788-43f9-803b-00f083394c8a)

Release Notes:
- Added code completion & on-hover documentation to Zed's settings.json
file.

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-01-08 19:30:18 +01:00
Nate Butler 1ede003de2 Always show checking with icon if checks are still running 2024-01-08 11:55:51 -05:00
Nate Butler c40e45e4d7 Use default instead of muted color 2024-01-08 11:34:00 -05:00
Conrad Irwin 3c0052850c Merge branch 'main' into channel-guests 2024-01-05 10:05:59 -07:00
Conrad Irwin df0076a4eb Better TestWindow support (#3876)
Adding guest roles led us down a rabbit hole where we'd have liked to
rely on a
side-effect of activating a window in tests; but the test window didn't
implement that.

Looking into that, I realized our TestWindow wasn't doing a great job of
emulating the MacWindow, so this makes the two more similar.
2024-01-05 09:59:48 -07:00
Conrad Irwin 319bfff14e Fix more tests broken by timing change 2024-01-04 21:34:56 -07:00
Marshall Bowers 47476faef1 Fix label color for inactive tabs (#3899)
This PR fixes an issue where certain tabs were not using the correct
color for their labels when they were inactive.

Release Notes:

- Fixed an issue where some inactive tabs were not using the correct
label color.
2024-01-04 17:25:11 -05:00
Nate Butler 710a26ce32 Add "Checking" icon for diagnostics 2024-01-03 23:07:21 -05:00
Conrad Irwin 84171787a5 Track read_only per project and buffer
This uses a new enum to avoid confusing booleans
2024-01-03 19:31:43 -07:00
Max BrunsfeldandMikayla 252694390a Remove 2 suffix for vim, diagnostics, go_to_line, theme_selector, command_palette, file_finder
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 10:42:49 -08:00
Kirill Bulatov 69bfd47cf9 Exclude gitignored files' diagnostics from project panel and its indicator.
The diagnostics are collected and available still, since that might become a settings/UI toggle later.
Also, buffer diagnostics are still updated for gitignored files.
2023-11-30 15:46:30 +02:00
Kirill Bulatov d38a2b793e Do not add diagnostics for any selection in the diagnostics panel 2023-11-10 13:35:58 +02:00
Kirill Bulatov bfb860c06c Properly toggle diagnostics 2023-11-06 19:29:31 +02:00
Kirill Bulatov ad93d9132f Correctly update old diagnostics 2023-11-05 15:37:27 +02:00
Kirill Bulatov fdcb907644 Parallelize diagnostics filling, add more logs 2023-11-05 15:06:39 +02:00
Kirill Bulatov ff1d692e46 Restructure inner path data 2023-11-05 14:53:13 +02:00
Kirill Bulatov 7145fabb6d Eagerly refresh diagnostics that do not intercept with user input 2023-11-05 14:44:22 +02:00
Kirill Bulatov 660c3371e4 Refresh all possibly stale diagnostics pat 2023-11-05 14:43:54 +02:00
Kirill Bulatov 918d123284 Fix the test 2023-11-03 21:51:12 +02:00
Kirill Bulatov 9cb8ce172d Refresh diagnostics inside the tab 2023-11-03 21:51:12 +02:00
Kirill Bulatov 803ab81eb6 Update diagnostics indicator when diagnostics are udpated 2023-10-13 12:13:18 +03:00
Antonio Scandurra 0e6002dca2 Fix tests 2023-09-27 18:19:35 -06:00
Antonio Scandurra 78908bc5cb Introduce a new include_warnings setting under diagnostics 2023-09-27 18:08:08 -06:00
Antonio Scandurra f603d682cd Add an include/exclude warnings toggle in project diagnostics 2023-09-27 17:47:19 -06:00
Nate Butler 24974ee2fa Unify icons using multiple variants, remove all unused icons 2023-09-15 12:50:49 -04:00
Julia c6f293076e Avoid keeping stale LSP progress indicator state when server is removed 2023-09-12 15:14:49 -04:00
Nathan Sobo d375f7992d Merge branch 'main' into divs 2023-08-22 16:35:56 -06:00
Nate Butler 9d60e550be Additional status bar styles 2023-08-15 15:32:14 -04:00
Mikayla e5eed29c72 Add components example
Re-arrange generics on mouse event handler
Add TypeTag struct for dynamically tagged components
2023-08-15 03:06:43 -07:00
Nathan SoboandMikayla Maki 740b105330 Merge branch 'main' into taffy
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2023-08-14 13:50:21 -06:00
Piotr Osiewicz ffffbbea1f chore: use Cow instead of String for tooltips (#2838)
A QoL change to align `Tooltip` with other elements like `Label`
Release Notes:

- N/A
2023-08-11 15:29:55 +02:00
Nathan Sobo 0bf607cd2d WIP 2023-08-10 10:26:48 -06:00
Nathan Sobo f0da6b05fd Remove TestAppContext::add_view
Instead, we now call this on window handles.
2023-08-07 22:46:48 -06:00
Nathan Sobo adc50469ff WIP 2023-08-06 12:45:31 -06:00
Nathan Sobo 485c0a482e Don't refcount window handles 2023-08-03 17:11:47 -06:00
Nathan Sobo 884cee6dfd Get tests compiling returning WindowHandle<V: View> from add_window 2023-08-02 14:05:03 -06:00
Nate Butler 6ab0143469 Split Interactive into Interactive and Toggleable (#2628)
This is a part of the intensity driven theme rewrite. 

It introduces the `toggle` and `interactive` helper functions to build
Toggle<T> and Interactive<T> styles for interactive elements in the
theme.

This PR also removes the `theme_testbench` crate and related actions.

Huge thanks to @osiewicz and @mikayla-maki for pushing this forward 🙏🏽

Release Notes:

- Updated the style of many interactive elements.
2023-06-21 15:03:08 -04:00
Mikayla Maki 11125a62c7 Add copy-on-click to diagnostic messages 2023-06-20 16:48:30 -07:00
Piotr Osiewicz e92015b12f Split out Interactive<T> into Toggle<T> and Interactive<T> 2023-06-20 16:05:20 -07:00
Antonio Scandurra 1aa1774688 Avoid auto-scrolling the editor when inserting/removing headers 2023-06-14 10:49:23 +02:00
Julia f40c498491 Fix tests 2023-05-25 14:29:28 -04:00
Julia 8d662edb6c Remove concept of git diff refresh from Item trait 2023-05-25 14:29:28 -04:00