Keith Simmons
4b295f566a
Handle editor cancel in pane in order to dismiss find toolbar
2022-04-11 15:11:23 -07:00
Keith Simmons
0ca4c9946a
Add logging when atlas allocator fails to allocate
2022-04-11 10:31:38 -07:00
Antonio Scandurra
3844634765
Hold the state lock while responding to guest joining a project
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-11 19:30:52 +02:00
Keith Simmons
7abd3a98a8
Make atlas allocation fallable and skip rendering icons and paths when it fails
2022-04-11 10:15:49 -07:00
Keith Simmons
3c116e32cb
Reraise editor events in Project Search and activate workspace item from them
2022-04-11 10:13:07 -07:00
Antonio Scandurra
9a8b0388fa
Replace synchronous Store
lock with an async lock
...
This also fixes some failures due to `broadcast` and `update_contacts_for_users`
being fallible. As part of this commit, these two functions don't return `Result`
anymore: the reason for this change is that we don't want a request to fail only
because a peer disconnected while we were trying to broadcast a message to them.
2022-04-11 17:56:30 +02:00
Antonio Scandurra
273ee0ae58
Acquire guest connection ids after save request has been forwarded
...
This fixes a bug that would cause the server to broadcast the save
message to guests that have potentially left the project.
2022-04-11 16:27:14 +02:00
Antonio Scandurra
c3927c541f
Simulate random guest disconnection and reconnection
2022-04-11 16:27:11 +02:00
Antonio Scandurra
f99a1437cd
Distribute operation workload evenly across peers in randomized test
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-11 14:43:30 +02:00
Antonio Scandurra
02f96c6def
Simulate parallelism among peers correctly in randomized collab test
...
Previously they were all using the same foreground executor, which was
not properly simulating concurrency among tasks from different peers.
2022-04-11 13:42:30 +02:00
Antonio Scandurra
bb8dc6120b
Allow taking an Arc<Deterministic>
in [gpui::test]
-decorated tests
2022-04-11 13:42:30 +02:00
Antonio Scandurra
f9e0899e58
Fix divergence bug when peer reconnects reusing a prior replica id
...
We forgot to observe the footprint of the reconnecting replica's prior
undos into the local clock. This could cause the replica to generate
edits with a version strictly smaller than what other peers may have
observed. As such, those peers would think they had already seen those
edits and skip them.
2022-04-11 13:17:47 +02:00
Max Brunsfeld
9a4b8e3d8c
Load all keybindings from JSON file
2022-04-10 14:29:45 -07:00
Max Brunsfeld
b4babbeeaa
Load modal key bindings from JSON file
2022-04-10 11:39:43 -07:00
Max Brunsfeld
1e2eeaa22a
Load project and buffer search key bindings from JSON file
2022-04-10 11:30:08 -07:00
Max Brunsfeld
3636c9ec25
Load workspace and editor key bindings from a JSON file
2022-04-10 11:18:08 -07:00
Nathan Sobo
ab8204368c
Rename zed-server to collab
...
Over time, I think we may end up having multiple services, so it seems like a good opportunity to name this one more specifically while the cost is low. It just seems like naming it "zed" and "zed-server" leaves it a bit open ended.
2022-04-09 08:30:42 -06:00
Nathan Sobo
af674e1c00
Merge pull request #770 from zed-industries/better-settings-schema
...
Improve Settings Completions
2022-04-09 08:23:58 -06:00
Nathan Sobo
56fcffb634
Remove unused imports
2022-04-09 07:55:23 -06:00
Nathan Sobo
17195e615e
Merge pull request #781 from zed-industries/structured-logging
...
Introduce structured logging
2022-04-09 07:40:24 -06:00
Max Brunsfeld
fd4b81c8fc
Allow actions to be deserialized from JSON
...
Introduce separate macro for implementing 'internal' actions which
are not intended to be loaded from keymaps.
2022-04-08 15:47:51 -07:00
Max Brunsfeld
ed2b690b9e
Merge branch 'main' into namespace-actions
2022-04-08 11:48:43 -07:00
Nathan Sobo
8a7d3ea82a
Merge pull request #778 from zed-industries/test-random-disconnect
...
Introduce host disconnection in randomized collaboration test
2022-04-08 11:36:39 -06:00
Nathan Sobo
b507e21831
Enable JSON logging at the trace log level in K8s
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-04-08 10:08:52 -06:00
Nathan Sobo
7e5a3f9f6b
Introduce structured logging
...
We're enabling the log crate feature everywhere, but only using it on the server for now.
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-04-08 10:06:51 -06:00
Antonio Scandurra
53a7f9c43e
Introduce a timeout when processing incoming messages
...
We have an hypothesis that the server gets stuck while processing
an incoming message, either because the buffer fills up or because
a handler never completes. This should mitigate that and, once we
add logging, give us some clue as to what is causing it exactly.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-08 16:21:39 +02:00
Antonio Scandurra
0b1fda3e13
Remove postage
from zed-server
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-08 16:14:54 +02:00
Antonio Scandurra
24cb44fb00
Remove postage
from rpc
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-08 16:13:37 +02:00
Antonio Scandurra
32fd4eb3ac
Insert project id in connection's project during project registration
...
...in contrast to doing so during worktree registration. This fixes a
randomized test failure which would panic because store invariants would be
violated. This would happen when a peer disconnected before it had a chance
to register a worktree because, when removing all the state associated with
that peer upon disconnection, we would notice the registered project without
however finding it in the peer's connection state.
2022-04-08 14:41:56 +02:00
Antonio Scandurra
222cd09838
Allow host to reconnect to the server in randomized test
2022-04-08 14:41:30 +02:00
Antonio Scandurra
c994263225
Don't insert an empty vector in Project::buffer_snapshots
...
Other code paths rely on at least a version always being there, so
we should enforce that invariant everywhere.
2022-04-08 14:14:45 +02:00
Antonio Scandurra
663beab1b9
Avoid panicking when receiving a request for a dropped buffer
2022-04-08 12:10:45 +02:00
Antonio Scandurra
3daaef02ca
Replace postage::oneshot
with futures::channel::oneshot
...
This fixes an error in the randomized test that would cause the future
returned from `Worktree::share` to never finish due to a bug in `postage`
that causes its waker to not be notified upon drop.
2022-04-08 12:03:09 +02:00
Antonio Scandurra
da976012a9
Allow simulate_guest
and simulate_host
to fail when host disconnects
2022-04-08 11:29:00 +02:00
Antonio Scandurra
fae9048a2a
Remove non-determinism from Peer
caused by using std's HashMap
2022-04-08 11:28:19 +02:00
Keith Simmons
3e40b5bead
dynamically inject theme names and language properties into schema
2022-04-07 18:15:02 -07:00
Max Brunsfeld
c801a52492
Convert some actions to use named fields
...
Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-04-07 16:44:37 -07:00
Max Brunsfeld
5242a3a6dc
Restructure action macro to assign a namespace to every action
...
Also, allow arbitrary types to be used as Actions via the impl_actions macro
Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-04-07 16:20:49 -07:00
Keith Simmons
035cd37aa8
Add explicit types for LanguageOverrides and Themes to SettingsFileContent in order to improve completions in zed settings file
2022-04-07 16:00:51 -07:00
Max Brunsfeld
206b0f0f8c
0.25.0
2022-04-07 12:03:43 -07:00
Nathan Sobo
717f53e3d2
WIP
2022-04-07 09:29:47 -06:00
Antonio Scandurra
0b8eed64ad
Merge pull request #765 from zed-industries/yield-lsp
...
Don't starve UI thread when rapidly receiving LSP messages
2022-04-07 17:15:19 +02:00
Nathan Sobo
80d55fd3d8
Don't starve UI thread when rapidly receiving LSP messages
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-04-07 08:30:42 -06:00
Antonio Scandurra
b396909035
Calculate hitbox based on visible bounds in {Mouse}EventHandler
...
This is in contrast to not dispatching the event altogether in `Flex` when
the event is not contained in the flex element bounds. That approach was
problematic because it didn't give an opportunity to `MouseEventHandler`s
to handle mouse move events when they didn't intersect with the element bounds,
causing elements to never clear their hover state, cursor style, etc.
2022-04-07 15:12:09 +02:00
Antonio Scandurra
73f2fd6b09
Pass visible bounds to Element::dispatch_event
2022-04-07 15:10:09 +02:00
Antonio Scandurra
ae415ee49b
Merge pull request #763 from zed-industries/inconsistent-diagnostic-state
...
Fix bad diagnostic state when restarting a language server w/ a running diagnostic task
2022-04-07 09:54:00 +02:00
Antonio Scandurra
7c21b61ad9
Merge pull request #748 from zed-industries/fix-outline-panic
...
Don't assume there are always matches in outline view
2022-04-07 09:49:13 +02:00
Antonio Scandurra
52251c3463
Merge pull request #745 from zed-industries/scroll-tabs
...
Allow pane tabs to be scrolled when they overflow
2022-04-07 09:48:54 +02:00
Max Brunsfeld
f73de202d0
Fix diagnostic updates after restarting an LSP w/ a pending diagnostic job
2022-04-06 22:02:27 -07:00
Max Brunsfeld
b354af7bda
Use an unbounded channel in gpui test helper methods
...
The bounded channel could fill up when many events were emitted in one
effect cycle.
2022-04-06 22:02:04 -07:00
Max Brunsfeld
ec837fa6d7
Update breadcrumbs when multibuffers' excerpts change
2022-04-06 17:12:36 -07:00
Max Brunsfeld
8f38ac8270
Tweak structure of Project::on_lsp_progress so it can be auto-formatted
...
Previously, rustfmt seems to have given up on formatting this method.
2022-04-06 16:35:58 -07:00
Max Brunsfeld
ea63df0519
Don't activate the next pane when opening excerpts
2022-04-06 15:46:11 -07:00
Keith Simmons
67b15ee037
Use language specific tabsize in editor commands
...
Co-authored-by: Max Brunsfeld <max@zed.dev>
2022-04-06 15:10:29 -07:00
Keith Simmons
1812480cbb
Tab size is pulled properly from settings instead of hardcoded
2022-04-06 10:23:37 -07:00
Max Brunsfeld
866ffdd4ae
Move Settings to its own crate
...
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-04-06 10:23:33 -07:00
Max Brunsfeld
664f17f92b
Avoid maintaining indent size as state on buffers
...
Indent size is still hard-coded, but it's now controlled by the
editor and not the buffer.
Co-authored-by: Keith Simmons <keith@zed.dev>
2022-04-06 10:22:29 -07:00
Nathan Sobo
0214bec7f4
Don't dispatch events to flex children outside of parent flex's bounds
2022-04-06 10:59:03 -06:00
Nathan Sobo
e21f90fec5
Merge pull request #747 from zed-industries/styles-in-typescript
...
Style the Zed app using Typescript styleTrees and Design Tokens
2022-04-06 10:39:10 -06:00
Nate Butler
b1eda1ac39
Add border to top of status bar
2022-04-06 12:25:15 -04:00
Nathan Sobo
ca64b081fe
Don't assume there are always matches in outline view
2022-04-06 09:33:47 -06:00
Antonio Scandurra
d7342e2875
Use Pane::activate_item
when navigating to remove duplicated logic
2022-04-06 09:31:54 +02:00
Antonio Scandurra
1453954ef4
Autoscroll to active tab when activating a new item
2022-04-06 09:08:44 +02:00
Nate Butler
e201826d00
Update Light & Dark themes
2022-04-06 01:46:10 -04:00
Nathan Sobo
eb99588368
Remove stray dbg! expressions
2022-04-05 20:02:45 -06:00
Nathan Sobo
ab3bbe1e17
Make the tabs scrollable when they overflow
...
This adds the ability to make a Flex element scrollable by passing a type tag and instance id, which we use to store the scroll position in an ElementStateHandle.
Still need to allow the element to auto-scroll.
2022-04-05 19:58:15 -06:00
Nathan Sobo
025d857be8
Make UniformListState an Rc<RefCell<>> instead of an Arc<Mutex<>>
...
We don't need to support multiple threads.
2022-04-05 18:40:25 -06:00
Nate Butler
2a2c4071f4
Update light syntax theme and highlights, player selections
2022-04-05 18:49:17 -04:00
Nate Butler
35f56708f5
Update light theme, change player 3 color
...
- Changed player 3 color to be less similar to player 1
2022-04-05 18:23:01 -04:00
Nathan Sobo
aeb0b42c7a
Report more information when we panic due to an allocation failure
2022-04-05 13:53:13 -06:00
Nathan Sobo
4f4364d510
Ensure we drop the last pane item
...
Previously, we weren't updating the toolbar's active item when emptying out a pane. This enhances an integration test to ensure that we don't hold references to any editors or buffers once we close everything.
2022-04-05 13:05:14 -06:00
Nathan Sobo
41a27e6925
💄
2022-04-05 12:09:40 -06:00
Nathan Sobo
e2bf89b1e8
Don't require a path in TestAppContext::dispatch_action
...
Instead, derive it from the presenter. This makes tests easier to write and more reliable since we'll be accurately simulating the actual relationship between parent and child views.
2022-04-05 12:08:25 -06:00
Nathan Sobo
3da8f7f944
Fix dispatch path in test
2022-04-05 11:55:29 -06:00
Antonio Scandurra
c3b947ca26
Show unsaved/conflict prompt only when closing the last tab for an item
...
Also, ensure we show the correct prompt when files have conflicts.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-05 19:38:27 +02:00
Nate Butler
d21dea6112
Squashed commit of the following:
...
commit 66d4cbae2ca6d7dd660688d7eb702ae55bf3e0ca
Author: Nate Butler <iamnbutler@gmail.com>
Date: Tue Apr 5 13:33:33 2022 -0400
WIP: Improve legibility of contactsPanel and fix errors
Co-Authored-By: Keith Simmons <keith@the-simmons.net>
commit 000319c583801c5ba4ed7884bbf3da2a591e3f26
Author: Nate Butler <iamnbutler@gmail.com>
Date: Tue Apr 5 13:13:32 2022 -0400
WIP
2022-04-05 13:34:06 -04:00
Antonio Scandurra
cac0dddb1b
Restructure item closing to take the Workspace
instead of the Pane
2022-04-05 19:12:17 +02:00
Antonio Scandurra
939def42e3
v0.24.1
2022-04-05 16:23:27 +02:00
Antonio Scandurra
cc45658b2d
Clear diagnostics from buffer when unregistering it from language server
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-05 16:01:33 +02:00
Antonio Scandurra
7e3cc67e0a
Don't reuse old syntax tree when resetting a buffer's language
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-05 16:01:05 +02:00
Antonio Scandurra
5c7f2bb029
Close and re-open buffer in language server when it gets renamed
2022-04-05 15:15:43 +02:00
Antonio Scandurra
9188f51993
Add unit test to illustrate how language server renames should work
2022-04-05 14:47:37 +02:00
Antonio Scandurra
5ef484c9a1
Update followers when navigating back and forth
2022-04-05 10:42:35 +02:00
Antonio Scandurra
4a5c49eb6e
Skip checking for updates when an update has already been installed
2022-04-05 10:18:37 +02:00
Antonio Scandurra
4adb245771
💄
2022-04-05 10:16:08 +02:00
Antonio Scandurra
493450f6a8
Massage styling of auto-update messages a bit
2022-04-05 10:15:26 +02:00
Antonio Scandurra
bd0b063bd1
Display Installing update…
when the new app is being copied
2022-04-05 10:07:45 +02:00
Antonio Scandurra
61c479ebc8
Pass an NSString
to objectForInfoDictionaryKey
2022-04-05 10:02:37 +02:00
Max Brunsfeld
e566a8335f
Find path to running app using [NSBundle bundlePath]
2022-04-04 20:53:46 -07:00
Max Brunsfeld
fb2caf3c58
Add application menu item for checking for updates
2022-04-04 18:34:14 -07:00
Max Brunsfeld
9c469f2fdb
Add remaining logic for downloading updates, add status bar indicator
2022-04-04 18:34:14 -07:00
Nathan Sobo
66544d54f2
Drop borrow to window state before calling beginSheetModalForWindow
...
Co-Authored-By: Keith Simmons <keith@the-simmons.net>
2022-04-04 16:18:28 -06:00
Keith Simmons
05a05157fa
Move style source files to src and build to dist
...
Co-authored-by: Nate Butler <nate@zed.dev>
2022-04-04 14:43:13 -07:00
Nathan Sobo
6a1be11aa6
Wait to create access token until we impersonate a user
...
We need to wait to create the token until we decide on whether we're impersonating a different user, otherwise we'll create the token for the original user and the impersonated user won't be able to authenticate.
2022-04-04 15:07:55 -06:00
Nate Butler
3dc99a8743
Update dark, light themes.
2022-04-04 12:14:00 -07:00
Nate Butler
90df8a31e7
Fix incorrect ramp preset values in color.ts
...
- Regenerate themes and tokens as well
2022-04-04 12:14:00 -07:00
Nate Butler
631d8d0344
Refined dark theme styles
2022-04-04 12:14:00 -07:00
Nate Butler
c374fd2f54
WIP
2022-04-04 12:14:00 -07:00
Nate Butler
381d50bac6
WIP
2022-04-04 12:14:00 -07:00
Nathan Sobo
391aed3d66
Start loading new theme JSON format instead of TOML
...
Replaced remaining extends with javascript object extension.
Moved tokens/core.ts to tokens.ts and massaged the types to make it more
obvious when types don't match up.
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-04-04 12:13:59 -07:00
Antonio Scandurra
38e902b241
WIP: Start on auto-update
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
Co-Authored-By: Keith Simmons <keith@zed.dev>
2022-04-04 18:59:57 +02:00
Antonio Scandurra
cbf6d827db
v0.24.0
2022-04-04 15:09:31 +02:00
Antonio Scandurra
c62a3ea672
Merge pull request #687 from zed-industries/vim-word-and-line-movement
...
Add word and line movement in vim normal mode
2022-04-04 14:42:27 +02:00
Antonio Scandurra
328be473e5
Rename sub_mode
to submode
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-04 14:14:21 +02:00
Nathan Sobo
9702ab0075
Merge pull request #719 from zed-industries/misc-breadcrumbs-bugs
...
Fix miscellaneous breadcrumbs bugs
2022-04-04 05:42:55 -06:00
Nathan Sobo
9ce19a2ea1
Merge pull request #723 from zed-industries/save-as-on-close
...
Prompt to save untitled buffers when closing them if they are dirty
2022-04-04 05:38:53 -06:00
Antonio Scandurra
dee416bdbe
Avoid text insertion when holding down the fn
key
2022-04-04 11:13:35 +02:00
Antonio Scandurra
089b0e8e0f
Remove duplicate activation logic when removing items from pane
2022-04-03 13:00:39 +02:00
Antonio Scandurra
80b599c4ef
Prompt to save untitled buffers when closing them while they are dirty
2022-04-03 12:43:33 +02:00
Antonio Scandurra
b0b54365c7
Re-render breadcrumbs when buffer has been reparsed
2022-04-02 16:33:24 +02:00
Antonio Scandurra
d0a17f8c2c
Update toolbar and automatically unfollow when navigating back and forth
2022-04-02 16:32:50 +02:00
Antonio Scandurra
c39de1f9dc
Show full path for file worktrees or when there is more than 1 worktree
2022-04-02 16:10:10 +02:00
Antonio Scandurra
9225629208
Re-render breadcrumbs on save or when the editor title changes
2022-04-02 15:51:59 +02:00
Max Brunsfeld
fe27a27cb6
Merge branch 'main' into prompt-on-close
2022-04-01 15:29:23 -07:00
Max Brunsfeld
79bd8642e6
Merge pull request #702 from zed-industries/typescript
...
Add support for JS/Typescript/TSX, allow language servers to support multiple languages
2022-04-01 15:24:58 -07:00
Max Brunsfeld
c4d3bbf184
Bump protocol version
2022-04-01 15:17:30 -07:00
Max Brunsfeld
7ad862673d
Add basic syntax highlight colors for typescript completions
2022-04-01 15:05:03 -07:00
Max Brunsfeld
5090e6f146
Fix common_prefix_at panic when needle contains multibyte chars
...
Also, make the prefix matching case-insensitive, since this is the
typical behavior with autocomplete.
2022-04-01 14:52:38 -07:00
Max Brunsfeld
6f28033efe
Add explanatory comments in unit test for code actions w/ commands
2022-04-01 13:00:06 -07:00
Max Brunsfeld
fe8e06e781
Fix clipping when using label-only completions
2022-04-01 12:07:41 -07:00
Max Brunsfeld
ba009724dd
Handle LSP apply workspace edit request fully before responding
2022-04-01 11:59:21 -07:00
Max Brunsfeld
56523b5775
Allow applying code actions that use commands
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-04-01 10:16:26 -07:00
Antonio Scandurra
be677a8a4b
Don't assume the CloseActiveItem
action is synchronous in test
2022-04-01 15:27:06 +02:00
Antonio Scandurra
e93ab4db14
Prompt before closing buffer with unsaved changes or conflicts
2022-04-01 14:33:07 +02:00
Antonio Scandurra
703f1c3be0
Introduce workspace::Item::reload
to manually trigger a reload
2022-04-01 14:02:49 +02:00
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