Commit Graph

355 Commits

Author SHA1 Message Date
Mikayla Maki
dd73233973
Merge pull request #2386 from zed-industries/copilot-shipping
Get copilot ready to ship
2023-04-20 12:38:27 +12:00
Mikayla Maki
ea1c3fa7a0 Only fire completion cycling requests if specifically asked for by the user 2023-04-19 15:21:30 -07:00
Petros Amoiridis
f9c60b98c0
Add newline above and improve newline below
Add a new action for inserting a new line above the current line. @ForLoveOfCats  also helped fix a bug among other things. When two collaborators had their cursors at the end of a line, and one collaborator performed a newline below action, the second collaborator's cursor would be dragged to the new line. This is also fixing that.

Co-Authored-By: Julia <30666851+ForLoveOfCats@users.noreply.github.com>
2023-04-19 19:57:23 +03:00
Joseph Lyons
5e55eb279c Update copy path commands 2023-04-07 02:36:56 -04:00
Mikayla Maki
1627cf7eae Add standard copilot keybinding 2023-04-03 16:14:07 -07:00
Mikayla Maki
48d9c30b0e Remove per-file copilot enable/disable 2023-04-03 15:15:42 -07:00
Mikayla Maki
ebd06b43f5 Add copilot settings
Add copilot pause / resume
Add copilot statusbar item stub
2023-03-29 16:40:52 -07:00
Antonio Scandurra
093e0a30e9 Replace editor::CycleCopilotSuggestions with copilot::NextSuggestion 2023-03-28 09:42:01 -07:00
Joseph Lyons
a252c2a15b Swap atom keybinding for CollapseSelectedEntry
This is a temporary solution to this bug:

https://linear.app/zed-industries/issue/Z-340/the-project-panel-shouldnt-be-listening-to-key-commands-when-editing-a
2023-03-16 15:59:14 -04:00
Antonio Scandurra
e45d680126
Merge pull request #2272 from zed-industries/add-textmate-keymap
Add TextMate keymap
2023-03-13 14:26:32 +01:00
Joseph Lyons
c8696149b8 Add TextMate keymap 2023-03-13 08:27:04 -04:00
Joseph Lyons
90bca1b94a Add default keybindings for reveal in finder 2023-03-12 04:58:17 -04:00
Mikayla Maki
37d01c7fb3
Merge pull request #2199 from zed-industries/welcome-experience
Welcome experience
2023-03-10 10:48:30 -08:00
Antonio Scandurra
ce828d55d5 Bind language_selector::Toggle to cmd-k m
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-03-10 16:32:18 +01:00
Mikayla Maki
19fc143209 Add base keymap setting
Format all files

