Commit Graph

16401 Commits

Author SHA1 Message Date
Piotr Osiewicz
388c2d8e7f cargo fmt 2024-01-02 13:15:57 +01:00
Piotr Osiewicz
4af6ac25e9 gpui2: Another round of fixups 2024-01-02 13:11:36 +01:00
Piotr Osiewicz
945dba8099 gpui2: redundant_locals 2024-01-02 12:59:40 +01:00
Piotr Osiewicz
bcff7a8631 gpui2: Fix instance of map_entry lint 2024-01-02 12:56:53 +01:00
Piotr Osiewicz
1a03cf3268 Merge branch 'main' into clippy-fixes-for-zed2 2024-01-02 12:21:15 +01:00
Piotr Osiewicz
d185fca80c
Another pass of #[allow()] removal (#3825)
We still have a bunch of leftovers in ui2/theme2 and in gpui2
display_link module.

Release Notes:

- N/A
2024-01-02 12:17:30 +01:00
Piotr Osiewicz
1c20a7fc37
search: Add "Error" borders for query editors with malformed content. (#3824)
This commit also changes the way search queries are built (we do not bail early anymore if include/exclude editor queries are malformed) to propagate error status of the panel.
Release Notes:

- N/A
2024-01-02 10:43:50 +01:00
Nathan Sobo
47071605a1 Merge remote-tracking branch 'origin/main' into new-view-new-model-rename 2024-01-01 17:42:12 -07:00
Nathan Sobo
db1cf8f6e1 Rename build_view to new_view and build_model to new_model
The word "new" is shorter and blends in with `new` constructors that are common
in Rust. Been meaning to do this for a while.
2024-01-01 17:42:01 -07:00
Nathan Sobo
789db30c42
Clean up Element API and start on docs (#3821)
Getting some scaffold docs in place and making some naming adjustments
to improve consistency with Rust APIs and clarity.

- Render::Element -> Render::Output, and Render::Output is now only
required to be IntoElement instead of Element so we can return
components.
- RenderOnce::Element -> RenderOnce::Output
- Element::layout -> Render::request_layout - Clarify that this doesn't
actually *perform* layout, but simply requests

Release Notes:

- N/A
2024-01-01 17:41:12 -07:00
Piotr Osiewicz
a3759f9a33 Another batch of fixups 2024-01-02 00:24:11 +01:00
Piotr Osiewicz
2621efebea Rest of fixups for gpui2 2024-01-02 00:09:24 +01:00
Piotr Osiewicz
7d420edb84 Start fixing up gpui2 2024-01-02 00:04:51 +01:00
Piotr Osiewicz
86facbbe4a sqlez 2024-01-01 23:56:04 +01:00
Piotr Osiewicz
e2ec96e44a Fixes for gpui2_macros 2024-01-01 23:52:07 +01:00
Piotr Osiewicz
4fa28b3de2 chore: fix clippy lints for rope2, sum_tree, text2 and util 2024-01-01 23:50:14 +01:00
Nathan Sobo
f836873764 Fix merge 2024-01-01 12:23:42 -07:00
Nathan Sobo
bcf0e3fb05 Merge branch 'pre-merge' into clean-up-doc-elements 2024-01-01 12:21:33 -07:00
Nathan Sobo
81b03d379e Rearrange to hopefully make merging easier 2024-01-01 12:21:17 -07:00
Nathan Sobo
c6ae885c5d Add more docs 2024-01-01 11:35:40 -07:00
Piotr Osiewicz
219999cd8d theme2: Move stories to RPITIT for Render 2024-01-01 14:23:02 +01:00
Piotr Osiewicz
6027962937 fixup! Work around lifetime woes by turning the element in language_tools2 into any element 2024-01-01 14:23:02 +01:00
Piotr Osiewicz
fa0d507639 Work around lifetime woes by turning the element in language_tools2 into any element 2024-01-01 14:23:02 +01:00
Nathan Sobo
51d1d92d66 Attempt to return impl Element from render. 3 errors. 2024-01-01 14:23:02 +01:00
Nathan Sobo
83923fd6d5 Clean up Element API and start on docs 2023-12-31 08:33:40 -07:00
Kirill Bulatov
5f2bb82ef3
Use ghost_element_background for avatar background color (#3819)
Also add a couple todo!()s on top of the comments

Release Notes:

- N/A
2023-12-30 01:19:26 +02:00
Kirill Bulatov
1c13c3a243 Use ghost_element_background for avatar background color
Also add a couple todo!()s on top of the comments
2023-12-30 01:10:48 +02:00
Nathan Sobo
21f0409e3b Fix anti-aliasing artifacts in borders
Previously, we changed borders to be drawn after content, so they are no longer
part of the same quads as the background. In our change, we gave the background
quad a transparent black border and the border quads transparent black
backgrounds. However, this caused the other channels to blend toward that black
color before becoming fully transparent, causing them to become darker.

In this PR, I source the "placeholder" color by duplicating the values for
the other channels and only adjust the alpha down to zero.
2023-12-29 08:49:01 -07:00
Nathan Sobo
4e9fb26102
Adjust terminal and popover colors to better match original styling (#3816)
This may have made something else worse, but overall brings us more into
harmony.

Release Notes:

- N/A
2023-12-29 08:44:26 -07:00
Kirill Bulatov
ebd4b53b37
Remove async_trait from the only trait that allows it now (#3817)
* `EmbeddingProvider`, `NodeRuntime`, `Fs`,
`live_kit_server::api::Client` produce messages similar to
```
error[E0038]: the trait `EmbeddingProvider` cannot be made into an object
    --> crates/semantic_index/src/semantic_index_tests.rs:1096:51
     |
1096 |     let mut retriever = CodeContextRetriever::new(embedding_provider);
     |                                                   ^^^^^^^^^^^^^^^^^^ `EmbeddingProvider` cannot be made into an object
     |
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
    --> /Users/someonetoignore/work/zed/zed/crates/ai/src/embedding.rs:73:14
     |
73   |     async fn embed_batch(&self, spans: Vec<String>) -> Result<Vec<Embedding>>;
     |              ^^^^^^^^^^^ the trait cannot be made into an object because method `embed_batch` is `async`
     = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `EmbeddingProvider` for this new enum and using it instead:
               ai::providers::open_ai::OpenAIEmbeddingProvider
               ai::test::FakeEmbeddingProvider
```

* `LspAdapter` produces something even more obscure:

```
error[E0391]: cycle detected when checking effective visibilities
    |
note: ...which requires computing type of `<impl at crates/language2/src/language2.rs:122:1: 122:22>:🆕:{opaque#0}`...
   --> crates/language2/src/language2.rs:123:5
    |
123 |     pub async fn new(adapter: Arc<dyn LspAdapter>) -> Arc<Self> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires type-checking `<impl at crates/language2/src/language2.rs:122:1: 122:22>::new`...
   --> crates/language2/src/language2.rs:123:5
    |
123 |     pub async fn new(adapter: Arc<dyn LspAdapter>) -> Arc<Self> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: ...which again requires checking effective visibilities, completing the cycle
note: cycle used when checking that `CachedLspAdapter` is well-formed
   --> crates/language2/src/language2.rs:111:1
    |
111 | pub struct CachedLspAdapter {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
```



Release Notes:

- N/A
2023-12-29 00:06:48 +02:00
Kirill Bulatov
ce8cc50ae5 Remove async_trait from the only trait that allows it now 2023-12-28 23:45:30 +02:00
Piotr Osiewicz
e932f4cf47
Bump Rust to 1.75 (#3815)
**This PR also bumps wasmtime version from 0.38 to 2.0 as 0.38 does not
build with Rust 1.75**. I did not test the plugin runtime as (AFAIK) we
intend to deprecate it; also, wasmtime's most recent version is 16.0, so
it'd make sense to bump the version at some point anyways. I did not
bump the version to 16.0 straight away as that'd require code changes in
`plugin_runtime`.
Release Notes:

- N/A
2023-12-28 19:22:43 +01:00
Nathan Sobo
02f7e681a7 Import elevated surface color from hover popover 2023-12-27 11:58:26 -07:00
Nathan Sobo
a2b0f14dc1 Rename size to dimensions for consistency 2023-12-27 11:23:12 -07:00
Nathan Sobo
ddd6f0806b Render cursor text with the terminal's background color 2023-12-27 11:08:43 -07:00
Nathan Sobo
5cfd4b06b9 Use correct terminal background color 2023-12-27 10:46:25 -07:00
Kirill Bulatov
772429c086
More zed2 fixes (#3814) 2023-12-26 15:44:48 +02:00
Kirill Bulatov
937f237c8f Add breadcrumbs to the multibuffer editor
The breadcrumbs are not being open on the fisrt time, for some reason.
2023-12-26 15:18:20 +02:00
Kirill Bulatov
f27c63bb54 Fix color-related terminal todo! 2023-12-26 14:11:51 +02:00
Kirill Bulatov
af6f467890 Avoid trailing separators in file finder 2023-12-26 13:49:00 +02:00
Piotr Osiewicz
16626592db
Remove allow unused from gpui2, vim2 tests and terminal_view2 (#3813)
Release Notes:

- N/A
2023-12-26 01:23:08 +01:00
Joseph T. Lyons
41fb29bc5a
Tidy up main (#3812)
Release Notes:

- N/A
2023-12-25 07:45:39 -05:00
Piotr Osiewicz
ee57658abe Fix up superfluous mod declaration 2023-12-25 13:30:27 +01:00
Joseph T. Lyons
12fe64b177 Fix more warnings 2023-12-25 07:02:19 -05:00
Piotr Osiewicz
904358263c
Remove #[allow(unused)] annotations in zed2 crates (#3798)
Release Notes:

- N/A
2023-12-25 12:23:44 +01:00
Joseph T. Lyons
8f3ea6ccb3 Remove silencing of warnings and fix warnings 2023-12-25 03:47:28 -05:00
Joseph T. Lyons
ada1da48ca Remove already-implemented comment 2023-12-25 03:47:03 -05:00
Joseph T. Lyons
6c21683ed0
Wire up journal (#3811)
Release Notes:

- N/A
2023-12-25 03:42:19 -05:00
Joseph T. Lyons
88d05fd814 Wire up journal 2023-12-25 03:36:54 -05:00
Joseph T. Lyons
11d3526f10
Migrate from device_id to installation_id key (#3810)
This PR is just a quick house-cleaning PR that I've been meaning to do
for awhile. In the past, `installation_id` was called `device_id`. But
this name never reflected what it actually was - so we renamed it to
`installation_id`, but we kept the name as `device_id` in the
`kv_store`. I'm wanting to use the `device_id` key in the future, so to
keep things clearly labeled, I'm doing the key rename now.

Release Notes:

- N/A
2023-12-23 22:38:35 -05:00