Commit Graph

181 Commits

Author SHA1 Message Date
Antonio Scandurra
83070a19c4 WIP 2023-04-12 15:55:43 +02:00
Nathan Sobo
95eb918b4c Fix broken test due to trimmed trailing whitespace during formatting 2023-04-06 16:10:39 -06:00
Nathan Sobo
de9bf6dfbd Merge MutableAppContext into AppContext
There may have been a good reason for the difference at some point, or I was
still learning Rust. But now it's just &mut AppContext vs &AppContext.
2023-04-06 15:49:03 -06:00
Mikayla Maki
0b0c7e4ce9 Move command palette filter into collections crate
Filter out copilot commands from command palette when not active
2023-03-28 20:13:17 -07:00
Antonio Scandurra
5471217089 Use the same serde version across the entire workspace 2023-03-28 09:42:00 -07:00
Joseph T. Lyons
e10338ed17
Merge pull request #2313 from zed-industries/unify-spelling-of-key-binding-to-be-two-words
Unify spelling of `key binding` to be two words
2023-03-27 15:58:12 -04:00
Max Brunsfeld
eaee5571a0 Use a more stable, readable serialization format for neovim-backed vim tests 2023-03-22 14:31:11 -07:00
Joseph Lyons
9d88cd8842 Unify spelling of key binding to be two words 2023-03-22 13:34:12 -04:00
Antonio Scandurra
1af8f4be19 Deserialize Theme directly into the heap to avoid stack overflow
Co-Authored-By: Julia Risley <julia@zed.dev>
2023-03-17 15:58:52 +01: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
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
2276d25bdf Fix enter in normal mode acting incorrectly 2023-02-23 13:40:31 -08:00
Kay Simmons
57a7ff9a6f fix vim percent motion to better match the docs and observed behavior 2023-02-17 14:55:19 -08:00
Kay Simmons
eac33d732e wip 2023-02-16 12:23:45 -08:00
Kay Simmons
bef2013c7f wip 2023-02-15 14:40:14 -08:00
Kay Simmons
0ba051a754 use more predictable rules for selecting which bracket to jump to and where 2023-02-15 14:04:16 -08: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
Mikayla Maki
d060114f00 Added complete scripts for generating third party license files 2023-01-23 12:47:12 -08:00
Kay Simmons
cf193154e1 fix broken test 2023-01-17 17:35:39 -08:00
Kay Simmons
c3518cefe8 disable vim mode in non full editors 2023-01-17 17:32:10 -08:00
Kay Simmons
216b1aec08 fix replace in normal and visual modes 2023-01-11 14:57:40 -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
Kay Simmons
e61a38b3a9 remove printline 2022-12-08 14:45:22 -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
Kay Simmons
1cc3e4820a working serialized writes with panics on failure. Everything seems to be working 2022-12-03 16:06:01 -08:00
Mikayla Maki
3451a3c7fe Rebase - Got Zed compiling and fixed a build error due to conflicting dependencies that cargo didn't catch :(
Co-Authored-By: kay@zed.dev
2022-12-03 16:04:10 -08:00
Max Brunsfeld
718f802157 Implement Copy for multibuffer anchors 2022-11-28 14:18:49 -08:00
Nathan Sobo
275f0ae492 collab 0.2.3 2022-11-15 15:45:04 -07:00
Kay Simmons
3d5a3634cf
Merge pull request #1867 from zed-industries/drag-project-entry-to-pane
Drag project entry to pane
2022-11-10 17:25:22 -08:00
Kay Simmons
738893c527 Split and move to pane working 2022-11-08 14:19:31 -08:00
Mikayla Maki
53f8744794 Tried alternate stratergy 2022-11-08 11:54:26 -08:00
Kay Simmons
b6c5c7871e Addresses issue where left motion in vim mode would clip in the wrong direction 2022-11-04 15:21:29 -07:00
Kay Simmons
4977acf6a5 fix some vim mode bugs around deletions and failed motions 2022-11-02 01:20:11 -07:00
Kay Simmons
0cd2d9a9c8 added new supported feature 2022-11-01 13:15:14 -07:00
K Simmons
782676dc67 fix jump to line number in vim mode 2022-10-25 00:39:40 -07:00
K Simmons
64e9b9f893 remove mode after which is unused 2022-10-24 18:31:26 -07:00
K Simmons
21ad375b42 Fix panic in vim motion when not listed as exclusive and add features enum to capture why tests are ignored 2022-10-24 18:27:56 -07:00
K Simmons
40c3e925ad Add cursor blink setting and replicate cursor shape to remote collaborators 2022-10-17 16:20:47 -07:00
Max Brunsfeld
6cdf4e98fc Re-export basic text types from text and language crates
Also avoid production dependencies on fs and rope in collab
2022-10-12 15:48:19 -07:00
Mikayla Maki
b1f64d9550 Updated new vim tests with new rope crate 2022-10-11 20:25:39 -07:00
Mikayla Maki
41590ef64b
Merge branch 'main' into test-branch 2022-10-11 19:55:32 -07:00
K Simmons
d1f1eb9a29 Add count argument to motion functions and add ability to jump to a given line 2022-10-11 16:27:54 -07:00
Mikayla Maki
0beb97547e Finished refactoring out fs and rope 2022-10-11 15:25:54 -07:00
K Simmons
673041d1f5 working quote and bracket text objects 2022-10-11 15:17:29 -07:00
K Simmons
6a237deb21 Add some tests for portions of visual text objects. Note: they are slightly broken currently as described in the tests 2022-10-10 15:32:12 -07:00
K Simmons
d2494822b0 Add assertion context manager to TestAppContext and convert existing vim tests to use neovim backed test context 2022-10-10 14:46:07 -07:00
K Simmons
5fec8c8bfd Enable verifying of visual mode selections in neovim backed tests 2022-10-09 01:19:22 -07:00
K Simmons
f90b693ed5 fix some warnings and merge errors 2022-10-08 23:49:04 -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
K Simmons
b88abcacac WIP dock split button and default item 2022-09-11 15:31:44 -07:00
ForLoveOfCats
8ba2f77148 One big cleanup pass of clippy lints
Co-authored-by: Mikayla <mikayla@zed.dev>
2022-08-10 16:51:01 -07:00
Max Brunsfeld
26fdaeb92b Use new marked ranges format whenever we don't need overlapping ranges 2022-08-04 10:23:03 -07:00
Max Brunsfeld
afcf5fc95b Update vim mode tests to use new marked text format 2022-08-03 17:52:34 -07:00
Max Brunsfeld
868c460620 🎨 Rename and simplify some autoindent stuff 2022-07-28 22:40:30 -07:00
Max Brunsfeld
7a26fa18c7 Record start columns when writing to the clipboard from Zed 2022-07-28 22:13:32 -07:00
Max Brunsfeld
3a74290359 Merge branch 'main' into autoindent-on-paste 2022-07-28 15:09:18 -07:00
Max Brunsfeld
fa5af4383d Introduce AutoindentMode parameter to Buffer::edit
This controls whether or not we preserve the relative indentation
of inserted text blocks.

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
2022-07-28 14:03:31 -07:00
Antonio Scandurra
f0814c7784 Fix vim tests using old key bindings 2022-07-27 12:19:01 +02:00
Antonio Scandurra
7b009c8bbe Merge branch 'main' into ime-support-2 2022-07-22 16:03:38 +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
a77cf914ec Fix failing test re mode switch in buffer search 2022-07-19 17:18:17 -07:00
K Simmons
1cfaac1bc5 Fix clipping when dragging the mouse with vim-mode enabled and adjust single line editor selections 2022-07-19 17:18:17 -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
2a6e23ff28 Hoisted assert clipboard into TestAppContext 2022-07-07 14:55:25 -07:00
Keith Simmons
ed52f8a8a3 WIP making paste better 2022-07-05 16:52:56 -07:00
Keith Simmons
229bc94ac3 remove partial edit from normal.rs 2022-07-05 16:48:12 -07:00
Keith Simmons
956dd0c2bc fix error with reverse range marked text ranges 2022-07-05 16:44:45 -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
Keith Simmons
c9d23dba6c Update command palette filter from vim mode more proactively 2022-06-29 11:58:12 -07:00
Keith Simmons
f6292437fa Add command palette filter global and update it when vim mode is enabled/disabled 2022-06-28 13:35:43 -07:00
Max Brunsfeld
7bb7187619 Add tests and fix bugs for editor indent/outdent commands w/ hard tabs 2022-06-09 10:26:09 -07:00
Max Brunsfeld
436c989e4b
Merge pull request #1109 from zed-industries/fix-vim-clearing-selections
Avoid collapsing selections on editor creation when vim_mode is disabled
2022-06-06 10:32:12 -07:00
Antonio Scandurra
3a69943df3 Require that PartialEq is implemented for Action 2022-06-06 09:18:44 +02:00
Antonio Scandurra
492cc716d3 Don't manipulate selections when syncing options if vim-mode is disabled
Previously, we were always mutating selections when `sync_editor_options`
was called. This seems to happen every time vim is enabled/disabled, but also
when vim is disabled and editors are simply focused/blurred.

