Commit Graph
820 Commits
Author SHA1 Message Date
Nathan Sobo 3f5db7284d Remove shared_worktrees map from ClientState
Each worktree instance now handles its own messages.
2021-08-18 19:16:40 -06:00
Nathan SoboandMax Brunsfeld 37f24d10ec Subscribe to worktree messages at the entity level
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-18 19:06:46 -06:00
Nathan SoboandMax Brunsfeld ef421d735d Implement broadcast of typed envelopes
This required a rework of the macro so that we can always construct a typed envelope from our list of available message types from incoming protobuf envelopes.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-18 13:12:27 -06:00
541f58e12c Start on subscribing to messages in channel entity instances
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-08-18 11:45:29 -06:00
Nathan Sobo 5b599a32b8 WIP 2021-08-06 16:06:03 -06:00
Max Brunsfeld ff822c9158 wip 2021-08-06 14:47:18 -07:00
Nathan Sobo d9ab406961 Merge pull request #123 from zed-industries/fix-word-boundary-movement-multibyte
Fix moving to next word boundary with multi-byte characters
2021-08-05 08:59:20 -06:00
Max BrunsfeldandNathan Sobo d37a98782e Improve border parsing in themes
The `top`, `left`, `bottom` and `right` fields are optional.
If none are specified, then they are all set to true.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-04 17:19:42 -07:00
Nathan SoboandMax Brunsfeld 522fac9690 Fix compile error in tests
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-04 17:56:38 -06:00
Nathan SoboandMax Brunsfeld 1a21902460 Move fuzzy mod out of worktree
We now match against arbitrary strings in addition to paths.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-04 17:46:53 -06:00
Nathan Sobo 593afb2d9e Change reload theme binding 2021-08-04 17:34:15 -06:00
Nathan Sobo 039dae064c Remove logging 2021-08-04 17:09:15 -06:00
Nathan Sobo 85a076312a Merge branch 'main' into theme-variables 2021-08-04 16:47:43 -06:00
Nathan Sobo d484d80238 Match file finder icon color to label color 2021-08-04 16:17:33 -06:00
Nathan Sobo 33a8942c8b Pull empty selector label styling from correct place in theme 2021-08-04 16:12:15 -06:00
Nathan Sobo 7494a395ed Specify tab padding in theme 2021-08-04 16:08:15 -06:00
Nathan SoboandMax Brunsfeld 4d947580b1 Reload current theme on cmd-k shift-T
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-04 15:52:23 -06:00
Max BrunsfeldandNathan Sobo 8238c87481 Test bundled themes and store names on themes
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-04 14:16:28 -07:00
Max BrunsfeldandNathan Sobo 802f1f4e78 Get new theme structure working
* Fix precedence of extends directives
* Always group color with font properties for text theming

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-04 14:07:19 -07:00
Nathan Sobo 5761756fb4 Move remaining theme-related code and tests from settings mod to theme mod 2021-08-03 19:42:39 -06:00
Nathan SoboandMax Brunsfeld 90b51c3356 Implement themes::ThemeRegistry::get
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-03 19:35:15 -06:00
Nathan SoboandMax Brunsfeld ca9862fff1 Start on new theme::ThemeRegistry
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-08-03 18:51:06 -06:00
Max Brunsfeld 81041d7841 Restructure Theme with new style objects 2021-08-03 13:36:58 -07:00
Max BrunsfeldandNathan Sobo ef0ffbe819 Use custom color wrapper type everywhere in gpui & zed
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-03 12:48:58 -07:00
Max BrunsfeldandNathan Sobo fa01273466 Extract {Container,Label}Style structs from those elements
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-03 11:07:03 -07:00
Nathan Sobo 200e278bc9 💄 2021-08-02 20:07:48 -06:00
Nathan Sobo 4c53470800 Notify all views when a theme is selected 2021-08-02 16:57:10 -06:00
Max BrunsfeldandNathan Sobo b30d0daabf Add a theme picker
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-02 14:55:27 -07:00
Max BrunsfeldandNathan Sobo 76c07fb232 Make Theme::default have a non-empty replica theme vector
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-08-02 13:09:43 -07:00
Antonio Scandurra d5ec0c8feb Fix moving to next word boundary with multi-byte characters
Previously, for a given point, we would create a char iterator at
the start of the row and the skip `column` characters. This is
however incorrect because display points are expressed in bytes,
and so we could park the anchor midway through a multi-byte character.

