Antonio Scandurra
65048760b2
Allow explicit reload of buffers via Project::reload_buffers
2022-04-01 14:01:56 +02:00
Antonio Scandurra
bdd95a82d7
Merge pull request #705 from zed-industries/breadcrumbs
...
Introduce breadcrumbs
2022-04-01 11:02:54 +02:00
Antonio Scandurra
cd5389b4d8
Let toolbar items specify flex
when they have a primary location
2022-04-01 10:55:38 +02:00
Antonio Scandurra
6d4c748d82
Show "untitled" in breadcrumbs when the buffer has no path
2022-04-01 10:15:37 +02:00
Antonio Scandurra
7f9ff47089
Hide breadcrumbs when project search has no results
2022-04-01 10:00:21 +02:00
Antonio Scandurra
9f939bd007
Fix styling of project search bar
2022-04-01 09:59:36 +02:00
Max Brunsfeld
fed5d141bc
Start work on applying code actions that use commands
...
Co-Authored-By: Keith Simmons <keith@zed.dev>
2022-03-31 22:03:52 -07:00
Max Brunsfeld
e987a8ba63
Let fake and real LanguageServer access AsyncAppContext in handler callbacks
...
Also, reimplement FakeLanguageServer by wrapping LanguageServer, instead of
duplicating its functionality differently.
2022-03-31 21:57:00 -07:00
Keith Simmons
afbddc1bcd
Address panic when completions requested and returned to outdated buffer
2022-03-31 18:22:55 -07:00
Keith Simmons
564225c401
Provide diagnostic context to codeAction
...
Co-authored-by: Max Brunsfeld <max@zed.dev>
2022-03-31 15:39:52 -07:00
Nathan Sobo
903810f22e
Style search in buffer below breadcrumbs
...
We still have issues with project search styling.
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-03-31 11:44:16 -06:00
Nathan Sobo
8bfac63e0d
Render the search UI on a separate row from the breadcrumbs
...
- In project search, render it above the breadcrumbs
- In buffer search, render it below
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-03-31 10:36:39 -06:00
Keith Simmons
9385690b98
Add test for common_prefix_at and rewrite it to be more readable and
...
pass the new test cases
2022-03-31 01:09:58 -07:00
Max Brunsfeld
263e3d8176
Start work on interpreting 'label/insertText' completions
...
These completions don't supply a range that should be overwritten, so
the client needs to infer it via substring matching.
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-03-30 17:47:25 -07:00
Max Brunsfeld
c280c85ce7
Hard-code LSP formatting options for now
...
This is needed for auto-formatting to work properly in TypeScript and JSON
Co-Authored-By: Keith Simmons <keith@zed.dev>
2022-03-30 17:08:40 -07:00
Max Brunsfeld
cf9efd7005
Improve installation of npm-based language servers
...
* Use --prefix flag to guarantee that they are installed in .zed
* Use the @latest tag when available
* Extract helper functions
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-03-30 16:48:59 -07:00
Max Brunsfeld
4805cfe48c
Merge branch 'main' into typescript
2022-03-30 14:44:07 -07:00
Keith Simmons
0dce371b3e
Add assert_set_eq macro to make test clearer
...
Co-authored-by: Max Brunsfeld <max@zed.dev>
2022-03-30 13:53:38 -07:00
Keith Simmons
32d2e5952c
Test language server restart works as expected
...
Co-authored-by: Max Brunsfeld <max@zed.dev>
2022-03-30 13:08:36 -07:00
Antonio Scandurra
0453dd1101
Allow flex items to float to the end of the flex axis
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-30 16:46:14 +02:00
Antonio Scandurra
621e67bca7
Revert deletion of FindEditor
in theme
2022-03-30 13:35:17 +02:00
Antonio Scandurra
94097a56a1
Fix buffer search unit tests
2022-03-30 13:18:31 +02:00
Max Brunsfeld
fb46615c9f
Use a fancier angle bracket in the breadcrumbs
2022-03-29 21:16:12 -07:00
Max Brunsfeld
45ad5f343f
Parse JS as TSX
2022-03-29 18:26:58 -07:00
Max Brunsfeld
3b4cab9094
Move all configuration of individual LSP servers to LspAdapter
2022-03-29 18:14:30 -07:00
Max Brunsfeld
ebc711f9f5
Restructure fake language server setup
...
Replace FakeLanguageServerConfig with FakeLanguageServerAdapter
2022-03-29 17:55:57 -07:00
Keith Simmons
ec57c1f4ac
Properly dedup restarts of language servers
2022-03-29 17:46:39 -07:00
Keith Simmons
6d91fd078c
Add restart-lsp keybinding
2022-03-29 17:24:23 -07:00
Max Brunsfeld
158d987965
Start work on allowing language servers to support multiple languages
2022-03-29 16:57:18 -07:00
Keith Simmons
0e1d371a67
Add typescript language server
...
Currently not tested for tsx files
Co-authored-by: Max Brunsfeld <max@zed.dev>
2022-03-29 13:42:21 -07:00
Max Brunsfeld
d466768eed
WIP
2022-03-29 11:06:08 -07:00
Max Brunsfeld
dd1c88afa5
Add basic TypeScript and TSX support
...
Co-Authored-By: Keith Simmons <keith@zed.dev>
2022-03-29 10:42:46 -07:00
Antonio Scandurra
a11665ecc7
Render project search query editor in toolbar
2022-03-29 17:04:39 +02:00
Antonio Scandurra
a6bdb6dc5d
Embed match index inside of search query editor
2022-03-29 15:53:36 +02:00
Antonio Scandurra
13f42550c9
Show breadcrumbs in the toolbar
2022-03-29 15:08:37 +02:00
Antonio Scandurra
099250c691
Introduce MultiBuffer::symbols_containing
2022-03-29 15:08:37 +02:00
Antonio Scandurra
bfa5dd52dd
Don't underflow when calling symbols_containing_offset(0)
2022-03-29 15:08:37 +02:00
Antonio Scandurra
d7a39a2116
Honor SearchBar
being dismissed when changing the active item
2022-03-29 15:08:33 +02:00
Antonio Scandurra
42a7e573bc
Add padding to toolbar
2022-03-29 12:17:37 +02:00
Antonio Scandurra
a86118cfe2
Avoid matching duplicate impl
outline items in tests
2022-03-29 11:59:52 +02:00
Antonio Scandurra
9df2dacd85
Restructure Pane
to have a single Toolbar
with multiple items
2022-03-29 11:48:21 +02:00
Antonio Scandurra
d296bb21a8
Emit Event::PaneAdded
in Workspace
when a new pane is created
2022-03-29 10:24:42 +02:00
Antonio Scandurra
d7026c2228
Merge branch 'main' into breadcrumbs
2022-03-29 10:05:05 +02:00
Max Brunsfeld
a8600e76a3
Make language's language server config non-optional
2022-03-28 18:14:49 -07:00
Max Brunsfeld
4d456d3847
Remove duplication in build_language_registry
2022-03-28 18:01:29 -07:00
Antonio Scandurra
f274a6ab4f
Avoid unnecessary clones when undoing/redoing selections
2022-03-28 17:47:14 +02:00
Antonio Scandurra
5ef6337b09
Merge branch 'main' into selection-history
2022-03-28 17:24:46 +02:00
Antonio Scandurra
aec82ef71e
Test selection history
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-28 17:20:52 +02:00
Antonio Scandurra
45ecd8e0a6
Always use square brackets in marked_text_ranges
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-28 17:11:35 +02:00
Antonio Scandurra
686085dd60
Merge pull request #690 from zed-industries/indent-keybindings
...
Bind `Outdent` and `Indent` respectively to `cmd-[` and `cmd-]`
2022-03-28 16:50:23 +02:00
Antonio Scandurra
bbfb63ff89
Cap selection history to 1024 entries
2022-03-28 16:37:48 +02:00
Antonio Scandurra
2a1fed1387
Insert tabs instead of indenting only when all selections are empty
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-28 16:36:12 +02:00
Antonio Scandurra
0cd356ce06
Merge pull request #689 from zed-industries/format-timeout
...
Skip formatting during save if it takes too long
2022-03-28 16:17:56 +02:00
Antonio Scandurra
73c2f52158
Implement cmd-u
and cmd-shift-u
to undo and redo selections
2022-03-28 16:05:44 +02:00
Antonio Scandurra
4ed0607e1e
Extract SelectionHistory
in preparation to store an undo/redo stack
2022-03-28 14:52:54 +02:00
Antonio Scandurra
3cfa2c65b3
Autoscroll to newest cursor on cmd-d instead of fitting all selections
2022-03-28 14:38:51 +02:00
Antonio Scandurra
f69bd0e327
Snap icon sprites to pixel grid
...
This should resolve some rendering artifacts potentially caused by
floating point errors when sampling the texture. It should also lead
to crisper images when icons are rendered midway through a pixel.
2022-03-28 11:52:13 +02:00
Antonio Scandurra
ac88003c19
Bind Outdent
and Indent
respectively to cmd-[
and cmd-]
2022-03-28 11:34:46 +02:00
Antonio Scandurra
a2c4205c5c
Make indent and outdent explicit actions and unify tab
bing logic
2022-03-28 11:34:38 +02:00
Antonio Scandurra
03752f913d
Fix warnings
2022-03-28 11:05:55 +02:00
Antonio Scandurra
2c78c830eb
Skip formatting during save if it takes too long
2022-03-28 11:02:20 +02:00
Antonio Scandurra
26aa138429
Fire fake timers waking up at the same time as the current clock
2022-03-28 10:57:52 +02:00
Antonio Scandurra
cbd266052d
Allow returning futures in fake language server request handlers
2022-03-28 10:44:32 +02:00
Keith Simmons
a7a52ef3f7
Add word and line movement in vim normal mode
...
Add jump to start and end of the document
Move vim tests to relevant vim files
Rename VimTestAppContext to VimTestContext for brevity
Improve VimTestContext assertions to pretty print locations when selection position assertion panics
2022-03-27 17:58:28 -07:00
Nathan Sobo
c6ad667d49
Assign normal mode when re-enabling
2022-03-26 19:19:12 -06:00
Nathan Sobo
daf999c3be
Fully disable vim mode on start unless it's enabled
...
Also: Make some structural adjustments to remove the need for defer. Instead of accessing the global in associated VimState functions, have a single method that allows us to call update instance methods.
2022-03-26 19:19:12 -06:00
Nathan Sobo
30e31f6561
Test that vim mode can be disabled on startup
2022-03-26 19:19:12 -06:00
Nathan Sobo
2837125098
0.23.0
2022-03-26 07:22:01 -06:00
Nathan Sobo
fe1f857e84
Merge pull request #684 from zed-industries/subword
...
Add bindings for subword movement and deletion
2022-03-26 07:18:29 -06:00
Nathan Sobo
d4436277ee
Merge pull request #682 from zed-industries/vim-hjkl
...
Vim hjkl
2022-03-26 07:11:46 -06:00
Nathan Sobo
2dc76a2b58
Add bindings for subword movement and deletion
2022-03-26 07:10:16 -06:00
Keith Simmons
1a29180185
Fixed issue with enabling and disabling vim mode dynamically
...
Also added indoc and marked text utility to vim tests to improve readability
2022-03-25 20:10:52 -07:00
Keith Simmons
0aaf270650
Add clip_to_line_end to display_map/snapshot and set it to ensure vim positioning in normal mode
...
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-03-25 20:10:52 -07:00
Keith Simmons
bb9b36dccd
Add initial vim mode mode switching
...
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-03-25 20:10:37 -07:00
Nathan Sobo
62b4eb5efc
Add integration test for dropping host connections while sharing
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-25 10:32:31 -06:00
Nathan Sobo
a3e9a3afbf
Clear out project registration and sharing state on disconnect
...
Previously, we weren't fully clearing the state associated with projects and worktrees when losing connection. This caused us to not see guest avatars disappear and not be able to re-share upon reconnect.
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-25 10:15:08 -06:00
Antonio Scandurra
3339739dbf
Merge pull request #678 from zed-industries/disk-based-diagnostics-transformation
...
Preserve disk-based diagnostics whose ranges intersect with an edit since save
2022-03-25 17:04:07 +01:00
Antonio Scandurra
865cd1960f
Preserve disk-based diagnostics whose ranges intersect with an edit since save
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-25 15:35:31 +01:00
Antonio Scandurra
7a6fe73440
Rename Patch::transform_old
to Patch::old_to_new
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-25 14:57:40 +01:00
Antonio Scandurra
eefaa86750
Introduce Patch::transform_old
2022-03-25 14:28:38 +01:00
Nathan Sobo
2c232d585a
Merge branch 'main' into unfold-on-select-match
2022-03-24 14:13:27 -06:00
Nathan Sobo
ccc276da7a
Merge pull request #672 from zed-industries/fix-unfollowing-on-edit
...
Automatically unfollow leader only for edits that originate from the follower editor
2022-03-24 13:26:28 -06:00
Keith Simmons
8f75520ade
Merge pull request #676 from zed-industries/highlighted-text-fix
...
Highlighted text fix
2022-03-24 11:52:06 -07:00
Keith Simmons
92c7b5d6ef
Remove result from anchor cmp functions
...
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-03-24 11:48:31 -07:00
Keith Simmons
ab631cf6c3
Change language: ⚓ :min() to a constant
...
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-03-24 10:41:33 -07:00
Keith Simmons
f6805eb802
Make rename highlights work across multibuffer excerpts
...
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-03-24 10:22:47 -07:00
Antonio Scandurra
1c25b3d150
Test the new inclusive
parameter when unfolding
2022-03-24 17:20:28 +01:00
Antonio Scandurra
7fa7b7e507
Unfold range when selecting the next match
...
Selected matches are unfolded when in project search, buffer search and
when hitting `cmd-d` to select the next match.
2022-03-24 17:16:21 +01:00
Antonio Scandurra
78b52168fa
Rename Editor::unfold
to Editor::unfold_lines
2022-03-24 17:15:40 +01:00
Antonio Scandurra
4f50da759a
Allow customizing whether FoldMap::unfold
treats ranges as inclusive
2022-03-24 17:14:41 +01:00
Antonio Scandurra
9421ad04f7
Add a unit test for editor edit events
2022-03-24 09:17:56 +01:00
Antonio Scandurra
87981bb2ab
Emit an Edited
event when ending, undoing or redoing a transaction
2022-03-24 08:56:37 +01:00
Antonio Scandurra
a739c362d9
Rename editor::Event::Edited
to editor::Event::BufferEdited
...
This is to distinguish it from a new event we're about to add which
represent edits originating from that specific editor.
2022-03-24 08:55:46 +01:00
Antonio Scandurra
864bede8a2
Use Editor::transact
everywhere
...
This is in preparation of emitting an edit event every time a transaction ends
or it is undone/redone.
2022-03-24 08:48:06 +01:00
Max Brunsfeld
ff4bdb3114
Fix incorrect highlighting when an empty range is highlighted via the DisplayMap
...
Co-Authored-By: Keith Simmons <keith@zed.dev>
2022-03-23 18:20:55 -07:00
Max Brunsfeld
1c4090d791
Merge pull request #669 from zed-industries/extend-selection-fixes
...
Fix extending selections starting at ends of syntax nodes
2022-03-23 15:56:35 -07:00
Max Brunsfeld
22148a3639
Fix extending selections starting at ends of other nodes
...
Fixes #478
2022-03-23 15:38:23 -07:00
Max Brunsfeld
1dd553bc56
Merge pull request #657 from zed-industries/global-observations
...
Add global change observations
2022-03-23 14:11:33 -07:00
Max Brunsfeld
483a84a7f1
0.22
2022-03-23 12:09:07 -07:00
Max Brunsfeld
8f7966bf35
Merge pull request #668 from zed-industries/no-lsp-when-following
...
Avoid making LSP requests when moving cursor due to following
2022-03-23 11:54:45 -07:00
Max Brunsfeld
cbd4ef2ec5
Merge pull request #667 from zed-industries/fix-duplicate-nav-entries
...
Fix duplicate nav entries
2022-03-23 11:49:00 -07:00
Max Brunsfeld
f7e7d58f49
Avoid making LSP requests when moving cursor due to following
2022-03-23 11:41:20 -07:00
Keith Simmons
e36104f30d
Add navigation deduping
...
Co-authored-by: Antonio Scandurra <me@as-cii.com>
2022-03-23 11:32:25 -07:00
Nathan Sobo
4a42025c28
Authenticate on startup if ZED_IMPERSONATE is assigned
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-03-23 12:25:06 -06:00
Nathan Sobo
657b92b020
Don't prompt for keychain access when launching from a pty
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-03-23 12:18:17 -06:00
Nathan Sobo
ee9ed936e4
Don't try keychain after authentication fails
...
Previously, we were achieving this by deleting the keychain item, but this can sometimes fail which leads to an infinite loop. Now, we explicitly never try the keychain when reattempting authentication after authentication fails.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-03-23 12:15:36 -06:00
Antonio Scandurra
5cd94b5b92
WIP
2022-03-23 19:05:46 +01:00
Antonio Scandurra
255a8c5d14
Don't push a duplicate nav entry when changing selections via the mouse
...
Co-Authored-By: Keith Simmons <keith@zed.dev>
2022-03-23 18:45:45 +01:00
Keith Simmons
0a8d543f66
Add global tests and wrap global update functions in update call to flush effects
...
Co-authored-by: Antonio Scandurra <me@as-cii.com>
2022-03-23 10:27:27 -07:00
Max Brunsfeld
0b3a63b843
Fix error in follower when leader creates pending selections
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-23 10:24:26 -07:00
Keith Simmons
454f7a570c
Add global change observations
2022-03-23 09:14:12 -07:00
Antonio Scandurra
10f176073d
Merge pull request #662 from zed-industries/fix-refresh-selections-when-mouse-selecting
...
Account for pending selections when calling `Editor::refresh_selections`
2022-03-23 15:58:28 +01:00
Antonio Scandurra
b73f57d37a
Don't destroy pending selection on Editor::refresh_selections
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-23 15:21:11 +01:00
Antonio Scandurra
004f98cc6d
Merge pull request #661 from zed-industries/follow
...
Introduce basic following experience
2022-03-23 15:17:44 +01:00
Antonio Scandurra
60b6b0b317
Cycle through panes spatially rather than in the order in which they created
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-23 15:06:25 +01:00
Antonio Scandurra
5ac39aa7cd
Don't show local cursors when editor is not focused
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-23 14:46:33 +01:00
Antonio Scandurra
4f27049305
Focus followed items when they become active if the pane is active
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-23 14:41:48 +01:00
Antonio Scandurra
edc038a1cf
Activate previous pane and next pane via cmd-k cmd-left
and cmd-k cmd-right
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-23 14:26:00 +01:00
Nathan Sobo
097bbe3e07
Update follow binding, remove unfollow binding
...
The previous binding to follow had ergonomics issues for the frequency that I think we'll want to use it. It would also conflict with the sub-word selection binding.
Now that moving the cursor etc unfollows, I don't think we need the follow binding.
2022-03-23 06:19:35 -06:00
Antonio Scandurra
d24bd6f19a
Account for pending selections when calling Editor::refresh_selections
2022-03-23 11:46:35 +01:00
Antonio Scandurra
3298529ed1
Fix global nested event test after turning subscriptions into effects
2022-03-23 09:14:33 +01:00
Max Brunsfeld
fa62fd968f
Autoscroll when leader moves cursors
...
instead of copying their scroll top.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-22 18:02:54 -07:00
Max Brunsfeld
fad299eb3f
Add unit test for editor's following methods
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-22 17:39:34 -07:00
Max Brunsfeld
8699dd9c56
Replicate fractional component of leader's scroll position
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-22 17:20:13 -07:00
Max Brunsfeld
880eaa268b
Coalesce followed view updates only within one frame
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-22 17:03:24 -07:00
Max Brunsfeld
4435d9b106
Combine updates from multiple view events when updating followers
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-22 16:22:42 -07:00
Keith Simmons
fba6f24ab7
Add editor lifetime events
2022-03-22 16:14:32 -07:00
Keith Simmons
6a1c197c1b
Add editor selection utilities
...
Also improved test that was failing during above to use marker text approach as a drive by
2022-03-22 16:08:22 -07:00
Max Brunsfeld
fc811e0856
Don't represent editor's scroll top anchor as an option
...
Use Anchor::min as the special value representing a scroll top of zero
2022-03-22 13:32:25 -07:00
Max Brunsfeld
0a3f013e00
Use env_logger when running the app in a terminal
2022-03-22 13:32:25 -07:00
Max Brunsfeld
c105802b2d
Allow customizing the pane's following border width in the theme
2022-03-22 13:32:25 -07:00
Max Brunsfeld
4ed8f6fbb4
Make UpdateBuffer a foreground message
2022-03-22 13:32:25 -07:00
Keith Simmons
df751867a1
Remove results from movement function return values, and move editor test utilities to test file
2022-03-22 10:55:03 -07:00
Antonio Scandurra
c78bcf7116
Ensure leader updates don't change the active pane of followers
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-22 16:44:59 +01:00
Antonio Scandurra
9885c4f6ba
Don't trigger observations with notifications emitted prior to observing
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-22 16:28:11 +01:00
Antonio Scandurra
5ecf945e28
Don't trigger global subscriptions with events emitted prior to subscribing
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-22 16:14:21 +01:00
Antonio Scandurra
73eae287a1
Don't trigger subscriptions with events emitted prior to subscribing
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-22 15:57:30 +01:00
Antonio Scandurra
284a446be7
WIP
2022-03-22 13:35:37 +01:00
Antonio Scandurra
381c82714b
Bump protocol version
2022-03-22 13:19:07 +01:00
Antonio Scandurra
016fb01ef8
Merge branch 'main' into follow
2022-03-22 11:20:55 +01:00
Antonio Scandurra
e5a99cf8cd
Stop following when leader disconnects
2022-03-22 11:16:04 +01:00
Antonio Scandurra
ffaf409a31
Forget last pane's leader when such pane is removed
...
This is just a memory optimization and doesn't cause any observable
change in behavior.
2022-03-22 11:06:52 +01:00
Antonio Scandurra
5dc36260e5
Reflect leader's view state when recycling existing local editors
2022-03-22 10:51:17 +01:00
Antonio Scandurra
34e5a1f6bb
Always render local selections on top of remote ones
2022-03-22 10:31:28 +01:00
Antonio Scandurra
7d566ce455
Follow last collaborator or the next one via cmd-alt-shift-f
2022-03-22 10:16:58 +01:00
Antonio Scandurra
67dbc3117d
Stop following when activating a different item on the follower pane
2022-03-22 09:42:37 +01:00
Antonio Scandurra
3117554568
Automatically unfollow when editing, scrolling or changing selections
2022-03-22 09:17:01 +01:00
Max Brunsfeld
c550fc3f01
WIP - Start work on unfollowing automatically
2022-03-21 21:52:28 -07:00
Max Brunsfeld
1728551282
Always mirror the leader's selections when following
2022-03-21 21:47:29 -07:00
Nathan Sobo
ee3e6049a3
Make boundary-finding methods wrap across newlines
...
This requires word and subword methods to explicitly acknowledge that they want to stop at newlines, which I think actually increases clarity. It makes the boundary finding method more general and useful for external callers such as the forthcoming vim crate.
2022-03-21 21:25:02 -06:00
Nathan Sobo
f70f4c7729
Improve DisplayPoint Debug impl
2022-03-21 21:07:56 -06:00
Nathan Sobo
e5a00d72f8
Implement next_subword_end
2022-03-21 20:02:08 -06:00
Nathan Sobo
c0d05c82b7
WIP: Start on previous_subword_start
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-Authored-By: Keith Simmons <keith@the-simmons.net>
2022-03-21 19:53:01 -06:00
Max Brunsfeld
c8f36af823
Show borders around avatars and panes to indicate following state
2022-03-21 15:12:15 -07:00
Nathan Sobo
5b54874705
Extract logic for scanning over character boundaries
2022-03-21 16:01:22 -06:00
Nathan Sobo
0c89ad3ac0
Make multi-byte and surrounding_word tests more readable
...
Just merge multi-byte tests into the main word movement tests
2022-03-21 15:41:42 -06:00
Nathan Sobo
210fa4c443
Remove CharKind::Newline
...
This is just a character, and so it seems clearer to refer to it specifically when we want to know if a character is a newline. There was only one case where we relied on Newline being different from Whitespace, and we special-cased that instance. Changing this actually makes us match the behavior of VS Code when double-clicking runs of multiple newlines.
/cc @as-cii
Co-Authored-By: Keith Simmons <keith@the-simmons.net>
2022-03-21 15:17:32 -06:00
Nathan Sobo
baeb7d27b8
Clarify word movement function names and improve test coverage
...
Co-Authored-By: Keith Simmons <keith@the-simmons.net>
2022-03-21 15:17:25 -06:00
Max Brunsfeld
06cd9ac664
Match the leader's last selection when unfollowing
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-21 14:04:55 -07:00
Max Brunsfeld
3e0bc979c3
Avoid infinite loop when collaborators follow each other
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-21 11:47:00 -07:00
Antonio Scandurra
13a2dacc60
💄
2022-03-21 18:16:06 +01:00
Nate Butler
1c23a45d02
Update Zed fonts to 1.2.1
2022-03-21 12:11:31 -04:00
Antonio Scandurra
9575796f9e
Allow unfollowing of leaders by clicking on their avatar
2022-03-21 17:10:23 +01:00
Antonio Scandurra
a154e4500b
Implement Workspace::unfollow
...
This also changes the structure of the follow state back to be per-pane. This
is because we can't share the same view state across different panes for
a couple of reasons:
- Rendering the same view in N different panes is almost always not something
that we want due to global state such as focus.
- If we allowed it and a user followed the same person in two different panes,
there would be no way of unfollowing in one pane without also unfollowing in
the other.
2022-03-21 16:55:18 +01:00
Antonio Scandurra
a2dbebd9ba
Hide cursor both locally and remotely when following
2022-03-21 15:16:56 +01:00
Nathan Sobo
7cb8935ff5
Pass project entry id to Pane when opening a project items
...
This fixes an oversight where we were failing to associate project items with their project entry ids, which broke the logic that prevented the same project entry from being opened twice in the same pane.
2022-03-20 08:54:20 -06:00
Antonio Scandurra
0e920ad5e9
Unset follower's scroll anchor when editor is scrolled all the way up
2022-03-19 10:50:23 +01:00
Max Brunsfeld
570c987455
Handle view updates when following
...
Basic following now works. Editors' scroll positions
are their only replicated view state.
2022-03-18 15:56:57 -07:00
Max Brunsfeld
e338da0271
Allow clicking a titlebar avatar to initiate following
2022-03-18 13:37:07 -07:00
Max Brunsfeld
d860ed25c1
Allow FollowableItem::to_state_message to return None
...
This way, we can avoid a panic if we don't handle certain cases,
like a non-singleton editor.
2022-03-18 13:36:05 -07:00
Max Brunsfeld
df0632011c
🎨 client
...
Forgot to push this yesterday night.
2022-03-18 13:03:43 -07:00
Max Brunsfeld
d02ab9bd06
Start work on updating editors's scroll positions when following
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-18 12:56:20 -07:00
Max Brunsfeld
2c53175566
Rename FollowedItem -> FollowableItem
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-18 10:12:51 -07:00
Antonio Scandurra
f4520d4184
WIP
2022-03-18 18:07:03 +01:00
Antonio Scandurra
7d7e10598a
Broadcast active view to followers
2022-03-18 16:00:03 +01:00
Antonio Scandurra
3d81eb9ddf
Allow accessing workspace after adding item to pane
2022-03-18 14:59:53 +01:00
Antonio Scandurra
10e6d82c3e
WIP: Start on sending view updates to followers
2022-03-18 14:20:09 +01:00
Antonio Scandurra
f0b7bd6e17
Serialize initial follow state in leader and reflect it in follower
2022-03-18 10:22:13 +01:00
Max Brunsfeld
0fdaa1d715
WIP
2022-03-17 17:53:49 -07:00
Max Brunsfeld
eda06ee408
Add AnyWeakViewHandle
2022-03-17 17:53:38 -07:00
Max Brunsfeld
5702737de2
Start work on an integration test for following
2022-03-17 13:53:06 -07:00
Max Brunsfeld
845457e2c4
Always read project entry id from workspace::Item
...
We cannot store a workspace item's project entry id separately,
since buffers' entry ids can change (for example when doing
a *save as*).
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-17 10:58:20 -07:00
Max Brunsfeld
9716ff7964
Set up logic for starting following
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-17 10:46:54 -07:00
Antonio Scandurra
2b4738d82d
Avoid passing a closure to workspace::register_project_item
...
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-03-17 17:39:25 +01:00
Antonio Scandurra
4bbfd0918e
Start defining follow protocol
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-17 16:50:29 +01:00
Antonio Scandurra
5d14c9abdf
Introduce workspace::register_project_item
...
This lets downstream crates like `editor` define how project items should be
opened.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-17 15:54:34 +01:00
Antonio Scandurra
bff414cfbc
Remove Editor::find_or_create
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-17 15:13:47 +01:00
Antonio Scandurra
6f9c37851c
Add Editor::for_multibuffer
and repurpose Editor::for_buffer
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-17 14:39:02 +01:00
Antonio Scandurra
44d997c00c
Rename app_state
to global
in gpui
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-17 14:33:01 +01:00
Antonio Scandurra
84bacc556f
Rename build_editor
to build_item
in Pane::open_item
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-17 14:31:05 +01:00
Antonio Scandurra
6446660c88
Rename open_buffer_for_path
to open_buffer
2022-03-17 11:42:13 +01:00
Antonio Scandurra
e6755f4115
Search only in active pane when using Editor::find_or_create
2022-03-17 11:39:39 +01:00
Antonio Scandurra
a691c2fbdb
Delete unused code
2022-03-17 11:33:58 +01:00
Antonio Scandurra
0efce8f70a
Rename ItemView
to Item
2022-03-17 11:32:46 +01:00
Antonio Scandurra
aced1e2315
Finish refactoring of how editors are opened
2022-03-17 11:29:46 +01:00
Nathan Sobo
728c708150
WIP: Massage opening of editors
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-03-16 17:40:09 -06:00
Nathan Sobo
1f9885ec42
Remove open_item_in_pane
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-Authored-By: Keith Simmons <keith@the-simmons.net>
2022-03-16 16:08:13 -06:00
Nathan Sobo
0036e5c86c
Replace ProjectEntry struct with ProjectEntryId
...
Previously, we tracked the worktree_id and entry_id separately, but now that entry ids are unique across all worktrees this is unnecessary.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-Authored-By: Keith Simmons <keith@the-simmons.net>
2022-03-16 15:59:47 -06:00
Max Brunsfeld
a88320dc5f
Remove workspace::Item trait
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Keith Simmons <keith@zed.dev>
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2022-03-16 13:34:06 -07:00
Antonio Scandurra
b0afb64a6e
Fix edge cases when calling refresh_windows
...
This commit ensures that new views are rendered for the first time. This fixes
a panic that could be reproduced by dropping the `ThemeSelector` and opening
the file finder during the same update.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-16 14:51:54 +01:00