Antonio Scandurra
2e7bfd19c1
Create buffers for remote collaborators out of band
...
Previously, we would use `Project::serialize_buffer_for_peer` and
`Project::deserialize_buffer` respectively in the host and in the
guest to create a new buffer or just send its ID if the host thought
the buffer had already been sent.
These methods would be called as part of other methods, such as
`Project::open_buffer_by_id` or `Project::open_buffer_for_symbol`.
However, if any of the tasks driving the futures that eventually
called `Project::deserialize_buffer` were dropped after the host
responded with the buffer state but (crucially) before the guest
deserialized it and registered it, there could be a situation where
the host thought the guest had the buffer (thus sending them just the
buffer id) and the guest would wait indefinitely.
Given how crucial this interaction is, this commit switches to creating
remote buffers for peers out of band. The host will push buffers to guests,
who will always refer to buffers via IDs and wait for the host to send them,
as opposed to including the buffer's payload as part of some other operation.
2022-08-17 11:55:36 +02:00
ForLoveOfCats and Mikayla
fbea44bc5c
One big cleanup pass of clippy lints
...
Co-authored-by: Mikayla <mikayla@zed.dev >
2022-08-10 16:51:01 -07:00
ForLoveOfCats
3c06dc3982
Deduplicate some lsp_command code
2022-07-29 18:04:14 -04:00
ForLoveOfCats
ef6efc9590
Add "go to type definition" action
2022-07-29 11:41:08 -04:00
Isaac Clayton
c4c1977bdb
Fix errors resulting from rebase
2022-07-07 18:14:16 +02:00
Antonio Scandurra
e8850d498c
Merge branch 'main' into user-timeline
2022-07-04 09:23:16 +02:00
Keith Simmons
d6fdc079a9
Prevent creating extra language server instances if there already exists one for that workspace
2022-06-30 16:46:26 -07:00
Antonio Scandurra and Nathan Sobo
1be4549c4e
Send extension counts when metadata changes
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-06-29 17:58:11 +02:00
Keith Simmons
72723ce560
Address hover panic and add hint to install go when language server failed to install
2022-06-27 15:48:15 -07:00
Keith Simmons
b2c6087d10
Working underline based on symbol origin
2022-06-24 15:05:35 -07:00
Keith Simmons
9f53cfb758
Fix delayed lsp request
2022-06-09 17:03:45 -07:00
Keith Simmons
69bc9489f6
Add integration test and fix hovering over the wire
2022-06-07 14:22:02 -07:00
Keith Simmons
7f12bd6bb0
Add vim bindings for hover
...
Allow scrolling in hover popover
2022-06-07 13:07:53 -07:00
Keith Simmons
76104481b6
Move highlighting to editor code and implement proto message types for hover response
2022-06-07 11:54:52 -07:00
Keith Simmons
017e95f782
working markdown rendering
2022-06-07 11:54:51 -07:00
Keith Simmons
2a50811651
Syntax highlighting working. Getting started on markdown support
2022-06-07 11:54:33 -07:00
Isaac Clayton
f14734bc51
Add basic debounce, fix flickering
2022-06-07 11:54:31 -07:00
Keith Simmons
98c402c349
Pull hover popover out of context menu
2022-06-07 11:54:00 -07:00
Isaac Clayton
91acab26b0
Get minimal POC working
2022-06-07 11:52:52 -07:00
Antonio Scandurra
fdfcbaa63b
Return None when prepare rename is not available on language server
2022-04-22 15:43:23 +02:00
Keith Simmons and Max Brunsfeld
0468cc5952
Provide diagnostic context to codeAction
...
Co-authored-by: Max Brunsfeld <max@zed.dev >
2022-03-31 15:39:52 -07:00
Max Brunsfeld
207e166471
Start work on allowing language servers to support multiple languages
2022-03-29 16:57:18 -07:00
Antonio Scandurra
b1001b0759
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
111d5305ea
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
Max Brunsfeld and Nathan Sobo
8529a10317
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
Antonio Scandurra
3ad7272559
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 and Nathan Sobo
c52c48c72e
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
e18e172cda
Move several buffer-related messages to the background
2022-03-03 12:18:19 +01:00
Max Brunsfeld and Antonio Scandurra
912613a5a1
Never close buffers when sharing
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2022-02-28 11:36:43 -08:00
Max Brunsfeld and Nathan Sobo
d9d10dffe3
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
Max Brunsfeld
ba2aa6798f
Show document highlights from the language server when moving the cursor
2022-02-22 17:16:31 -08:00
Max Brunsfeld and Nathan Sobo
c5888616cc
Implement find-all-references
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-02-22 14:27:16 -08:00
Antonio Scandurra
f8762ff1ce
Allow opening of buffers associated with a project symbol
2022-02-22 16:26:01 +01:00
Max Brunsfeld
7820c54d68
Handle GetDefinition via LspCommand trait
2022-02-18 16:45:52 -08:00
Max Brunsfeld
5a7f2f107c
Use async_trait for LspCommand
2022-02-18 16:07:30 -08:00
Max Brunsfeld
145d74c4ef
Refactor handling of remote renames
2022-02-18 10:45:06 -08:00
Antonio Scandurra
e60b62f45f
Add test for preparing and performing a rename
2022-02-18 12:18:01 +01:00
Antonio Scandurra
7a72d7aed7
Undo temporary edits before performing rename or canceling it
...
Also, wire up remote renames.
2022-02-18 11:41:47 +01:00
Max Brunsfeld
a40938e1ca
Start work on renames
2022-02-17 18:01:07 -08:00