Co-Authored-by: Nathan <nathan@zed.dev>
2023-03-07 12:19:51 -08:00
Kay Simmons
184f37015a add go to definition binding to vim normal mode 2023-02-27 10:23:30 -08:00
Mikayla Maki
350b7b82f7
Merge pull request #2207 from zed-industries/project-panel-actions
Fix project panel actions
2023-02-23 14:31:29 -08:00
Mikayla Maki
8860346324 Fix broken dock command 2023-02-23 14:15:29 -08:00
Mikayla Maki
9004640586 Convert keymap context to use generics and Cow<'static> so we don't have to add .to_string() and .into() for each usage 2023-02-23 14:10:55 -08:00
Kay Simmons
03498314fa
Merge pull request #2211 from zed-industries/hover-binding
add hover binding from vscode
2023-02-23 14:05:28 -08:00
Kay Simmons
ce4b672a14 add hover binding from vscode 2023-02-23 13:50:43 -08:00
Kay Simmons
3f9405f8f1
Merge pull request #2210 from zed-industries/fix-enter-vim-normal-mode
Fix enter in normal mode acting incorrectly
2023-02-23 13:46:15 -08:00
Kay Simmons
2276d25bdf Fix enter in normal mode acting incorrectly 2023-02-23 13:40:31 -08:00
Mikayla Maki
f6601f64e5 Added editor-in-project-panel overrides to the default keymap 2023-02-23 09:36:30 -08:00
Max Brunsfeld
d33d27faa4 Fix ToggleContactsMenu action name in keymap
Co-authored-by: Joseph Lyons <joseph@zed.dev>
2023-02-22 14:17:59 -08:00
Kay Simmons
04df00b221 Iterate over keymap then dispatch path when matching keybindings to make precedence more intuitive
Rename action which adds the active tab to the dock to be more intuitive
Add action which moves the active tab out of the dock and bind it to the same keybinding
2023-02-18 13:10:01 -08:00
Joseph T. Lyons
a4a179763a
Merge pull request #2171 from zed-industries/add-option-to-advance-cursor-downward-when-toggling-comment
Add option to advance cursor downward when toggling comment
2023-02-16 15:03:38 -05:00
Max Brunsfeld
7037842bef Put back shift-escape binding for FocusDock action 2023-02-15 13:57:07 -08:00
Joseph Lyons
5fbc9736e5 Add option to advance cursor downward when toggling comment
Co-Authored-By: Julia <30666851+ForLoveOfCats@users.noreply.github.com>
2023-02-15 14:00:49 -05:00
Antonio Scandurra
4a2b7e4820 Use alt-z to toggle soft wrap in active editor
When there isn't a default soft-wrapping for the active editor, we
will soft wrap at the editor width. This is consistent with Visual
Studio Code.
2023-02-14 15:16:06 +01:00
Kay Simmons
459060764a fix sqlez warning, introduce tab and enter bindings to vim for inputing tab and enter text when waiting for text 2023-02-13 13:50:37 -08:00
Kay Simmons
3d53336916 More vim fixes and move some more things out of app.rs 2023-02-13 13:50:37 -08:00
Kay Simmons
c1812ddc27 fix issue with single line editors in vim not properly unhooking vim mode bindings 2023-02-13 13:50:37 -08:00
Joseph Lyons
d42d495cb0 Remove toggle right sidebar command 2023-02-11 21:53:10 -05:00
Mikayla Maki
ea39983f78 Removed old experiments settings and staff mode flag, added new StaffMode global that is set based on the webserver's staff bit 2023-01-27 15:43:12 -08:00
Mikayla Maki
ca2e0256e1 Renamed open recent action to match menu 2023-01-27 15:38:48 -08:00
Max Brunsfeld
3312a06368 Move focus back from buffer search using tab, not cmd-f 2023-01-16 16:01:15 -08:00
Kay Simmons
14eec66e38 in progress 2023-01-11 12:10:55 -08:00
Kay Simmons
73e7967a12 working f and t bindings 2023-01-06 14:24:20 -08:00
Joseph Lyons
60f29410ca Add close clean items command 2022-12-29 13:28:52 -05:00
Joseph Lyons
ca3c4566dd Add close all items command 2022-12-29 01:43:49 -05:00
Joseph Lyons
21a0df406f Add home and end key support 2022-12-26 00:24:26 -05:00
Kay Simmons
81e3b48f37 Add keybinding 2022-12-14 16:14:16 -08:00
Kay Simmons
2cf48c03f9 fix final failing tests 2022-12-08 14:39:48 -08:00
Kay Simmons
cffb064c16 Refactor editor scrolling and implement scroll commands from vim mode 2022-12-07 16:39:32 -08:00
Mikayla Maki
3c53fcdb43 Added alt-left: move word left and alt-right: move word right in the terminal for for antonio 2022-11-16 09:59:23 -08:00
Mikayla Maki
537d4762f6 Added more autoscroll behaviors 2022-11-08 11:35:12 -08:00
Julia
c4b21a0ab5 Add action to go to next/previous git diff in editor
Co-Authored-By: Kay Simmons <kay@zed.dev>
2022-10-28 15:08:13 -04:00
Julia
ba35536664 Add action to move active item into the dock
Co-Authored-By: Kay Simmons <kay@zed.dev>
2022-10-24 23:30:35 -07:00
Mikayla Maki
d301a215f7 Finished implementing vscode, emacs, and mac style pageup/down. Added keybindings ctrl-v, alt-v for emacs up/down and shift-pageup, shift-pagedown for vscode style. Also improved incorporated pageup/down into context menus 2022-10-14 13:52:30 -07:00
Max Brunsfeld
89f05ada0b Allow toggling collaboration menu from the keyboard 2022-10-12 14:14:03 -07:00
Kay Simmons
81a3a22379
Merge pull request #1685 from zed-industries/vim-text-objects
Vim Text Objects and Numeric Repitions
2022-10-11 16:36:19 -07:00
K Simmons
673041d1f5 working quote and bracket text objects 2022-10-11 15:17:29 -07:00
K Simmons
0d31ea7cf2 fix minor issue where undo is not available in visual mode 2022-10-10 15:34:40 -07:00
K Simmons
515c1ea123 Fixed some neovim test context issues, added repeated commands in vim mode, and ported some tests to use the neovim testing strategy 2022-10-08 21:52:07 -07:00
K Simmons
b82db3a254 Adds word and sentence text objects along with a new vim testing system which uses cached neovim data to verify our test accuracy 2022-10-08 21:51:49 -07:00
Antonio Scandurra
40163da679 Move contacts panel features into collab_ui 2022-10-06 14:00:14 +02:00
Mikayla Maki
75594fc3e3
Merge pull request #1659 from zed-industries/terminal-selections
Terminal Touch ups
2022-09-26 20:58:36 -07:00
Mikayla Maki
9a59603065 Added a SendKeystroke action and rewrote terminal actions to remove duplication 2022-09-26 20:39:40 -07:00
Julia
f3395cf4fd Add editor action to manually invoke buffer format 2022-09-22 18:21:05 -04:00
K Simmons
da05e340b8 Fix dock keybindings 2022-09-16 16:41:57 -07:00
K Simmons
1ce48f4a94 Minor improvements to dock visuals, rework dock keybindings, and fix panic on split when dock is active 2022-09-16 12:55:36 -07:00
K Simmons
0b5952e1bd Fix incorrect rendering of toolbar in right anchored dock
Make dock keybinding activate the dock if it wasn't hidden, and hide it if it was already active
Make clicking the expanded dock wash, hide the dock
Fix some issues with programmatically activating other panes, not hiding the dock
Tweak dock anchor menu text
Swap dock hide button for thin variant
Fix dock sidebar interactions
Add clicked state to search button and fix presenter issue sending clicked events when mouse not overlapping MouseRegion

Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2022-09-13 15:17:27 -07:00
K Simmons
59fd967793 Swapped keyboard binding and did some minor tweaks to style and focus 2022-09-11 15:31:44 -07:00
Mikayla Maki
334ca4f420 Fixed keymap file 2022-09-08 16:42:00 -07:00
Mikayla Maki
7571899f08 Added internal keymaps as well, just for the hell of it 2022-09-08 16:37:04 -07:00
Mikayla Maki
5a0f106005 restore modal terminal 2022-08-31 13:06:15 -07:00
Mikayla Maki
093ab96f84 Added experimental keybinding for the modal terminal 2022-08-22 15:38:07 -07:00
Mikayla Maki
0a40cc0370 Added experimental keymaps support 2022-08-22 14:49:01 -07:00
Mikayla Maki
b6785c5624
Revert "Basic feature flag implementation" 2022-08-22 13:54:18 -07:00
Mikayla Maki
9b6116e1e2 Basic feature flag implementation 2022-08-22 13:11:23 -07:00
Mikayla Maki
bf7b3150e4 Added show character palette. Need to position correctly. 2022-08-16 23:10:05 -07:00
Antonio Scandurra
545f12362c Rename {project_panel,contacts_panel}::Toggle to ToggleFocus 2022-08-15 14:53:42 +02:00
Antonio Scandurra
b94366ab90 Add zed::ToggleFullScreen bound to ctrl-cmd-f 2022-08-15 11:53:37 +02:00
Mikayla Maki
314c26e4ec Removed icons 2022-08-04 08:42:42 -07:00
Mikayla Maki
bf0ec13e65 New button 2022-08-03 15:59:25 -07:00
Julia
b0dc487fdf
Merge pull request #1460 from zed-industries/insert-newline-below
Add `newline_below` action
2022-08-03 14:56:01 -04:00
Mikayla Maki
f34d686aa5
Merge pull request #1461 from zed-industries/touch-ups
Touch ups
2022-08-03 10:20:04 -07:00
ForLoveOfCats
f9dc14be43 Add newline_below action 2022-08-03 11:34:40 -04:00
Antonio Scandurra
7cbf76ce80 Implement default macOS menu items
- `Zed -> Hide`, bound to `cmd-h`
- `Zed -> Hide Others`, bound to `alt-cmd-h`
- `Zed -> Show All`
- `Window -> Minimize`, bound to `cmd-m`
- `Window -> Zoom`
2022-08-03 15:13:30 +02:00
Mikayla Maki
b87805a0d1 Added key binding 2022-08-02 16:37:14 -07:00
ForLoveOfCats
5149c15329 Add "go to type definition" action 2022-07-29 11:41:08 -04:00
Antonio Scandurra
5c5e7db587 Fix vim keybindings containing the shift modifier
They regressed as part of https://github.com/zed-industries/zed/pull/1405.
2022-07-27 09:31:47 +02:00
Antonio Scandurra
ca3e73106c Merge branch 'main' into ime-support-2 2022-07-25 10:47:49 +02:00
Antonio Scandurra
136550de9f Discard shift when it causes keyboard to output a different character 2022-07-22 08:15:44 +02:00
Max Brunsfeld
2142fca673 Remove Input action, detect ignored input in vim via an event 2022-07-21 13:40:48 -07:00
K Simmons
95952f0c66 working diagnostic popover. Also renamed GoToNextDiagnostic to GoToDiagnostic and adjusted it's action to jump to the popover's diagnostic if it is visible 2022-07-20 19:02:33 -07:00
Antonio Scandurra
456a390166 Add character palette menu item 2022-07-19 14:51:57 +02:00
Mikayla Maki
98651c4b86 New key mapping system in place and working 2022-07-14 17:21:30 -07:00
Mikayla Maki
79b7dcb596 Basic keybindings infra done 2022-07-13 16:32:25 -07:00
Mikayla Maki
7885234fbc Added clear screan command 2022-07-13 13:19:21 -07:00
Mikayla Maki
4f9d88f3e0 Made a quick fix for modal issues, better solution pending rewrite 2022-07-13 13:06:23 -07:00
Keith Simmons
667d031ec8
Merge pull request #1311 from zed-industries/fix-visual-paste
Fix visual paste
2022-07-08 16:54:10 -07:00
Keith Simmons
ee007f901a fix pasting at the end of the line in normal mode 2022-07-08 10:57:02 -07:00
Mikayla Maki
7c0d9f411a Added copying 2022-07-07 14:55:03 -07:00
Keith Simmons
ed52f8a8a3 WIP making paste better 2022-07-05 16:52:56 -07:00
Keith Simmons
9b36e3d009 Highlight matching bracket when newest selection head is on a bracket 2022-07-01 15:06:16 -07:00
Keith Simmons
66486870aa Fix vim editor focus selection issues, cancel vim operators on escape and unbound keys 2022-06-30 12:36:02 -07:00
Mikayla Maki
2ee57c1512
Merge pull request #1255 from zed-industries/terminal-fr
WIP: Terminal
2022-06-30 11:30:28 -07:00
Max Brunsfeld
f22d69aa74 Add other standard macOS bindings for switching to next/prev tab 2022-06-29 15:33:46 -07:00
Max Brunsfeld
581c9af395 Adjust pane, tab, panel management bindings to match VS Code 2022-06-29 15:33:46 -07:00
Mikayla Maki
93dfc63f1c Added a test with max, cludged a fix for resizing 2022-06-29 13:07:44 -07:00
Mikayla Maki
e3834409dd Fixed focus issues with scrolling and input 2022-06-28 18:28:13 -07:00
Mikayla Maki
24d671ed3f First bits of polish 2022-06-28 15:45:27 -07:00
Mikayla Maki
9e55c60b6a working on selection and scrolling in terminals 2022-06-28 15:45:27 -07:00
Mikayla Maki
31bc758f35 Forgot to commit last night 2022-06-28 15:45:27 -07:00
Mikayla Maki
b36bf0c56d Finally on solid conceptual ground, able to move ahead confidently with Alacritty code 2022-06-28 15:45:27 -07:00
Antonio Scandurra
0652542f60 Introduce pane::ReopenClosedItem bound to cmd-shift-t 2022-06-27 17:44:33 +02:00
Antonio Scandurra
9defbf7c76 Bind CloseInactiveItems to alt-cmd-t 2022-06-16 14:42:55 +02:00
Antonio Scandurra
88d8696414 Display tooltip for select prev/next match buttons 2022-06-16 14:37:33 +02:00
Antonio Scandurra
649185da9c Allow toggling search options via the command palette 2022-06-16 14:28:37 +02:00
Antonio Scandurra
a835dcefa2 Toggle buffer search options via the keyboard 2022-06-16 13:44:00 +02:00
Antonio Scandurra
da1eb91935 Replace pane::Split action with Split{Left,Up,Right,Down}
This allows us to show them in the command palette.
2022-06-15 13:06:59 +02:00
Keith Simmons
a6c0ee472c Add vim bindings for hover
Allow scrolling in hover popover
2022-06-07 13:07:53 -07:00
Antonio Scandurra
20e1044d49 Merge branch 'main' into project-panel-with-new-mouse-events 2022-05-30 18:29:46 +02:00
Antonio Scandurra
6c145b2abc Show keystrokes as uppercase 2022-05-30 12:23:03 +02:00
Max Brunsfeld
e1a05d451f Add "Reset Zoom" action and application menu item 2022-05-27 13:06:12 -07:00
Keith Simmons
e93c49f4f0 Unify visual line_mode and non line_mode operators 2022-05-26 17:02:05 -07:00
Keith Simmons
61f0daa5c5 Visual line mode handles soft wraps 2022-05-26 17:02:05 -07:00
Keith Simmons
082036161f Enable copy and paste in vim mode 2022-05-26 17:02:05 -07:00
Keith Simmons
f8f316cc64 Working change and delete in line mode 2022-05-26 17:02:05 -07:00
Keith Simmons
d7d17b2148 WIP line mode operations 2022-05-26 17:02:05 -07:00
Antonio Scandurra
eedb29963c Implement CopyPath 2022-05-26 16:45:41 +02:00
Max Brunsfeld
7f92401bca Add key binding and menu item for Save All 2022-05-23 16:06:56 -07:00
Max Brunsfeld
21206800bc Add "Close Window" command 2022-05-20 16:53:03 -07:00
Max Brunsfeld
b08cad9ef5 Add "Save As" command 2022-05-20 16:24:42 -07:00
Max Brunsfeld
e72f5cea22 Add "New Window" command 2022-05-20 11:01:20 -07:00
Max Brunsfeld
de99dcb0c3 Add cmd-n and cmd-o to the default keymap 2022-05-19 14:39:06 -07:00
Max Brunsfeld
7445197f4d Derive application menu key equivalents from the keymap 2022-05-19 10:04:01 -07:00
Max Brunsfeld
ec41dd9f18 Remove checked-in theme JSON files
* Generate the themes on build
* In debug builds, watch the theme sources. When they change, re-generate
  the themes and reload the current theme, removing the need for the
  `theme_selector::Reload` command.