This commit fixes the issue by switching `DisplayMap::chars_at` to
take a point instead and skipping characters correctly when a point with
a non-zero column is provided.
2021-08-02 14:11:31 +02:00
Max Brunsfeld 92353b6967 Start work on allowing variables in themes 2021-07-30 17:28:22 -07:00
Nate 6a03f9368b Ship new Zed icon! 2021-07-30 19:34:35 -04:00
Max Brunsfeld eb05103d2d Fix saving an untitled file outside of any existing worktree 2021-07-30 14:19:42 -07:00
Max Brunsfeld 4c3f97d123 Fix type of Workspace::open_new_file context parameter
Fixes #118
2021-07-30 10:11:46 -07:00
Antonio Scandurra 849604c7e4 Don't mark the first row as soft-wrapped when the tree is empty
Also, add a randomized test to verify that soft-wrapped rows are
reported correctly.
2021-07-30 09:50:28 -07:00
Antonio Scandurra db9cfb0d2b Highlight active lines 2021-07-30 09:50:28 -07:00
Antonio Scandurra 3abed88c76 Highlight active row(s) in the gutter 2021-07-30 09:50:28 -07:00
Max Brunsfeld 372d2ccb6d Extract most colors in codebase into theme file. switch to dark 2021-07-30 09:50:28 -07:00
Nathan SoboandMax Brunsfeld c306ac007c Allow more time wrapping to complete synchronously
We're seeing occasional flickers and wondering if this will help.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-07-30 09:50:28 -07:00
Nathan Sobo e7d03af942 Fix moving to previous word across a wrap boundary
I'm just going to the end of the soft-wrapped line, mirroring the behavior with hard wraps. It's maybe not perfectly technically correct but that behavior would require us to consider word boundaries outside of the current line, which doesn't seem worth the complexity.
2021-07-30 09:50:28 -07:00
Max Brunsfeld 25c472acd0 WIP - unit test for word-wise movement w/ soft wrap 2021-07-30 09:50:28 -07:00
Nathan SoboandMax Brunsfeld aab51e7576 Add some incomplete tests for movement
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2021-07-30 09:50:28 -07:00
Nathan SoboandAntonio Scandurra 492a09f1be Fix movement across soft wrap boundaries
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-07-30 09:50:28 -07:00
Nathan SoboandAntonio Scandurra c779633154 Make unfolding inclusive
If the range *touches* the fold, we unfold. This was needed to fix the behavior for unfolding at the current selection position. Previously, there was some kind of translation issue that was allowing us to accidentally work the way we wanted without this.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-07-30 09:50:28 -07:00
Nathan SoboandAntonio Scandurra 38d4662a4e Only honor rightward bias for buffer points *inside* of folds
(Not at boundaries)

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-07-30 09:50:28 -07:00
Nathan SoboandAntonio Scandurra a6a8f4fd81 Introduce a struct for spanned_rows result
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-07-30 09:50:28 -07:00
Nathan SoboandAntonio Scandurra 029460bf7e Respect buffer row boundaries in line-oriented edit operations
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-07-30 09:50:28 -07:00
Nathan SoboandAntonio Scandurra a1991a7458 Report the end of the current row rather than the start of the next
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-07-30 09:50:28 -07:00
Max BrunsfeldandNathan Sobo 82ed33a924 Fix bugs in {prev,next}_row_boundary
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-07-30 09:50:28 -07:00
Max Brunsfeld 05f8a61bc8 Add a bias parameter when converting buffer points to fold points 2021-07-30 09:50:28 -07:00