Commit graph

12506 commits

Author SHA1 Message Date
Conrad Irwin
359847d047 Revert "Revert "workspace: Improve save prompt. (#3025)""
This reverts commit 5c75450a77.
2023-09-25 12:18:03 -06:00
Antonio Scandurra
15567493ba WIP 2023-09-25 11:55:05 -06:00
Mikayla Maki
591ec02cea
Add support for the experimental Next LS for Elixir (#3024)
This is a PR I built for a friend of a friend at StrangeLoop, who is
making a much better LSP for elixir that elixir folks want to experiment
with. This PR also improves the our debug log viewer to handle LSP
restarts.

TODO:
- [ ] Make sure NextLS binary loading works.

Release Notes:

- Added support for the experimental Next LS for Elxir, to enable it add
the following field to your settings to enable:

```json
"elixir": {
    "next": "on"
}
```
2023-09-25 12:52:56 -05:00
Antonio Scandurra
a1e080d495 Checkpoint 2023-09-25 11:48:51 -06:00
Mikayla
c2fca054ae
Fix compile and test errors 2023-09-25 10:46:09 -07:00
Julia
bf6c2f0dfd
Activate correct item when clicking on a code action with the mouse (#3027)
Release Notes:

- Fixed clicking a code action only ever performing the first action in
the list rather than the one clicked on.
2023-09-25 13:45:20 -04:00
KCaverly
86ec0b1d9f implement new search strategy 2023-09-25 13:44:19 -04:00
Conrad Irwin
769c330b3d Merge branch 'vim-command' 2023-09-25 11:41:13 -06:00
Conrad Irwin
5c75450a77 Revert "workspace: Improve save prompt. (#3025)"
This reverts commit 0a491e773b.
2023-09-25 11:41:09 -06:00
Mikayla
ad7c1f3c81
Download next-ls automatically from github 2023-09-25 10:40:20 -07:00
Conrad Irwin
23767f734f Add cmd-+ as an alias for cmd-=
For github.com/zed-industries/community#1021
2023-09-25 11:31:34 -06:00
Julia
80eaabd360 Activate correct item when clicking on a code action with the mouse 2023-09-25 13:31:00 -04:00
Julia
ff5d0f2aeb
Trigger scroll_to on code action list when moving selection (#3026)
Release Notes:
- Fixed the code action popup menu not scrolling as selection moves.
2023-09-25 11:21:24 -04:00
Julia
a278428bd5 Trigger scroll_to on code action list when moving selection 2023-09-25 11:13:50 -04:00
Piotr Osiewicz
0a491e773b
workspace: Improve save prompt. (#3025)
Add buffer path to the prompt.

Z-2903

Release Notes:
- Added a "Save all/Discard all" prompt when closing a pane with
multiple edited buffers.
2023-09-25 16:15:29 +02:00
Antonio Scandurra
45540a00ee Checkpoint 2023-09-24 17:12:59 -06:00
Antonio Scandurra
55f4aa3b34 Checkpoint 2023-09-24 16:52:33 -06:00
Mikayla
8b63e45f0b
Implement LSP adapter methods for syntax highlighting 2023-09-24 05:08:05 -07:00
Mikayla
052cb459a6
Improve lsp log viewer's behavior in the presence of LSP restarts
Improve settings interface to local LSP
2023-09-24 04:59:55 -07:00
Antonio Scandurra
a7803570dc Checkpoint 2023-09-23 17:26:22 -06:00
Antonio Scandurra
b516ea2fe2 Checkpoint 2023-09-23 15:56:40 -06:00
Antonio Scandurra
1fa45c69d6 Checkpoint 2023-09-23 15:52:16 -06:00
Antonio Scandurra
c4abd93b9b WIP 2023-09-23 15:24:01 -06:00
Antonio Scandurra
91c1768939 Checkpoint 2023-09-23 15:03:05 -06:00
Antonio Scandurra
1a5d6aa498 Checkpoint 2023-09-23 14:20:07 -06:00
Antonio Scandurra
fb69f3d45f Checkpoint
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-09-23 12:21:52 -06:00
Antonio Scandurra
3fbe93f029 Checkpoint
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-09-23 11:06:10 -06:00
Antonio Scandurra
df388d9f33 Checkpoint 2023-09-23 09:10:33 -06:00
Marshall Bowers
0697d08e54
Restructure ui into just elements and components (#3023)
This PR restructures the `ui` crate into just `elements` and
`components`.

This was already done on the `gpui2-ui` branch, just getting it onto
`main`.

Release Notes:

- N/A

---------

Co-authored-by: Nate Butler <nate@zed.dev>
2023-09-22 21:27:47 -04:00
Marshall Bowers
895386cfaf
Mainline Icon and IconButton changes (#3022)
This PR mainlines the `Icon` and `IconButton` changes from the
`gpui2-ui` branch.

Release Notes:

- N/A

Co-authored-by: Nate Butler <nate@zed.dev>
2023-09-22 19:14:12 -04:00
Antonio Scandurra
6a95f9e349 WIP 2023-09-22 16:31:26 -06:00
Marshall Bowers
ad62a966a6
Display available stories in storybook CLI (#3021)
This PR updates the storybook CLI to support displaying all of the
available stories.

The `--help` flag will now show a list of all the available stories:

<img width="1435" alt="Screenshot 2023-09-22 at 6 11 00 PM"
src="https://github.com/zed-industries/zed/assets/1486634/284e1a24-46ec-462e-9709-0f9b6e94931f">

Inputting an invalid story name will also show the list of available
stories:

<img width="1435" alt="Screenshot 2023-09-22 at 6 10 43 PM"
src="https://github.com/zed-industries/zed/assets/1486634/1ce3ae3f-ab03-4976-a06a-5a2b5f61eae3">

Release Notes:

- N/A
2023-09-22 18:16:16 -04:00
Marshall Bowers
fe4248cf34
Scaffold Toolbar and Breadcrumb components (#3020)
This PR scaffolds the `Toolbar` and `Breadcrumb` components.

Right now they both just consist of hardcoded data.

<img width="846" alt="Screenshot 2023-09-22 at 4 54 00 PM"
src="https://github.com/zed-industries/zed/assets/1486634/70578df2-7216-42d2-97ef-d38b83fb4a25">

<img width="799" alt="Screenshot 2023-09-22 at 4 46 04 PM"
src="https://github.com/zed-industries/zed/assets/1486634/73ca3d8a-baf9-4ed4-b4c4-279c674672a3">

Release Notes:

- N/A
2023-09-22 16:57:33 -04:00
Antonio Scandurra
a237aa8164 Checkpoint
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-09-22 14:53:25 -06:00
Antonio Scandurra
3dc1e917bf Checkpoint
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-09-22 14:40:39 -06:00
Marshall Bowers
27e3e09bb9
Label component states in stories (#3019)
This PR updates the UI component stories to label the various states
that they are in.

Release Notes:

- N/A
2023-09-22 15:48:32 -04:00
Antonio Scandurra
d1791a999d Checkpoint
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-09-22 13:30:51 -06:00
Marshall Bowers
d0b15ed940
Report which requested font families are not present on the system (#3006)
This PR improves the error message when `FontCache.load_family` attempts
to load a font that is not present on the system.

I ran into this while trying to run the `storybook` for the first time.
The error message indicated that a font family was not found, but did
not provide any information as to which font family was being loaded.

### Before

```
   Compiling storybook v0.1.0 (/Users/maxdeviant/projects/zed/crates/storybook)
    Finished dev [unoptimized + debuginfo] target(s) in 8.52s
     Running `/Users/maxdeviant/projects/zed/target/debug/storybook`
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: could not find a non-empty font family matching one of the given names', crates/theme/src/theme_settings.rs:132:18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
libc++abi: terminating due to uncaught foreign exception
fish: Job 1, 'cargo run' terminated by signal SIGABRT (Abort)
```

### After

```
   Compiling storybook v0.1.0 (/Users/maxdeviant/projects/zed/crates/storybook)
    Finished dev [unoptimized + debuginfo] target(s) in 7.90s
     Running `/Users/maxdeviant/projects/zed/target/debug/storybook`
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: could not find a non-empty font family matching one of the given names: `Zed Mono`', crates/theme/src/theme_settings.rs:132:18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
libc++abi: terminating due to uncaught foreign exception
fish: Job 1, 'cargo run' terminated by signal SIGABRT (Abort)
```

Release Notes:

- N/A
2023-09-22 15:27:42 -04:00
Antonio Scandurra
e4e9da7673 Checkpoint
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-09-22 12:44:37 -06:00
Marshall Bowers
8b6e982495
Remove manual mapping in FromStr implementation for StorySelector (#3018)
This PR removes the need for writing manual mappings in the `FromStr`
implementation for the `StorySelector` enum used in the storybook CLI.

We are now using the
[`EnumString`](https://docs.rs/strum/0.25.0/strum/derive.EnumString.html)
trait from `strum` to automatically derive snake_cased names for the
enums.

This will cut down on some of the manual work needed to wire up more
stories to the storybook.

Release Notes:

- N/A
2023-09-22 14:06:09 -04:00
Marshall Bowers
71c1e36d1e
Put Theme behind an Arc (#3017)
This PR puts the `Theme` returned from the `theme` function behind an
`Arc`.

### Motivation

While working on wiring up window focus events for the `TitleBar`
component we ran into issues where `theme` was holding an immutable
borrow to the `ViewContext` for the entirety of the `render` scope,
which prevented having mutable borrows in the same scope.

### Explanation

To avoid this, we can make `theme` return an `Arc<Theme>` to allow for
cheap clones and avoiding the issues with the borrow checker.

Release Notes:

- N/A

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2023-09-22 13:35:30 -04:00
Antonio Scandurra
343c426307 Checkpoint 2023-09-22 10:02:11 -06:00
Marshall Bowers
d8c6adf338
Factor story boilerplate out into separate components (#3016)
This PR factors out the bulk of the boilerplate required to setup a
story in the storybook out into separate components.

The pattern we're using here is adapted from the "[associated
component](https://maxdeviant.com/posts/2021/react-associated-components/)"
pattern in React.

Release Notes:

- N/A
2023-09-22 11:38:01 -04:00
Nathan Sobo
e979d75cb8 WIP 2023-09-22 08:34:43 -06:00
Kirill Bulatov
afa7045847 Tone down inlay hint update logs 2023-09-22 17:04:11 +03:00
Kyle Caverly
e84339ef4a
reorganize AI crates to structure future development (#3015)
Reorganized assistant/semantic_index crates and introduced AI crate to
include shared functionality.

Release Notes:

- Moved most of the Assistant functionality from ai crate to assistant
crate
- Moved interaction with embedding providers from semantic_index to ai
crate
2023-09-22 09:54:46 -04:00
KCaverly
fbd6b5b434 cargo fmt 2023-09-22 09:46:06 -04:00
KCaverly
dc49dec4f0 catchup with main 2023-09-22 09:43:39 -04:00
KCaverly
68c37ca2a4 move embedding provider to ai crate 2023-09-22 09:33:59 -04:00
Kirill Bulatov
1f1c669673
Do not resubscribe for Copilot logs events (#3014)
Last follow-up of https://github.com/zed-industries/zed/pull/3002
Fixes
https://zed-industries.slack.com/archives/C04S6T1T7TQ/p1695281196667609

Copilot sends multiple events about its LSP server readiness, not
necessarily recreating the server from scratch (e.g. due to re-sign in
action). Avoid re-adding same log subscriptions on the same LSP server,
which causes panics.

Release Notes:

- N/A
2023-09-22 13:48:13 +03:00