Commit Graph
100 Commits
Author SHA1 Message Date
Kirill Bulatov eb9ddef083 Always show full command on terminal tab hover (#3934)
Deals with https://github.com/zed-industries/community/issues/1856

Release Notes:

- Fixed terminal tab tooltip being truncated
2024-01-07 13:52:56 +02:00
Kirill Bulatov d566a0df5a Always show full command on terminal tab hover 2024-01-07 13:46:44 +02:00
Kirill Bulatov 419b4d029c External file drag and drop (#3933)
Deals with https://github.com/zed-industries/community/issues/1317
Deals with https://github.com/zed-industries/community/issues/486

Reworks pane drag and drop code to support 
* dropping external files into main pane (supports splits same as tabs
and project entries drop) — this will open the file dropped
* dropping external files, tabs and project entries drop into the
terminal — this will add file abs path into the terminal

Release Notes:

- Added a way to drag and drop external files into Zed main & terminal
panes; support tabs and project entries drop into terminal pane
2024-01-07 13:37:49 +02:00
Kirill Bulatov df937eaeeb Use fs to determine if file path is a dir 2024-01-07 13:32:09 +02:00
Kirill Bulatov 4f88a50aad On external file drop, add visible project entries for directories only 2024-01-07 03:11:28 +02:00
Kirill Bulatov c499e1ed38 Fix panic during terminal tab drag and drop 2024-01-07 02:32:15 +02:00
Kirill Bulatov 518868a12f Implement terminal pane drag and drop overrides 2024-01-07 02:21:43 +02:00
Kirill Bulatov c4e306162c Implement external file drop in pane 2024-01-07 01:18:02 +02:00
Kirill Bulatov 8ff05c6a72 Prepare for external file drop in pane 2024-01-07 01:17:49 +02:00
Kirill Bulatov ec035724d5 Properly detect file finder label positions in paths (#3931)
Deals with https://github.com/zed-industries/community/issues/2367

Release Notes:

- Fixed file finder crashing on certain paths with multi-codepoint
characters
([#2367](https://github.com/zed-industries/community/issues/2367))
2024-01-06 23:59:34 +02:00
Kirill Bulatov 5dca1b5943 Properly detect file finder label positions in paths 2024-01-06 23:50:59 +02:00
Kirill Bulatov db4a0b14c0 Fix low handing styling fruits on the collab panel (#3928)
Release Notes:

- N/A
2024-01-06 13:04:54 +02:00
Kirill Bulatov d86ccb1afc Reduce the height of the collaborators' color ribbon 2024-01-06 12:54:54 +02:00
Kirill Bulatov ae14f7bd92 Add space between menus and player stack 2024-01-06 12:07:48 +02:00
Kirill Bulatov ee336cb87f Add spaces between leave call and call status icons, and call status icons and user menu 2024-01-06 11:56:01 +02:00
Kirill Bulatov b8134518d8 Fix base keymap selector keyboard shortcuts (#3927)
Release Notes:

- Fixed base keymap selector keyboard shortcuts
2024-01-06 11:53:08 +02:00
Kirill Bulatov 0d7f3ef278 Fix base keymap selector keyboard shortcuts 2024-01-06 11:39:27 +02:00
Kirill Bulatov 621c98b886 Restore collab button tooltips, make screenshare item background of editor background's color (#3924)
Release Notes:

- Restored collab button tooltips, made screenshare item background of
editor background's color
2024-01-06 02:07:27 +02:00
Kirill Bulatov 669293e749 Screenshare item background is now of editor background's color 2024-01-06 02:01:12 +02:00
Kirill Bulatov e549ef0ee9 Restore tooltipts for all collab buttons 2024-01-06 01:50:59 +02:00
Kirill Bulatov 94d0fe9ff0 Fix current lsp logs menu item not shown as selected (#3916)
Release Notes:

- Fixed current LSP logs menu item not shown as selected
2024-01-05 19:29:12 +02:00
Kirill Bulatov 12b5dbff68 Fix current lsp logs menu item not shown as selected 2024-01-05 19:23:15 +02:00
Kirill Bulatov 5935979a96 Set a minimum size for the search input field (#3912)
Release Notes:

- Show search input field wider for narrow panes
2024-01-05 18:46:48 +02:00
Kirill Bulatov 6cc48b97dd Set a minimum size for the search input field 2024-01-05 18:41:40 +02:00
Kirill Bulatov bf11a04410 Remove extra dbg!'s 2024-01-05 17:48:07 +02:00
Kirill Bulatov 3070a6ef26 Return back git status colors for tab labels 2024-01-05 12:38:42 +02:00
Kirill Bulatov fbf2f790dd Return back old project search behavior as default. (#3892)
Add a `workspace::DeploySearch` action and use it as a default for
"cmd-shift-f" binding. This action opens existing search tab if it
exists, or creates a new one otherwise. `workspace::NewSearch` action is
still available and always opens an existing search tab.

Release Notes:

- Added a `workspace::DeploySearch` action and use it as a default for
"cmd-shift-f" binding. `workspace::NewSearch` action is still available
and always opens an existing search tab.
2024-01-05 11:35:28 +02:00
Kirill Bulatov 4dbec66cdd Return back old project search behavior as default.
Add a `workspace::DeploySearch` action and use it as a default for "cmd-shift-f" binding.
This action opens existing search tab if it exists, or creates a new one otherwise.
`workspace::NewSearch` action is still available and always opens an existing search tab.
2024-01-04 21:17:24 +02: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
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>::new::{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
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
Kirill Bulatov 894a033520 Add a horizontal separator between history and query file finder matches (#3808)
To avoid confusion with the way file results are matched, add a
separator between history and query matches in file finders.

Release Notes:

- N/A
2023-12-23 23:23:49 +02:00
Kirill Bulatov 1096eeff3a Add a horizontal separator between history and query file finder matches 2023-12-23 22:33:52 +02:00
Kirill Bulatov 1f603afbc1 Hide pane tab bar buttons in certain contexts (#3807)
* entirely remove history navigation buttons in the terminal pane that
allows terminal elements only
* hide the entire tab bar if no active item is in pane (as in zed1)
* hide +/split/zoom buttons when the pane is not in focus (as in zed1)

Release Notes:

- N/A
2023-12-23 22:27:41 +02:00
Kirill Bulatov a249375f99 Do not show nav history buttons in terminal pane 2023-12-23 22:10:11 +02:00
Kirill Bulatov e839dc5ee6 Hide pane tab bar for 0 items, hide its end buttons for no focus 2023-12-23 21:53:08 +02:00
Kirill Bulatov a1915ce6c4 Add spacing to terminal tab bar buttons 2023-12-23 02:29:33 +02:00
Kirill Bulatov e1d8e2001b Properly color file labels in project panel (#3794)
Also fixes an error with mouse listeners placement in
https://github.com/zed-industries/zed/pull/3792

Release Notes:

- N/A
2023-12-23 02:01:55 +02:00
Kirill Bulatov c6f3f439c4 Fix mouse listeners' z-index for editor 2023-12-23 01:55:40 +02:00
Kirill Bulatov 9600337d81 Properly color file labels in project panel 2023-12-23 01:27:41 +02:00
Kirill Bulatov a1bd636c18 Fix multibuffer scroll by reordering z-index of its elements (#3792)
1. Blocks (with their headers) and mouse listeners should be drawn
together otherwise either starts to loose mouse events.

2. Scrollbar should be above all to match zed1 look and avoid buffer
headers popping slightly to the right of the scrollbar.

Release Notes:

- N/A
2023-12-22 23:07:10 +02:00
Kirill Bulatov 764a2755e2 Fix multibuffer scroll by reordering z-index of its elements
1. Blocks (with their headers) and mouse listeners should be drawn together otherwise either starts to loose mouse events.

2. Scrollbar should be above all to match zed1 look and avoid buffer headers popping slightly to the right of the scrollbar.
2023-12-22 22:56:35 +02:00
Kirill Bulatov 2f4cedbd53 Remove the old code 2023-12-22 18:43:57 +02:00
Kirill Bulatov a03306fd01 Fix enter, tab and shift-tab behavior in project search 2 2023-12-22 18:43:02 +02:00
Kirill Bulatov 5de32f7b0b Do not display a getting start message when the project is open 2023-12-22 18:06:23 +02:00
Kirill Bulatov 4e3337f1c9 Restore zoom buttons in pane tab bars, fix + button in the terminal one (#3780)
Release Notes:

- N/A
2023-12-22 15:48:38 +02:00
Kirill Bulatov 420253a752 Restore zoom buttons in pane tab bars, fix + button in the terminal one 2023-12-22 15:32:47 +02:00
Kirill Bulatov e3eafdba59 Move multibuffer "go to file" button into the buffer header (#3777)
Release Notes:

- N/A
2023-12-22 12:24:51 +02:00
Kirill Bulatov 4d5ff77abe Fix the tests 2023-12-22 12:14:53 +02:00
Kirill BulatovandAntonio Scandurra d36ec81725 Move multibuffer "go to file" button into the buffer header
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-12-22 12:02:44 +02:00
Kirill Bulatov fce31b7ddf Remove the warnings from element.rs 2023-12-22 12:02:44 +02:00
Kirill Bulatov 6c4670287d Highlight termina on external files drag and drop 2023-12-22 10:45:51 +02:00
Kirill Bulatov 8dc691fd6f Fix Zed2 cli actions: opening notes and joining calls (#3754)
Release Notes:

- N/A
2023-12-21 14:34:14 +02:00
Kirill Bulatov b14c07ca54 Fix Zed cli actions: opening notes and joining calls 2023-12-21 14:27:13 +02:00
Kirill Bulatov 87a1387f9a For file finder queries, match in all gitignored worktree entries (#3748)
Deals with https://github.com/zed-industries/community/issues/2347
Part of https://github.com/zed-industries/community/issues/1538

Now file finder will match all gitignored worktree entries.
Zed does not traverse gitignored dirs by default, which means that not
all gitignored files will be matches, but all that were toggled in
project panel and all root non-directory gitignored entries will be now
used, hopefully causing less questions.

Release Notes:

- Improved file finder to match all gitignored files that were added
into worktrees (e.g. due to opening gitignored directories in project
panel)
2023-12-21 02:34:34 +02:00
Kirill Bulatov 2f56fe9129 For file finder queries, search in all gitignored worktree entries 2023-12-21 02:21:27 +02:00
Kirill Bulatov 8238edb5aa Remove nightly from zed1 and use proper namespaces for nightly in zed2 manifest (#3745)
Currently, I get 404 when trying to open links for nightly, like
https://zed.dev/nightly/channel/Rooms-329
The PR ensures nightly has a separate protocol handler in zed2, removes
nightly mentions from zed1.

See also zed.dev change:
https://github.com/zed-industries/zed.dev/pull/429

Release Notes:

- N/A
2023-12-21 01:24:57 +02:00
Kirill Bulatov 2cd7d2db46 Remove nightly from zed1 and use proper namespaces for nightly in zed2 manifest 2023-12-21 01:18:00 +02:00
Kirill Bulatov 56f2b963ef Restore "reveal in project panel" and "search in directory" context menu actions (#3744)
Release Notes:

- N/A
2023-12-21 01:12:06 +02:00
Kirill Bulatov 72c8beae30 Restore "reveal in project panel" and "search in directory" context menu actions 2023-12-21 01:07:05 +02:00
Kirill Bulatov e72f56c432 Port language_tools crate to gpui2 (#3673)
Add back a way to show syntax trees and LSP logs in Zed.

Release Notes:

- N/A
2023-12-20 18:34:40 +02:00
Kirill Bulatov fc923a2a98 Close syntax tree view menu on click too 2023-12-20 18:28:32 +02:00
Kirill Bulatov 331af82cb1 Rework context menu's custom element API to handle clicks properly 2023-12-20 18:23:09 +02:00
Kirill Bulatov 19d1568140 Lsp log selector fixes 2023-12-20 18:23:09 +02:00
Kirill BulatovandAntonio Scandurra fe40e3920b Fix remaining z-index bugs
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-12-20 18:23:09 +02:00
Kirill Bulatov 1474816a93 Syntax tree panel style fixes 2023-12-20 18:23:08 +02:00
Kirill Bulatov 7b83d65deb Remove temporary imports, fix syntax_tree_view 2023-12-20 18:23:08 +02:00
Kirill Bulatov 6a90a76bf2 Use stock gpui2 ui components 2023-12-20 18:23:08 +02:00
Kirill Bulatov 3586bf8b6b Display something 2023-12-20 18:23:08 +02:00
Kirill Bulatov c1f8929e43 Add new panels into zed2 2023-12-20 18:23:08 +02:00
Kirill Bulatov 7e6dac383e Uncomment tests 2023-12-20 18:23:08 +02:00
Kirill Bulatov 8471a5f80b Finish all but the styling 2023-12-20 18:23:08 +02:00
Kirill Bulatov 75074c3297 Apply more fixes to the visual part 2023-12-20 18:23:08 +02:00
Kirill Bulatov 676a07270e First fixes 2023-12-20 18:23:08 +02:00
Kirill Bulatov 64925231b0 Create a new crate 2023-12-20 18:23:08 +02:00
Kirill BulatovandAntonio Scandurra cf12d62fc5 Tidy up z-index handling
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-12-19 23:50:42 +02:00
Kirill Bulatov f6d31917c1 Optimize stack id in-memory layout 2023-12-19 23:31:17 +02:00
Kirill BulatovandAntonio Scandurra 8f1c5375ef Fix more z-index and rendering issues
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-12-19 23:30:17 +02:00
825a8f0927 Initial fix of the z-index
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-12-19 23:29:08 +02:00
Kirill Bulatov 4b74f30d0a Properly restore termina current dir when deserializing the project 2023-12-19 06:44:26 +02:00
Kirill Bulatov 11e657803e Fix worktree panic for out-of-worktree files being opened (#3690)
Fixes
https://zed-industries.slack.com/archives/C04S6T1T7TQ/p1702865855729989

Release Notes:

- Fixed certain files excluded from worktrees causing panics when being
opened
2023-12-18 13:30:46 +02:00
Kirill Bulatov 7e21e0f0eb Do not panic on non-worktree file indexing 2023-12-18 13:10:26 +02:00
Kirill Bulatov 83b55de73e zed2: Restore buffer search deploy & focus behavior (#3670)
In zed1, cmd-f either opened the search buffer, or focused into it if it
was open already. Search query got updated, if any selection was made on
the moment of cmd-f call.

The PR restores that behavior and also

* fixes a bug when opened diagnostics error always got pasted
* comments out the panic on multibuffer separator click 
* removes extra stdout & stderr debug logging

Release Notes:

- N/A
2023-12-15 12:33:45 +02:00
Kirill Bulatov 4bfe46f53a Restore zed1 behavior for buffer search deploy 2023-12-15 12:23:03 +02:00
Kirill Bulatov 31ff7d40ed Adjust copy/paste buffer only on the copy error action trigger 2023-12-15 11:34:00 +02:00
Kirill Bulatov a6403aad1a Remove extra nits, do not panic on clicking the buffer separator 2023-12-15 11:28:48 +02:00
Kirill Bulatov cfe7336519 Return include warnings toggle to the diagnostics panel 2023-12-14 10:00:31 +02:00
Kirill Bulatov 4684440202 Fix focus issues with gpui2 docks (#3606)
* Fixed dock toggling not focusing the terminal element
* Fixed loosing focus on dock close (e.g. cmd-d on the last terminal in
the dock)
* Removed element stateless focus API since it would not work when the
element is not rendered, update all API usages to the stateful one via
`gpui::Subscription`

Release Notes:

- N/A
2023-12-12 17:26:39 +02:00
Kirill BulatovandAntonio 0140bb862e Fix the tests
Co-authored-by: Antonio <antonio@zed.dev>
2023-12-12 17:19:12 +02:00
Kirill Bulatov ca8e8d1065 Finish removing all dangerous focus APIs 2023-12-12 16:11:14 +02:00
Kirill BulatovandAntonio 2cde1a2e15 Re-focus window on workspace on corresponding window blur
Co-authored-by: Antonio <antonio@zed.dev>
2023-12-12 15:36:20 +02:00
Kirill Bulatov 717b2885f8 Attempt to remove the dangeous element focus API 2023-12-12 15:07:27 +02:00
Kirill BulatovandAntonio 137104e00e Fix dock panels not focusing their contents on toggle
Co-authored-by: Antonio <antonio@zed.dev>
2023-12-12 15:07:27 +02:00
Kirill Bulatov 706dd8246e Improve project panel autoreveal ergonomics (#3604)
Part of
https://linear.app/zed-industries/issue/Z-1386/add-equivalent-setting-to-vscodes-auto-reveal-exclude
Deals with https://github.com/zed-industries/community/issues/800

* add a `project_panel::auto_reveal_entries` config entry to allow
disabling auto reveal in project panel (auto reveal is enabled by
default)
* add a `pane::RevealInProjectPanel` action (and a pane tab context menu
entry) to manually reveal any file entry
* stop auto revealing gitignored directories at all

We can add the auto reveal exclude globs later, if needed, but let's try
to keep the config simpler and start with a more minimalist approach.

Release Notes:

- Improved project panel auto reveal mechanics: gitignored files are not
auto revealed anymore; a `auto_reveal_entries = true` config option for
`project_panel` is added; a `pane::RevealInProjectPanel` action and a
corresponding buffer tab context menu were added
2023-12-12 14:37:30 +02:00
Kirill Bulatov d9b0828beb Port to gpui2 2023-12-12 13:50:23 +02:00
Kirill Bulatov 721d7615c3 Add tests 2023-12-12 13:34:46 +02:00