Commit Graph

216 Commits

Author SHA1 Message Date
Nathan Sobo
c95aecdd53 Merge branch 'main' into cells 2023-08-08 21:23:57 -06:00
Nathan Sobo
db96fb1307 Merge remote-tracking branch 'origin/main' into paint-context 2023-08-08 18:27:16 -06:00
Nathan Sobo
0a4633f88f Remove more window id usage 2023-08-08 11:20:09 -06:00
Nathan Sobo
da7dc9c880 Work with window handles instead of ids in drag code 2023-08-08 11:14:02 -06:00
Mikayla
8980a9f1c1
Add settings for removing the assistant and collaboration panel buttons
Add a not-logged-in state to the collaboration panel

co-authored-by: max <max@zed.dev>
2023-08-07 16:27:47 -07:00
Nathan Sobo
379652f074 Merge branch 'main' into cells 2023-08-03 19:33:04 -06:00
Nathan Sobo
afcc0d621b WIP 2023-08-03 17:03:39 -06:00
Nathan Sobo
884cee6dfd Get tests compiling returning WindowHandle<V: View> from add_window 2023-08-02 14:05:03 -06:00
Mikayla Maki
354c020612
Block extra drag events in original drag handlers 2023-07-26 14:57:46 -07:00
Nathan Sobo
c602d98680 WIP 2023-07-26 13:34:57 -06:00
Nathan Sobo
1b03c5d69c Pass PaintContext to Element::paint
I want to use this on another branch, but it's a sweeping change,
so this prepares the ground for it. This can always be reverted if
it doesn't work out.
2023-07-25 17:32:31 -06:00
Kirill Bulatov
f05095a6dd Focus project panel on directory select 2023-07-23 00:12:25 +03:00
Kirill Bulatov
dcaf8a9af8 Open paths starting with ~ from terminal click 2023-07-22 01:34:25 +03:00
Kirill Bulatov
33921183dc Avoid extra blinking on mouse moves 2023-07-18 22:59:41 +03:00
Kirill Bulatov
10db05f87f Rework terminal highlight event flow 2023-07-18 22:59:41 +03:00
Kirill Bulatov
94358ffb16 Use lines and columns from the file url strings 2023-07-18 22:59:41 +03:00
Kirill Bulatov
82a9d53c8a Only highlight the openable things 2023-07-18 22:59:41 +03:00
Kirill Bulatov
6349d90cac Properly open project directories 2023-07-18 22:59:41 +03:00
Kirill Bulatov
6123c67de9 Detect and open URLs properly 2023-07-18 22:59:41 +03:00
Kirill Bulatov
23f25562b5 Map initial approach to string opening 2023-07-18 22:59:41 +03:00
Kirill Bulatov
f52722b6a4 Properly handle Cmd press for terminal highlights 2023-07-18 22:59:41 +03:00
Kirill Bulatov
75d900704e Refactor terminal highlights and open mechanisms
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-07-18 22:59:41 +03:00
Kirill Bulatov
ccc78000bd Preserve serach index for multicaret selection editor events 2023-07-14 14:47:12 +03:00
Kirill Bulatov
29cbeb39bd Allow selecting all search matches in buffer 2023-07-14 14:47:12 +03:00
Mikayla Maki
9165320390
Fix a bug where the terminal would not be closed by the terminal exiting (#2706)
Release Notes:

- Fixed a bug where terminal tabs in the panel would not close on tty
process exit.
2023-07-11 12:23:26 -07:00
Mikayla Maki
550aa2d6bd
fmt 2023-07-11 12:17:50 -07:00
Mikayla Maki
be881369fa
Fix a bug where the terminal panel's items wouldn't be hooked up properly to workspace actions 2023-07-11 12:12:37 -07:00
Kirill Bulatov
4b4d049b0a Refactor LSP restart logic
Instead of storing `initialization_options` in every LSP adapter as
before, store previous LSP settings in `Project` entirely.

This way, we can later have use multiple different project
configurations per single LSP with its associated adapter.

co-authored-by: Max Brunsfeld <max@zed.dev>
2023-07-11 21:56:55 +03:00
Mikayla Maki
5366631173
Remove on_click_out handler from context menu
Add 'delay_cancel()' method and on_down handler to relevant buttons
2023-06-29 17:10:51 -07:00
Nathan Sobo
23bc11f8b3 Remove the nested Pane from the assistant
Since we don't want tabs, I think it would be better to render the toolbar
for ourselves directly and handle switching between conversations.

Co-Authored-By: Julia Risley <julia@zed.dev>
2023-06-20 18:52:48 -06:00
Antonio Scandurra
7a78e64831 Merge remote-tracking branch 'origin/main' into assistant-2 2023-06-06 19:18:22 +02:00
Joseph Lyons
7c60f636d5 Fix typos 2023-06-02 22:02:19 -04:00
Antonio Scandurra
d0aff65b1c Allow moving the assistant panel to other docks 2023-06-02 10:55:19 +02:00
Mikayla Maki
40c6baf7cb
Redraw the terminal on every wakeup
co-authored-by: max <max@zed.dev>
2023-06-01 10:49:31 -07:00
Max Brunsfeld
788f97ec68
Add support for folder-specific settings (#2537)
This PR allows you to customize Zed's settings within a particular
folder by creating a `.zed/settings.json` file within that folder.

Todo

* [x] respect folder-specific settings for local projects
* [x] respect folder-specific settings in remote projects
* [x] pass a path when retrieving editor/language settings
* [x] pass a path when retrieving copilot settings
* [ ] update the `Setting` trait to make it clear which types of
settings are locally overridable

Release Notes:

* Added support for folder-specific settings. You can customize Zed's
settings within a particular folder by creating a `.zed` directory and a
`.zed/settings.json` file within that folder.
2023-05-31 16:27:08 -07:00
Max Brunsfeld
3f6aa94a5f Use active color for zoom button in a zoomed pane 2023-05-31 12:51:57 -07:00
Mikayla Maki
0122cd61c5
fmt 2023-05-30 16:33:42 -07:00
Mikayla Maki
9c707eff27
Rework new terminal actions 2023-05-30 16:10:07 -07:00
Max Brunsfeld
89446c7fd4 Start work on respecting project-specific settings 2023-05-29 14:25:49 -07:00
Antonio Scandurra
6d3464fd1f Make Pane::add_item a proper Pane method
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-05-29 19:16:22 +02:00
Antonio Scandurra
aa8c0475b1 Don't show navigation controls for terminal panel 2023-05-25 15:15:20 +02:00
Antonio Scandurra
414b97adce Add search bar to terminal panel 2023-05-25 14:46:10 +02:00
Antonio Scandurra
f67a22828b Show keystroke in panel tooltips
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-05-24 16:13:58 +02:00
Antonio Scandurra
0cf1632d39 Only focus new terminal if the panel contains focus
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-05-24 16:04:02 +02:00
Antonio Scandurra
e5fd953b4f Provide tooltips for pane buttons 2023-05-24 11:18:30 +02:00
Antonio Scandurra
1a353ad25d Show maximize/minimize icon for panes and terminal panel 2023-05-24 11:00:12 +02:00
Joseph Lyons
e6857866d4 Update terminal panel tooltip 2023-05-23 22:23:38 -04:00
Antonio Scandurra
10e947cb5f Persist project and terminal panel sizes 2023-05-22 15:55:44 +02:00
Antonio Scandurra
146809eef0 Merge branch 'main' into panels 2023-05-22 14:10:17 +02:00
Nathan Sobo
986eafd84e Enable test-support on editor in tests 2023-05-20 09:54:38 -06:00
Antonio Scandurra
5ff49bde31 Serialize and deserialize TerminalPanel 2023-05-19 19:26:32 +02:00
Antonio Scandurra
e49281699c Add new terminal when the terminal panel is activated, and not on focus 2023-05-19 16:07:47 +02:00
Max Brunsfeld
42eca3048f Move font size adjustment code to the theme crate 2023-05-17 15:56:32 -07:00
Max Brunsfeld
2d5f03e148 Remove optional path argument when getting settings 2023-05-17 15:05:20 -07:00
Max Brunsfeld
67a25126d4 Define theme/ui text style settings in theme crate 2023-05-17 14:44:59 -07:00
Antonio Scandurra
05fb051924 Store whether a panel is zoomed in the panel itself
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2023-05-17 17:51:11 +02:00
Antonio Scandurra
f097444546 Rebind ctrl-` to toggle terminal panel focus
Also, add `ctrl-~` to create new terminals.

Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2023-05-17 17:35:10 +02:00
Antonio Scandurra
981129ef8e Show a panel/pane as zoomed only if it's the active item in workspace 2023-05-17 15:06:58 +02:00
Max Brunsfeld
6403bb86e1 Define workspace settings in workspace crate 2023-05-16 20:25:18 -07:00
Antonio Scandurra
f87ae6032e Don't rely on action propagation for zooming in and out
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-05-16 10:34:50 -06:00
Antonio Scandurra
c03e470fe6 Introduce Panel::can_zoom 2023-05-15 17:10:30 +02:00
Nathan Sobo
214354b4da Make panels independently resizable 2023-05-12 09:44:14 -06:00
Max Brunsfeld
bc5b78198a Define terminal settings in terminal crate 2023-05-10 17:43:10 -07:00
Antonio Scandurra
0ccb4a50e6 Create more specific dock position settings associated with each panel 2023-05-10 16:52:10 +02:00
Antonio Scandurra
f28eee88b6 Add context menu to change panel position 2023-05-10 14:05:48 +02:00
Nathan Sobo
9173916ab8 Remove unused terminal_button module 2023-05-09 20:24:37 -06:00
Nathan Sobo
ba248244ec Allow terminal to be docked left, bottom, or right
Co-Authored-By: Joseph Lyons <joseph@zed.dev>
2023-05-09 17:36:49 -06:00
Nathan Sobo
6a7feb4c4c Allow the project panel to be docked right or left
Co-Authored-By: Joseph Lyons <joseph@zed.dev>
2023-05-09 17:26:54 -06:00
Nathan Sobo
6645323f1b WIP 2023-05-09 13:28:34 -06:00
Antonio Scandurra
8f12489937 WIP: Allow panels to be moved
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-05-09 18:57:25 +02:00
Antonio Scandurra
641f5d1107 Ensure ctrl-` works in the terminal panel 2023-05-09 17:38:18 +02:00
Antonio Scandurra
634b699281 Allow customization of Pane tab bar buttons 2023-05-09 15:05:29 +02:00
Antonio Scandurra
26fe7a81f3 Prevent splits in the terminal panel 2023-05-09 12:29:16 +02:00
Antonio Scandurra
e6be35c9a5 Show terminal count in panel button 2023-05-09 12:21:35 +02:00
Antonio Scandurra
506f978c41 Automatically close terminal dock when the last terminal was closed 2023-05-09 10:18:11 +02:00
Antonio Scandurra
916612caf1 Prevent dragging items that aren't terminals to the terminal panel 2023-05-09 10:18:11 +02:00
Antonio Scandurra
6ddc610fa2 WIP: Start on TerminalPanel 2023-05-09 10:18:11 +02:00
Nathan Sobo
1ddbda5095 Rename DockItem to Panel 2023-05-09 10:18:11 +02:00
Nathan Sobo
03f8c1206a Rename Sidebar to Dock 2023-05-09 10:18:10 +02:00
Nathan Sobo
1919a826f9 Remove dock from workspace 2023-05-09 10:18:10 +02:00
Antonio Scandurra
b9ed327b94 Replace usages of is_parent_view_focused with is_self_focused
Previously, this was used because we didn't have access to the current
view and `EventContext` was an element-only abstraction. Now that the
`EventContext` wraps the current view's `ViewContext` we can simply check
for the view's focus and avoid querying ancestors.
2023-05-05 10:08:22 +02:00
Antonio Scandurra
80ad59a620 Make focusing the parent an effect to avoid querying ancestors 2023-05-05 10:04:54 +02:00
Antonio Scandurra
da19edc3e3 Merge branch 'main' into implicit-ancestry 2023-05-04 14:39:58 +02:00
Antonio Scandurra
3d679ddb26 Avoid re-allocating KeymapContext after every view notification 2023-05-04 12:04:30 +02:00
Antonio Scandurra
e9ed40da37 Remove the ability to retrieve the view's parent 2023-05-03 16:52:55 +02:00
Antonio Scandurra
7f137ed3dd Compute view ancestry at layout time 2023-05-03 16:36:14 +02:00
Antonio Scandurra
7f345f8bf5 Separate Window::build_scene into layout and paint 2023-05-03 12:18:16 +02:00
Antonio Scandurra
c4472b0786 Remove ViewContext::dispatch_action 2023-05-01 16:27:36 +02:00
Antonio Scandurra
1d41a703ad Remove internal actions from terminal_button 2023-04-28 17:29:17 +02:00
Antonio Scandurra
e1535735b8 Remove DeployContextMenu internal action 2023-04-28 16:51:01 +02:00
Antonio Scandurra
5521ff1b22 Allow passing a handler function to context menu items 2023-04-27 11:32:12 +02:00
Antonio Scandurra
2b6830c798 Remove unnecessary calls to WeakViewHandle::upgrade 2023-04-26 11:13:46 +02:00
Antonio Scandurra
94c2eaad23 Replace ViewContext::spawn with ViewContext::spawn_weak 2023-04-26 10:23:27 +02:00
Max Brunsfeld
ebbe52e6b0 🎨 Specify more dependencies at the workspace level 2023-04-24 17:41:55 -07:00
Max Brunsfeld
abdccf7393 Use a workspace dependency for the futures crate 2023-04-24 09:43:31 -07:00
Mikayla Maki
8e0d359c63
Merge branch 'main' into fix-nondeterministic-terminal-test 2023-04-22 11:17:06 +12:00
Mikayla Maki
d841c3729b Wire through the gutter, rather than implicitly adding it 2023-04-21 16:12:33 -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
f54a289b6f Remove handle to view from TerminalElement
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-04-21 16:56:06 +02:00