Max Brunsfeld
a217e2e64b
Implement basic AddFile command in project panel
2022-05-04 10:28:09 -07:00
Max Brunsfeld
d4492086b3
Abstract more local project setup inside Project::test helper
2022-05-04 10:28:09 -07:00
Keith Simmons
d4bef67cf2
Merge pull request #929 from zed-industries/non-uniform-batched-edits
...
Allow batched edits where each range is associated with different insertion text
2022-04-29 16:14:38 -07:00
Keith Simmons
b4b61b4bbc
Consolidate edit and edit_batched functions
2022-04-28 16:52:04 -07:00
Keith Simmons
04fc1d5982
Building, but failing test WIP
2022-04-27 17:25:38 -07:00
Antonio Scandurra
c955645bc0
Update share icon and swap its posiiton
2022-04-26 14:35:13 +02:00
Max Brunsfeld
45922603f8
Infer completions old ranges based on the syntax tree
2022-04-25 13:14:05 -07:00
Max Brunsfeld
8ddc7e6458
Respect lsp completions' 'insert_text' property when present
...
Fixes #839
2022-04-22 14:33:13 -07:00
Antonio Scandurra
63cdf61c53
Fix Project::test_rename
2022-04-22 15:59:20 +02:00
Antonio Scandurra
f91fdd2ba0
Return None
when prepare rename is not available on language server
2022-04-22 15:43:23 +02:00
Max Brunsfeld
f52050a9ec
Use the 'jsonc' language id for all JSON files
...
This way, comments are allowed by the language server.
2022-04-21 12:08:16 -07:00
Antonio Scandurra
8ef6b1d8a9
Don't emit event when LSP reports consecutive empty diagnostics
...
This is related to #849 : in that pull request we avoided *storing*
empty diagnostics, but we'd still report an event when receiving
consecutive empty diagnostics. So if the project diagnostics editor
was open, it could happen that opening a buffer would cause the
language server to report zero diagnostics. We would therefore close
the buffer because there were no diagnostics, but doing so would cause
the LSP to report another event with zero diagnostics. This would repeat
forever, causing Zed to use a lot of CPU and the UI not to refresh properly.
With this commit we will simply avoid emitting a `DiagnosticsUpdated` event
altogether if no diagnostics were present before *and* the LSP is reporting
a `PublishDiagnostics` event with no diagnostics in it.
2022-04-20 15:02:38 +02:00
Antonio Scandurra
ef784cf21e
Remove summaries that don't contain any errors or warnings
...
When opening a buffer, some language servers might start reporting
diagnostics. When closing a buffer, they might report that no diagnostics
are present for that buffer. Previously, we would keep an empty summary entry
which would cause us to open a buffer in the project diagnostics view, only to
drop it because it contained no diagnostics. However, the act of opening it
caused the language server to asynchronously report non-empty diagnostics.
We would therefore handle this as an update, but the previous closing of the
buffer would cause the language server to report empty diagnostics again. This
would cause the project diagnostics view to thrash infinitely between these two
states, pegging the CPU and constantly refreshing the UI.
With this commit we won't maintain empty summary entries for files that contain
no diagnostics, which fixes the above issue.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-04-19 15:30:46 +02:00
Antonio Scandurra
eaa6637b05
Use the entire ProjectPath
to find open buffer for an LSP diagnostic
...
Previously, we would only compare the path relative to the worktree root, which
would cause Zed to sometimes update diagnostics on the wrong buffer. This
manifested in the project diagnostics not showing those errors/warnings while
the status bar and the tab title displayed a summary with errors/warnings.
This commit simply uses `Project::get_open_buffer` which correctly locates a
buffer with the given project path.
2022-04-19 12:06:14 +02:00
Max Brunsfeld
6317c049c5
Merge pull request #800 from zed-industries/tolerate-lsp-workspace-symbols-failure
...
Avoid bailing out of Project::symbols when one LSP request fails
2022-04-11 21:14:51 -07:00
Max Brunsfeld
ae9f71cc07
Avoid bailing out of Project::symbols when one LSP request fails
2022-04-11 21:09:01 -07:00
Max Brunsfeld
949fbe7cd3
Allow dumping the project diagnostic view's state as JSON
...
Also, improve DebugElements action so that it shows the JSON in an editor.
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2022-04-11 19:51:46 -07:00
Nathan Sobo
17195e615e
Merge pull request #781 from zed-industries/structured-logging
...
Introduce structured logging
2022-04-09 07:40:24 -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
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
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
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
Keith Simmons
1812480cbb
Tab size is pulled properly from settings instead of hardcoded
2022-04-06 10:23:37 -07: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
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
Max Brunsfeld
fe27a27cb6
Merge branch 'main' into prompt-on-close
2022-04-01 15:29:23 -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
65048760b2
Allow explicit reload of buffers via Project::reload_buffers
2022-04-01 14:01:56 +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
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
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
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
a8600e76a3
Make language's language server config non-optional
2022-03-28 18:14:49 -07:00
Antonio Scandurra
cbd266052d
Allow returning futures in fake language server request handlers
2022-03-28 10:44:32 +02: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
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
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
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
e5a99cf8cd
Stop following when leader disconnects
2022-03-22 11:16:04 +01:00
Antonio Scandurra
3117554568
Automatically unfollow when editing, scrolling or changing selections
2022-03-22 09:17:01 +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
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
6446660c88
Rename open_buffer_for_path
to open_buffer
2022-03-17 11:42:13 +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
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
7155dabf5b
Fade out unnecessary code
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-15 15:51:59 +01:00
Antonio Scandurra
021699e51c
Implement shift-f8
to go to previous diagnostic
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-15 15:13:23 +01:00
Max Brunsfeld
3a439f141d
Open settings file in new window if current window isn't local
...
Co-Authored-By: Keith Simmons <keith@zed.dev>
2022-03-14 17:12:07 -07:00
Max Brunsfeld
5822b47b74
Ensure that worktrees' entry ids are unique across the project
...
Fixes #512
2022-03-14 12:36:56 -07:00
Max Brunsfeld
20fed599b2
Start work on relaying settings to language servers
2022-03-11 17:36:27 -08:00
Antonio Scandurra
18b1e9d35f
Don't starve main thread when lots of messages/events arrive at once
2022-03-11 10:09:13 +01:00
Antonio Scandurra
7a454003fe
Show the last in-progress task from language servers
2022-03-11 09:59:13 +01:00
Antonio Scandurra
5157b42896
Extract a LanguageServerStatus
struct
2022-03-10 18:43:56 +01:00
Antonio Scandurra
45fb470f4d
Display language server name in status bar
2022-03-10 16:48:43 +01:00
Antonio Scandurra
4243f0c339
Render pending language server work in status bar
2022-03-10 16:09:47 +01:00
Antonio Scandurra
4bbf5ed0b9
Listen to all LSP progress notifications and broadcast them to peers
2022-03-10 12:00:33 +01:00
Antonio Scandurra
7546ede288
Split language server initialization from construction
...
This gives clients a chance to register to notifications.
2022-03-09 12:31:21 +01:00
Antonio Scandurra
ef1ec88523
Remove delegate support from GPUI
...
We added this because we thought it would save some allocations when
sending operations given that we could move them to the delegate upon
notifying it, but the reality is that we serialize operations and that
only requires a reference.
2022-03-09 10:48:52 +01:00
Antonio Scandurra
0a9595b5fa
Notify all language servers only when a buffer is saved
...
Other notifications such as opening, closing or changing a document
are still tied to the buffer's language.
2022-03-09 10:44:03 +01:00
Max Brunsfeld
4cb4b99c56
Assign buffer's completion triggers from LSP capabilities
...
Also, make LanguageServer::new() async. The future resolves
once the server is initialized.
2022-03-08 17:41:52 -08:00
Antonio Scandurra
317a1bb07b
Remove language servers from buffers
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
Co-Authored-By: Keith Simmons <keith@zed.dev>
2022-03-08 15:16:07 -08:00
Antonio Scandurra
6662ba62a3
Move DidSaveTextDocument
notification from Buffer
to Project
2022-03-08 11:35:54 +01:00
Antonio Scandurra
51d5ed48f0
Remove unused CloseBuffer
message
2022-03-08 11:17:20 +01:00
Antonio Scandurra
d6c8fdb3c4
Send buffer operations via the Project
instead of Worktree
2022-03-08 11:11:25 +01:00
Max Brunsfeld
5cc5fa2f93
Populate environment from shell
...
Co-Authored-By: Keith Simmons <keith@zed.dev>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-07 16:39:50 -08:00
Max Brunsfeld
1982a8c27d
Put vector clock serialization logic alongside other serialization logic
...
This way, the `clock` crate doesn't depend on the `rpc` crate.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-04 13:54:07 -08:00
Nathan Sobo
a72d58a28c
Merge branch 'main' into disconnected-status
2022-03-04 10:07:26 -07:00
Antonio Scandurra
b21d91db22
Render overlay after remote project becomes read-only
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-04 17:28:18 +01:00
Antonio Scandurra
6ee5e96d7b
Merge pull request #534 from zed-industries/create-buffers-via-project
...
Open untitled buffers via the `Project`
2022-03-04 16:18:02 +01:00
Antonio Scandurra
29cad65ce0
Open untitled buffers via the Project
...
This allows the registration of such buffers in the project, which is necessary
to correctly support `::save_buffer_as` and opens the door to sharing untitled
buffers with guests in the future.
Note that, for now, this disallows guests to create untitled buffers in the
current window and will create a new window instead. This is because we don't
yet have a global way of allocating a buffer's remote id (nor a way of saving
such buffers in the host's worktree) and we instead rely on the local model ID,
which could clash with the host's buffer IDs.
I think we should revisit this once guests can share their untitled buffers
with the host and other remote peers, as well as once we start keying
operations by entry id.
2022-03-04 15:25:39 +01:00
Antonio Scandurra
d8ef3a5d61
Support formatting in fake LSP capabilities
2022-03-04 11:24:18 +01:00
Antonio Scandurra
46da80d726
Use LSP range formatting when document formatting is not available
2022-03-04 10:13:17 +01:00
Antonio Scandurra
dc5a09b3f7
Merge pull request #525 from zed-industries/preserve-worktrees
...
Grow worktrees monotonically when sharing and move most messages to the background
2022-03-04 09:48:18 +01:00
Max Brunsfeld
19658139b1
Avoid infinite loop when a language server fails to start
2022-03-03 18:13:38 -08:00
Max Brunsfeld
05df1dfae9
Disable doctests for all libraries
...
We don't use them, and they add a lot of noise to the test output
when running all tests in the workspace.
2022-03-03 16:15:56 -08:00
Max Brunsfeld
3c242a43d2
Wait for LSP capabilities to be initialized before checking them
2022-03-03 15:59:03 -08:00
Max Brunsfeld
81627a0f14
Avoid sending unhandled LSP requests to JSON language server
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-03 13:39:40 -08:00
Antonio Scandurra
410ee124af
Maintain remote worktrees correctly when building updates
...
This accidentally regressed in 53327e2
.
2022-03-03 16:13:17 +01:00
Antonio Scandurra
c613b22619
Ignore diagnostics received for invisible worktrees
2022-03-03 13:58:55 +01:00
Antonio Scandurra
14d26eeedc
Move several buffer-related messages to the background
2022-03-03 12:18:19 +01:00
Antonio Scandurra
1c14168f38
Ensure no two worktrees can point to the same root path
...
This could happen because there was a pause between creating the worktree
and adding it to the list of tracked local worktrees, and so we might end
up adding the same worktree twice when calling `create_local_worktree` in
rapid succession.
2022-03-03 10:54:52 +01:00
Antonio Scandurra
d171d8ccc4
Change the definition of check_invariants
...
- On the host, ensure that only one worktree can exist for a given absolute
path. Asserting about buffers was cool but I think should be tackled in the
context of leaning more on entry ids for collaboration (vs. buffer ids).
- On the guest, ensure that all the opened buffers don't contain deferred
operations.
2022-03-03 10:51:37 +01:00
Antonio Scandurra
53327e2bf0
Ensure worktree is registered/shared synchronously
2022-03-03 10:10:53 +01:00
Max Brunsfeld
d4ae38fcee
Check projects' buffers have unique absolute paths in random collab test
2022-03-02 14:38:16 -08:00
Max Brunsfeld
ca920e1552
Rename strong_worktrees -> visible_worktrees
2022-03-02 14:38:16 -08:00
Antonio Scandurra
68cfce1fb8
Rename weak
to visible
...
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-03-02 14:38:16 -08:00
Antonio Scandurra
07120d47f9
Convert weak worktree handles into strong handles when sharing
...
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-03-02 14:38:16 -08:00
Antonio Scandurra
efe7f61128
Use simulate_random_delay
when polling snapshot only in tests
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-03-01 19:17:38 +01:00
Antonio Scandurra
c661ff251d
Revert "Use async_broadcast
to emit fake FS events"
...
This reverts commit 4cfd345f9d
, because
having a bounded broadcast introduces the possibility of waiting forever
when there isn't yet a receiver processing those events.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-01 17:14:40 +01:00
Antonio Scandurra
0bb7189842
Use a weak handle to poll local worktree snapshot
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-01 17:08:10 +01:00
Antonio Scandurra
4cfd345f9d
Use async_broadcast
to emit fake FS events
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-01 15:48:15 +01:00
Antonio Scandurra
8d078ed4e2
Don't block when emitting fs events
...
Blocking could happen while processing events, which would cause the
background scanner to never make any further progress.
2022-03-01 13:08:50 +01:00
Antonio Scandurra
466db69780
Pass a reference to TestAppContext
in tests
...
This allows us to drop the context *after* we ran all futures to
completion and that's crucial otherwise we'll never drop entities
and/or flush effects.
2022-03-01 12:01:02 +01:00
Max Brunsfeld
1faaa91e52
Avoid retaining executor in the FakeFs
...
This probably isn't the *root* cause of why an executor is leaked,
but by cutting off this cyclic references, it may make it a bit easier
to track down leaks of an executor.
2022-02-28 22:40:04 -08:00
Max Brunsfeld
d1d324e42b
Never close buffers when sharing
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-02-28 11:36:43 -08:00
Antonio Scandurra
400a2fce58
Don't use a bounded channel for signaling that buffers have been opened
...
Blocking the sender could halt deserialization for no reason if nobody
is consuming the notifications.
2022-02-28 15:26:10 +01:00
Antonio Scandurra
1313ca8415
Don't delete buffer state when calling get_open_buffer
...
...as we might be in the process of completing a request that could
open a buffer. This was causing a failure in the randomized integration
test.
2022-02-28 14:27:31 +01:00
Antonio Scandurra
abdfdcdabf
Include buffer's deferred ops when computing has_buffered_operations
2022-02-28 14:22:24 +01:00
Antonio Scandurra
720056d0db
Add unit test for project search
2022-02-28 11:10:22 +01:00
Nathan Sobo
dd6f8d20a3
Remove carriage returns
2022-02-27 07:47:46 -07:00
Nathan Sobo
e822c6a64e
Handle project-wide search on guests
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-02-25 15:09:47 -07:00
Antonio Scandurra
88bfe5acb0
Allow splitting project find and maintain the searches in sync
2022-02-25 16:20:02 +01:00
Antonio Scandurra
29e035a70d
Don't report a buffer when it doesn't contain any matches
2022-02-25 15:40:19 +01:00
Antonio Scandurra
2147db9b41
Open searched buffers in parallel
2022-02-25 12:29:50 +01:00
Antonio Scandurra
561123d6de
Avoid extra smol::channel
when iterating through snapshot paths
2022-02-25 11:49:33 +01:00
Antonio Scandurra
6a0cca7178
Add a fast path for when the search query is empty
2022-02-25 10:58:45 +01:00
Antonio Scandurra
0bf944e038
Use Project::search
in ProjectFind
and show search results
2022-02-25 10:32:45 +01:00
Antonio Scandurra
6d9b003634
WIP: Start sketching in ProjectFindView
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-02-24 19:07:00 +01:00
Antonio Scandurra
e83d1fc9fc
Start on a regex implementation of SearchQuery
2022-02-24 16:33:31 +01:00
Antonio Scandurra
76cc9b347e
Extract a search
module
2022-02-24 15:55:13 +01:00
Antonio Scandurra
6a323ce2dd
Implement a basic project-wide search using Aho-Corasick
2022-02-24 15:33:56 +01:00
Antonio Scandurra
26f7f4f5b2
WIP: Remove ripgrep and start matching query for paths ourselves
2022-02-24 12:33:28 +01:00
Antonio Scandurra
119bfaa99f
WIP
2022-02-24 11:57:53 +01:00
Antonio Scandurra
fed6f708c0
Start on project-wide find
2022-02-24 11:57:53 +01:00
Antonio Scandurra
8fa23c702c
Store ops if buffer handle can't be upgraded and buffer requests are in-flight
2022-02-24 09:32:31 +01:00
Max Brunsfeld
a6613d5345
Store operations for unknown buffers when there are outstanding buffer RPC requests
2022-02-23 20:35:05 -08:00
Max Brunsfeld
6060077444
Remove unused pending_updates field from RemoteWorktree
2022-02-23 16:59:39 -08:00
Max Brunsfeld
170487a528
Fix race conditions with LSP requests that return buffers
...
* Avoid panic when registering a buffer that was previously open,
and whose weak handle was still present in the open_buffers map.
* Avoid releasing any buffers while a request is outstanding which
could return a reference to a buffer.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-23 15:26:01 -08:00
Nathan Sobo
17c9aa1819
Remove ShareWorktree message
...
Instead, create an empty worktree on guests when a worktree is first *registered*, then update it via an initial UpdateWorktree message.
This prevents the host from referencing a worktree in definition RPC responses that hasn't yet been observed by the guest. We could have waited until the entire worktree was shared, but this could take a long time, so instead we create an empty one on guests and proceed from there.
We still have randomized test failures as of this commit:
SEED=9519 MAX_PEERS=2 ITERATIONS=10000 OPERATIONS=7 ct -p zed-server test_random_collaboration
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-02-23 11:56:09 -07:00
Antonio Scandurra
d1b4384f80
WIP
2022-02-23 19:04:22 +01:00
Antonio Scandurra
8440644dc9
Remove update_id from worktree update messages
...
We don't need this anymore because worktree updates are foreground
messages.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-02-23 18:35:25 +01:00
Antonio Scandurra
f3c6320eeb
Move document highlights RPC message to the background
2022-02-23 16:16:02 +01:00
Antonio Scandurra
9e173564e9
Pass an AsyncAppContext
to fake language server request handlers
2022-02-23 16:14:36 +01:00
Max Brunsfeld
e140f70e3c
Show document highlights from the language server when moving the cursor
2022-02-22 17:16:31 -08:00
Max Brunsfeld
25d45378e4
Implement find-all-references
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-22 14:27:16 -08:00
Max Brunsfeld
5d2201c4ca
Add integration test for project symbols
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-22 12:44:17 -08:00
Max Brunsfeld
669fe775df
Normalize paths passed to the FakeFs
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-22 12:43:56 -08:00
Max Brunsfeld
64098247cb
Allow languages to be registered at any time
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-02-22 10:35:20 -08:00