This commit changes it so that we only manipulate selections when vim-mode is active.
2022-06-06 08:14:49 +02:00
Max Brunsfeld
905fbacbc7 vim: Avoid collapsing selections on editor creation when vim_mode is disabled 2022-06-04 15:01:43 -07:00
Antonio Scandurra
339069b1d3 Cap MessageStream buffer size to 1MB
We temporarily let it grow when the message size exceed the limit,
but restore the buffer's capacity shortly after. This ensures that,
for each connection in its entire lifetime, we only ever use 1MB.
2022-05-31 11:16:32 +02:00
Max Brunsfeld
42cd2ae142 Avoid switching to visual mode when following in vim mode
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-05-26 17:02:05 -07:00
Keith Simmons
d11bc2a4b7 Fixup paste locations 2022-05-26 17:02:05 -07:00
Keith Simmons
98f9575653 WIP 2022-05-26 17:02:05 -07:00
Keith Simmons
e93c49f4f0 Unify visual line_mode and non line_mode operators 2022-05-26 17:02:05 -07:00
Keith Simmons
11569a869a in progress working on aborting operators on unhandled editor input 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
33940b5dd9 Add visual line mode operator tests 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
d094d1d891 WIP copy on delete 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
Max Brunsfeld
ef0b584532 Remove AppState from workspace actions
This allows those actions to be bound to keystrokes in the keymap.
Also, remove the WorkspaceParams struct, simplify how Workspaces are
constructed.
2022-05-19 14:37:26 -07:00
Keith Simmons
45ea3d4c38 Review fixes 2022-05-13 15:55:27 -07:00
Keith Simmons
20c97637a4 minor tweaks to selections collection api 2022-05-13 15:55:27 -07:00
Keith Simmons
de9dc27980 store buffer and display_map model handles on selections collection 2022-05-13 15:55:27 -07:00
Keith Simmons
db0a9114c2 Passing tests and removed local argument. Also pulled autoscroll argument out to change_selections 2022-05-13 15:55:27 -07:00
Keith Simmons
c9dcfff607 Move selection helpers to SelectionCollection, add update_anchor_selections, add a number of invariant preserving mutation functions to the MutableSelectionCollection 2022-05-13 15:55:17 -07:00