Nathan Sobo
86effd64a2
Get project compiling with type-safe actions
2021-08-22 21:02:48 -06:00
Nathan Sobo
638b533fc7
WIP
2021-08-22 13:29:54 -06:00
Nathan Sobo
24639ec900
WIP
2021-08-22 11:58:19 -06:00
Nathan Sobo
030de803fe
WIP: Start on List::layout
...
Perform layout on any elements that we haven't yet laid out.
2021-08-21 13:40:45 -06:00
Nathan Sobo
d68e0b0b97
Remove after_layout from Element trait
...
Now that layout takes a MutableAppContext we don't need an after_layout phase.
2021-08-20 16:40:45 -06:00
Nathan Sobo
d0a5bc694c
WIP
2021-08-20 16:34:46 -06:00
Nathan Sobo
c3dda14490
WIP: Move sum_tree module into gpui so we can use it in List
2021-08-20 16:18:39 -06:00
9ff764983d
Flatten theme styles by eliminating top-level ui key
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2021-08-20 10:44:34 -06:00
Nathan Sobo
9b7756f566
Use singular names in theme and number surfaces from 0
2021-08-20 10:18:05 -06:00
Nathan Sobo
a4882169c2
Fetch messages when joining a channel
2021-08-19 15:25:20 -06:00
Nathan Sobo
9336c02867
Start on a peer2 module with an alternative implementation
2021-08-18 21:59:13 -06:00
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 Sobo and Max 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 Sobo and Max 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
Nathan Sobo
149fb574c7
Expose titlebar_height in LayoutContext
2021-08-06 09:11:16 -06:00
Nathan Sobo
e16c62ed0e
Add platform::Window::titlebar_height
2021-08-06 09:08:29 -06:00
Nathan Sobo
34eb2c446f
Start on custom titlebar
2021-08-05 11:48:35 -06: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
Nathan Sobo
01fcec53d7
Merge pull request #125 from zed-industries/theme-variables
...
Add flexible theme system
2021-08-05 08:57:52 -06:00
Nathan Sobo and Max Brunsfeld
522fac9690
Fix compile error in tests
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-08-04 17:56:38 -06:00
Nathan Sobo and Max 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 Sobo and Max 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
Nathan Sobo and Max Brunsfeld
56354c7623
Avoid crashes when laying out lines containing byte order marks
...
This solution isn't perfect and we'll probably have layout bugs with these lines, but this prevents us from triggering undefined behavior.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-08-04 11:52:21 -06: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 Sobo and Max Brunsfeld
90b51c3356
Implement themes::ThemeRegistry::get
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-08-03 19:35:15 -06:00
Nathan Sobo and Max Brunsfeld
ca9862fff1
Start on new theme::ThemeRegistry
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-08-03 18:51:06 -06: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
Nathan Sobo and Max 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
Nathan Sobo and Max 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 Sobo and Antonio 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 Sobo and Antonio 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 Sobo and Antonio 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 Sobo and Antonio 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 Sobo and Antonio 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 Sobo and Antonio Scandurra
84fc8f0f4f
Don't let people retry randomized tests
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2021-07-30 09:50:28 -07:00
Nathan Sobo and Antonio Scandurra
6efadd19dd
Reuse FontCache across randomized tests
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2021-07-30 09:50:28 -07:00
Nathan Sobo and Antonio 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
Nathan Sobo
613192974f
Don't render line numbers for soft-wrapped line segments
2021-07-30 09:50:28 -07:00
Nathan Sobo
47187172b7
Clip left when moving cursor to end of line
...
This ensures we stay on the same line when the current display line ends with a soft wrap.
2021-07-30 09:50:28 -07:00
Nathan Sobo
b14721fd7f
Clip left when moving vertically
2021-07-30 09:50:28 -07:00
Nathan Sobo
7a5f1b5446
Preserve logical scroll position when wrap width changes
2021-07-30 09:50:28 -07:00
Nathan Sobo
61b5d66ba8
Eliminate input/output nomenclature from fold_map
...
Instead, just use FoldPoint, FoldOffset, etc. We don't need the naming to be general because we know exactly which layer we're building on at each layer of the DisplayMap.
2021-07-25 08:22:50 -06:00
Nathan Sobo
da50576129
Fix remaining errors and warnings
2021-07-25 07:56:53 -06:00
Nathan Sobo
9edc8b9a06
WIP
2021-07-24 08:40:48 -06:00
Nathan Sobo
3bf47be51e
WIP
2021-07-24 08:09:04 -06:00
Nathan Sobo
f81f043058
WIP
2021-07-23 12:25:09 -06:00
11285f3762
Pass a MutableAppContext to Element::layout and ::dispatch_event
...
We need to mutate the app in these cases to relay layout state, so this just makes things easier. We won't be able to perform layout in parallel but it's questionable whether we'll ever actually do that. If we do, we can revisit.
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-07-23 10:52:08 -06:00
Nathan Sobo
f169f8e358
Ensure that soft wrapped lines don't cause horizontal scrolling
2021-07-21 12:27:01 -06:00
Nathan Sobo
699e558db9
Remove logging
2021-07-21 11:21:13 -06:00
Nathan Sobo
b513df3844
WIP
2021-07-20 17:22:03 -06:00
Nathan Sobo and Max Brunsfeld
ee213696aa
Replace DeterministicExecutor::reset with forbid_parking
...
There's really no point calling reset if we plan on parking afterwards.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-07-20 12:28:04 -06:00
Nathan Sobo
64927abbc4
Allow DeterministicExecutor to park until forbid_parking is called
...
This allows us to perform async setup such as talking to the database.
2021-07-20 12:22:02 -06:00
Nathan Sobo and Max Brunsfeld
3b77b011e2
Iterate on randomized wrapping test and fix some bugs
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-07-19 19:31:03 -06:00
Nathan Sobo and Max Brunsfeld
e0da3fd714
Get the randomized soft wrap test passing with no edits
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-07-19 18:37:29 -06:00
Nathan Sobo and Max Brunsfeld
2ce42ff6b6
Honor the last line when wrapping even if it doesn't end in \n
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-07-19 18:29:20 -06:00
Nathan Sobo
e193a660aa
WIP
2021-07-19 13:59:07 -06:00
Nathan Sobo and Max Brunsfeld
8b34deab58
Try to return edits from FoldMap::apply_edits
...
The goal is to describe how the fold map changed. Hopefully this is correct.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-07-15 15:08:18 -06:00
Nathan Sobo and Max Brunsfeld
2c9f730638
Give the FoldMap its own edit type that does not have deleted_lines
...
We want to use this struct to communicate about edits performed to the fold map itself, and it will be simpler if we don't have to communicate this data.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-07-15 14:19:58 -06:00
Nathan Sobo and Max Brunsfeld
2bde54971e
Move all FoldMap query methods to FoldMapSnapshot
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-07-15 11:36:24 -06:00
Nathan Sobo
09afba9251
Introduce buffer::Content<'a> struct to share logic with buffer::Snapshot
...
We want to move a bunch of methods on FoldMap to fold_map::Snapshot. This captures a buffer snapshot, and we'll need a bunch of methods that currently are on Buffer to also be implemented on buffer::Snapshot. This Content reference struct will be a good zero-cost place to store that logic.
2021-07-15 09:50:50 -06:00
Nathan Sobo
a074f4664b
Merge pull request #109 from zed-industries/server
...
Include contents of the zed-server repo
2021-07-13 15:52:00 -06:00
Nathan Sobo and Max Brunsfeld
82569a031f
Fix race condition in integration test
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-07-13 13:24:48 -06:00
Nathan Sobo and Max Brunsfeld
411e7df931
Move Fs trait into its own module
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-07-13 12:52:42 -06:00
Nathan Sobo and Max Brunsfeld
86ca442fbe
Fix CSS purge path
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-07-12 14:50:51 -06:00
Nathan Sobo and Max Brunsfeld
9a6c4a1718
Pass arguments to cargo run in script/server
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-07-12 14:50:39 -06:00
Nathan Sobo and Max Brunsfeld
1537500fcb
Include contents of the zed-server repo
...
We're going full monorepo.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-07-12 14:14:39 -06:00
Nathan Sobo
4aab70d7fb
Remove authentication at the RPC layer
...
This means we can remove IOHandler and return a simple future that is Send
2021-07-09 21:57:10 -06:00
Nathan Sobo
89ef4d760d
Send an Authorization HTTP header when connecting web sockets
2021-07-09 21:27:33 -06:00
Nathan Sobo
4ffd29bd81
Pass AppState as action arg to workspace:share_worktree
2021-07-09 21:26:54 -06:00
Nathan Sobo and Max Brunsfeld
73db910a95
Process remote worktree updates in the background
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-07-05 14:20:53 -06:00
Nathan Sobo and Max Brunsfeld
036dcd50fd
Start on applying remote worktree updates in the background
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-07-05 13:44:42 -06:00
Nathan Sobo
0fde7a55ef
Store shared buffers on LocalWorktree
...
It's okay for our domain objects to model remote state. We should minimize what we need to store in the rpc::ClientState struct.
2021-06-29 21:01:43 -06:00
Nathan Sobo
bbf803d7dc
Store a reference to the LangageRegistry on the Worktree
2021-06-29 20:07:37 -06:00
34963ac80d
Use entry_id on File instead of worktree::Diff to detect when buffers' files change
...
Rather than computing a diff after processing a batch of FSEvents, we instead detect renames as we're inserting entries. We store an entry_id on the File object that is owned by each buffer, and use this to detect when the path of the File has changed.
We now also manage all File-related state and event emission for Buffers in the LocalWorktree, since the logic will need to be totally different in the remote case.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2021-06-29 18:19:38 -06:00
Nathan Sobo
b7a4393f29
Redesign Worktree save API and make test_rescan_simple pass
...
This commit does too much. The first goal was to change our approach to saving new buffers so that we don't need to construct a File for an entry that doesn't exist. Rather than doing that, we call `Worktree::save_buffer_as` with the buffer handle, the path, and the contents. This then saves the buffer and returns a handle to a `File` that references an entry that actually exists. I needed to do this so that we can store an entry id on `File`.
In the process, I noticed intermittent test failures on `test_rescan_simple`, so I made some changes required to fix those related to our reuse of existing ids. Our previous approach of removing a path when inserting a new entry was broken, because of the recursive nature of `remove_path`. Instead, I simply recycle the id of an existing worktree entry with the same path if one is present, then allow it to be replaced.
2021-06-28 19:05:38 -06:00
Nathan Sobo and Antonio Scandurra
1793eda470
Eagerly populate worktree entries on load
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2021-06-28 12:29:46 -06:00
Nathan Sobo and Max Brunsfeld
7ee0862b99
Notify host when guests close buffers
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-06-25 11:33:40 -07:00
Nathan Sobo and Max Brunsfeld
2257abd7dd
Add Entity release hooks
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-06-25 10:35:06 -06:00
Nathan Sobo
3ba22230dc
Merge pull request #97 from zed-industries/limit-bundle-uploads
...
Only upload artifacts to workflow runs on the main branch
2021-06-24 19:07:04 -06:00
Nathan Sobo
0faabc2177
Only upload artifacts to workflow runs on the main branch
...
We're running out of actions storage, and we don't really need an artifact stored for every single build.
2021-06-24 19:02:57 -06:00
Nathan Sobo
c4729de913
Merge pull request #96 from zed-industries/retry-flaky-tests
...
Add a "retries" option to gpui::test macro and use it in flaky tests
2021-06-24 18:08:06 -06:00
Nathan Sobo
8f7111b0f7
Upgrade bindgen to fix warnings on new Rust
2021-06-24 18:02:53 -06:00
Nathan Sobo
3d67266d0b
Add a "retries" option to gpui::test macro and use it in flaky tests
2021-06-24 17:51:16 -06:00
Nathan Sobo and Max Brunsfeld
c5e08b6548
Eagerly update worktree entries when saving
...
Don't use ModelHandles for storing Files.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-06-22 17:53:35 -07:00
Nathan Sobo and Max Brunsfeld
a364839e93
Replace FileHandle with File entity that subscribes to Worktree update events
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-06-21 20:40:40 -06:00
Nathan Sobo and Max Brunsfeld
8ae5c0d7d6
Implement worktree::Snapshot::diff
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-06-21 15:08:21 -06:00
Nathan Sobo and Max Brunsfeld
1364ba6f5e
Allow async background work when polling worktree background snapshot
...
This prepares us to perform a diff against the previous snapshot before installing a new worktree snapshot on the foreground thread.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-06-21 14:03:29 -06:00
Nathan Sobo and Max Brunsfeld
986afd26e9
Remove other_mount_paths
...
We only needed this when we relied on inodes for file identity, which we no longer attempt to do.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-06-21 13:06:29 -06:00
Nathan Sobo and Max Brunsfeld
0deaa3a61d
WIP
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-06-18 17:26:12 -06:00
Nathan Sobo and Max Brunsfeld
bfccb173c4
Update prost to include our changes
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
2021-06-18 15:12:22 -06:00