Co-authored-by: Keith Simmons <keith@zed.dev>
2022-05-18 12:43:26 -07:00
Antonio Scandurra
c7802af88b Use cmd-9 and cmd-shift-9 to toggle contacts panel focus/visibility 2022-05-12 12:11:27 +02:00
Keith Simmons
6c57fcf9be
Merge pull request #968 from zed-industries/vim-visual-mode
Vim visual mode
2022-05-10 12:51:58 -07:00
Keith Simmons
37c921f972 Initial visual mode 2022-05-10 11:12:28 -07:00
Max Brunsfeld
4b1c46fa45 Allow deleting entries from the project panel 2022-05-04 18:00:23 -07:00
Max Brunsfeld
8fdc5c9be3 Improve the appearance of project panel filename editor
* Always layout single-line editors with a fixed height
* Preserve directory chevron when editing folder names
* Allow theming the filename editor

Co-authored-by: Antonio Scandurra <me@as-cii.com>
2022-05-04 10:28:44 -07:00
Antonio Scandurra
aa4919a76f
Merge pull request #964 from zed-industries/transpose
Introduce `Editor::transpose` bound to `ctrl-t`
2022-05-04 10:04:55 +02:00
Antonio Scandurra
070607c821 Implement Editor::transpose without accounting for multi-byte chars 2022-05-03 14:33:43 +02:00
Keith Simmons
b2138f5935 Add insert line above and below 2022-05-02 11:49:10 -07:00
Keith Simmons
833a7b6e76 WIP just missing insert line above and below 2022-05-02 11:49:10 -07:00
Max Brunsfeld
ec6652af73 Remove some novel key bindings
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-04-25 11:56:03 -07:00
Keith Simmons
c61ae6f31f
Merge pull request #877 from zed-industries/misc-normal-commands
Add inclusive vs exclusive motions to vim mode
2022-04-22 14:25:56 -07:00
Nathan Sobo
30f2604a8d Map shift-backspace to backspace
A user pointed out that it was weird that this didn't work and violated their muscle memory.
2022-04-22 06:04:12 -06:00
Keith Simmons
5ea782de21 Add inclusive vs exclusive motions to vim mode 2022-04-21 16:50:23 -07:00
Max Brunsfeld
14cf51638c 🎨 Tweak order of default key bindings 2022-04-21 15:28:15 -07:00
Max Brunsfeld
490b65b55f Reuse Confirm action in chat panel, go-to-line, and project search 2022-04-21 15:24:05 -07:00
Max Brunsfeld
d43f194342 Organize default key bindings into categories 2022-04-21 14:07:14 -07:00
Max Brunsfeld
066b4faf61 Restructure KeyMap file, make it easy to edit in Zed
Add a JSON schema for this file so that autocomplete can be used for the actions.
2022-04-21 13:35:10 -07:00
Max Brunsfeld
3bbc021a7e Use Picker in Outline view 2022-04-18 17:11:39 -07:00
Max Brunsfeld
4630071f58 Start work on a command palette 2022-04-18 17:11:08 -07:00
Keith Simmons
63278041e1 Add c and d operators to vim normal mode
Extracted motions from normal mode
Changed vim_submode to be vim_operator to enable better composition of operators
2022-04-15 16:05:50 -07:00
Max Brunsfeld
2ea2ba358f Add back toggle sidebar key bindings 2022-04-13 11:14:10 -07:00
Max Brunsfeld
1e0182f6c7 Add back key binding for confirming completions with tab 2022-04-13 10:35:05 -07:00
Max Brunsfeld
949fbe7cd3 Allow dumping the project diagnostic view's state as JSON
Also, improve DebugElements action so that it shows the JSON in an editor.

Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-04-11 19:51:46 -07:00
Max Brunsfeld
add0dad6d7 Use '*' to represent the default context in keymap files
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-04-11 17:17:03 -07:00
Max Brunsfeld
c065f283aa Move assets to their own crate, load keymaps in vim tests
Also, move assets folder to the top-level.

Co-authored-by: Keith Simmons <keith@zed.dev>
2022-04-11 15:54:52 -07:00