Commit Graph
1122 Commits
Author SHA1 Message Date
Antonio Scandurra becae9feee Pull out buffer into its own crate 2021-10-04 16:50:12 +02:00
Antonio Scandurra 034aed053c Extract a clock subcrate for logical clocks 2021-10-04 14:34:02 +02:00
Nathan Sobo 5b75fcd0aa 💄 2021-10-02 19:46:07 -06:00
Nathan Sobo 6239b5ec60 Introduce ProjectPath and ProjectEntry structs
These replace tuples of (usize, Arc<Path>) and (usize, usize) respectively.
2021-10-02 19:39:04 -06:00
Nathan Sobo f00045544f Introduce a File trait object to buffer
This will remove the dependency of buffer on `worktree::File`
2021-10-02 19:01:29 -06:00
Nathan SoboandMax Brunsfeld 7728467790 Remove File::select_language
We want to make File a trait object defined in the buffer crate to decouple buffer from worktree, and this method is in the way.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-10-01 16:56:28 -07:00
Nathan SoboandMax Brunsfeld 90cc01a50a Select the language in Editor::save_as instead of Buffer::did_save
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-10-01 17:38:08 -06:00
Nathan SoboandMax Brunsfeld fcf6a9d58a Move Buffer::save_as to Editor
This removes buffer's dependency on Worktree, preparing the path for us to pull it into its own crate.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-10-01 17:32:22 -06:00
Nathan SoboandMax Brunsfeld 74a47a1384 Extract fuzzy module to its own crate
We still have a fuzzy module in the zed crate with some app-specific logic.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-10-01 17:08:19 -06:00
Nathan SoboandMax Brunsfeld 626fd2a2aa Fix warnings
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-10-01 16:45:24 -06:00
Nathan SoboandMax Brunsfeld 706925b781 Move fuzzy::match_paths to Project::match_paths
This prepares the way to extract the rest of fuzzy to its own crate.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-10-01 16:44:08 -06:00
Nathan SoboandMax Brunsfeld cf270b4dff Extract sum_tree to its own crate
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-10-01 15:55:21 -06:00
Max Brunsfeld 2b3e5945c6 Add key bindings to toggle the project panel
- Use `cmd-1` to open the project panel and toggle focus between it and the workspace center.
- Use `cmd-shift-1` to open or close the project panel.
2021-09-30 15:26:14 -07:00
Max Brunsfeld 8dcd38c25a Fix ProjectPanel test failure 2021-09-30 15:02:27 -07:00
Max BrunsfeldandNathan Sobo 6007fa6ab3 Style the active entry in the project panel
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-09-30 14:16:28 -07:00
Max BrunsfeldandNathan Sobo fef0bdf6c3 Don't autoscroll the project panel when worktree changes
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-09-30 13:44:07 -07:00
Max BrunsfeldandNathan Sobo 5fb112ac4c Vertically align root folder in project panel with tabs and sidebar icons
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-09-30 13:30:24 -07:00
Max BrunsfeldandNathan Sobo 6fba17a5e1 Add disclosure arrows to the project panel
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-09-30 10:24:52 -07:00
Nathan Sobo 18a379f20c Scope the left and right bindings in the project panel 2021-09-30 10:50:58 -06:00
Antonio Scandurra 41fea2de1c Open buffer when trying to expand a file 2021-09-30 16:19:24 +02:00
Antonio Scandurra e98731876c 💄 2021-09-30 16:00:01 +02:00
Antonio Scandurra 2f508af017 Rename active entry to selected entry 2021-09-30 14:41:12 +02:00
Antonio Scandurra 19325fd3f1 Allow expanding/collapsing active entry using the keyboard 2021-09-30 14:38:21 +02:00
Antonio Scandurra 789d5dfaee Allow selecting prev and next entries via the keyboard 2021-09-30 14:13:07 +02:00
Antonio Scandurra 7a1cdc9ad1 Fix panic when rendering multiple worktrees in project panel 2021-09-30 10:39:15 +02:00
Max Brunsfeld d182182ae2 Avoid ProjectPanel panic when worktree has no root entry
Also, avoid bug where too many UniformList elements were rendered.
2021-09-29 22:08:31 -07:00
Antonio Scandurra 1519e1d45f Maintain active entry Project and render it in ProjectPanel 2021-09-29 17:05:03 +02:00
Antonio Scandurra 67c40eb4be Allow opening entries from project panel 2021-09-29 13:08:27 +02:00
Antonio Scandurra e030917769 Refine project panel styling 2021-09-29 11:32:06 +02:00
Nathan SoboandMax Brunsfeld bd7bf82d18 Load .gitignore files from the Fs object so we can test this with a FakeFs
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-09-28 13:21:19 -06:00
Nathan SoboandMax Brunsfeld dde782a006 Remove top/bottom padding from project panel
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-09-28 12:26:26 -06:00
Nathan SoboandMax Brunsfeld 14bc2c6857 Fix scrolling of project panel
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-09-28 12:26:15 -06:00
Nathan Sobo a3f45c0d3b Merge branch 'worktree-cursor' into project-browser 2021-09-28 12:13:47 -06:00
Nathan SoboandMax Brunsfeld 60799c5a7c 💄
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-09-28 12:03:11 -06:00
b9b08879f2 Get tests passing
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-09-28 11:23:09 -06:00
Antonio Scandurra 366552f3bb Use Bias::Left when traversing by path 2021-09-28 13:42:46 +02:00
Nathan Sobo c3e8a5baa0 Unify all worktree traversal in a Traversal cursor/iterator
This uses our new ability to have a SeekTarget that's distinct from Dimension.
2021-09-27 21:58:22 -06:00
Max BrunsfeldandNathan Sobo ab31ddfc31 Allow seeking SumTree cursor by multiple seek types per dimension
Also, remove the cursor's sum_dimension. Replace it with a
blanket implementation of Dimension for two-element tuples
of dimensions.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-09-24 18:23:53 -07:00
Max BrunsfeldandNathan Sobo 443a7826bb Start work on expanding and collapsing directories in project panel
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-09-24 15:12:49 -07:00
Max Brunsfeld 7eda614c4a Start work on ProjectPanel 2021-09-23 18:14:15 -07:00
Max Brunsfeld d561f50ab1 Extract from Workspace a Project model that stores a window's worktrees 2021-09-23 16:34:06 -07:00
82ec1b73e0 Flush pending selection before performing any action on all selections
Closes #155

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-09-23 11:20:56 -07:00
Antonio Scandurra 286846cafd Merge pull request #179 from zed-industries/rpc-protocol-version
Forbid connections from outdated clients
2021-09-23 18:26:12 +02:00
Antonio ScandurraandNathan Sobo e32f1f8b80 Create test_app_state with FakeFs instead of RealFs
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-09-23 18:17:49 +02:00
Antonio ScandurraandNathan Sobo 2352725c58 💄
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-09-23 17:32:37 +02:00
Antonio Scandurra 374b05a379 Display warning in titlebar when Zed is out-of-date 2021-09-23 15:36:32 +02:00
Antonio Scandurra 511cbaa2bd Version the zrpc protocol using a X-ZRPC-VERSION header 2021-09-23 15:35:35 +02:00
Antonio Scandurra 9efd8ce323 Exclude ignored entries when sharing a worktree
This commit also adds a randomized test that exercises building and
applying snapshot updates.
2021-09-23 11:20:53 +02:00
Antonio Scandurra d07ff73999 Bump PathEntry::scan_id when the ignore status of an entry changes 2021-09-23 11:20:53 +02:00
Max Brunsfeld 1402f842f7 Adjust word-boundary motion, treating whitespace more like other editors
Also, fix the behavior of 'delete_to_{prev,next}_word_boundary' commands when
there are non-empty selections.
2021-09-22 17:00:57 -07:00