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