Max Brunsfeld
01664d494c
Restructure fake language server to setup request handlers in advance
...
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-11 15:08:56 -08:00
Antonio Scandurra
a41725daee
Render code actions indicator
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-11 16:01:15 +01:00
Antonio Scandurra
4929b8c525
Move Buffer::format
to Project::format
2022-02-11 12:07:46 +01:00
Max Brunsfeld
6731d92f60
Give the editor a handle to the project, not a weak handle to the workspace
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-08 15:48:44 -08:00
Max Brunsfeld
93bcde953c
Consolidate logic for completion alongside code actions in Project
...
This way, completions are dealt with more consistently with code actions,
and the logic is not spread across so many places. The `language::File`
trait and the multibuffer no longer need to deal with completions. Completions
are no longer generic over an anchor type.
2022-02-08 14:24:45 -08:00
Max Brunsfeld
e0fe8b5a7c
Merge branch 'main' into assists
2022-02-08 12:41:57 -08:00
Antonio Scandurra
dca974c7d4
Apply code actions remotely
2022-02-08 12:18:14 +01:00
Antonio Scandurra
17114cc6f7
Merge branch 'main' into assists
2022-02-08 09:39:43 +01:00
Max Brunsfeld
050f95149e
Clear test db pool whenever no dbs are in use
2022-02-07 18:30:09 -08:00
Max Brunsfeld
c245356b42
Try another hacky approach for tearing down DBs after all tests
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-07 15:23:35 -08:00
Max Brunsfeld
b0ed58add3
Run multiple iterations of all integration tests
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-07 15:11:41 -08:00
Max Brunsfeld
e3f055d950
Use a pool of databases to speed up integration tests
...
Also, use env_logger consistently in the tests for each crate.
Only initiallize the logger at all if some RUST_LOG env var is set.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-07 15:00:00 -08:00
Max Brunsfeld
8a2613d49c
Preserve ordering between responses and other incoming messages
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-07 14:14:15 -08:00
Max Brunsfeld
d4fe1115e7
Use an unbounded channel for peer's outgoing messages
...
Using a bounded channel may have blocked the collaboration server
from making progress handling RPC traffic.
There's no need to apply backpressure to calling code within the
same process - suspending a task that is attempting to call `send` has
an even greater memory cost than just buffering a protobuf message.
We do still want a bounded channel for incoming messages, so that
we provide backpressure to noisy peers - blocking their writes as opposed
to allowing them to buffer arbitrarily many messages in our server.
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-07 12:27:13 -08:00
Antonio Scandurra
a172c3c5c6
Apply file-system operations coming from an LSP code action
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-07 16:11:40 +01:00
Antonio Scandurra
982e90539d
WIP: Start on applying code actions
2022-02-07 12:20:03 +01:00
Nathan Sobo
ba99b01de6
Generalize showing and hiding of context menus
...
We still cancel pending completions when hiding the context menu so its not perfectly general, but I think this is ok.
2022-02-05 12:13:02 -07:00
Nathan Sobo
93a3f4b615
Move rendering and select prev/next into ContextMenu enum
...
This prepares the way to have a code actions context menu.
2022-02-05 10:19:43 -07:00
Max Brunsfeld
3dfff3866a
Add integration test for getting and resolving completions
2022-02-03 15:24:16 -08:00
Antonio Scandurra
d765e75bad
Apply additional edits for completion when the buffer is remote
2022-02-02 16:29:13 +01:00
Antonio Scandurra
ed549e352f
Start on requesting completions for remote buffers
2022-02-02 12:22:47 +01:00
Max Brunsfeld
8d2b7ba032
Insert completion text on enter
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-31 13:46:50 -08:00
Max Brunsfeld
0e55f0ccaa
Use Rust 2021 edition in all crates
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-26 12:50:31 -08:00
Max Brunsfeld
0cfb9ff1ae
Add random delays in FakeFs
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-24 16:50:38 -08:00
Max Brunsfeld
2b8685c1a2
Insert random delays when sending and receiving websocket messages in tests
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-24 16:37:22 -08:00
Antonio Scandurra
b7314ef2aa
WIP: Start restructuring executor
2022-01-24 18:49:20 +01:00
Antonio Scandurra
96b66dcce1
Fix race condition when opening a buffer and getting a definition to it
2022-01-24 18:47:55 +01:00
Antonio Scandurra
dabab6e323
Verify simultaneously opening buffers via definition
and open_buffer
...
This fails because we don't yet handle this scenario.
2022-01-24 15:08:04 +01:00
Antonio Scandurra
245490f934
Implement Project::definition
when the buffer is remote
2022-01-24 13:10:13 +01:00
Antonio Scandurra
f859d444ff
Don't show conflict indicator on remote buffer after a reload
2022-01-24 10:17:36 +01:00
Antonio Scandurra
4372fe1ed0
Maintain remote buffers via UpdateBufferFile
messages sent by host
2022-01-24 09:32:40 +01:00
Antonio Scandurra
31dfd01fda
Make add_local_worktree
private and use find_or_create_local_worktree
...
The former always adds a worktree, even if we have one already in the
project and that could be misused. The public API should always search
for a local worktree containing the requested path first so that the
project can uphold invariants about which worktrees it has.
2022-01-22 11:23:00 +01:00
Max Brunsfeld
2712cadaf6
Get integration tests passing
...
* Fix misuse of guest buffer's id as its remote id
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-21 17:44:24 -08:00
Max Brunsfeld
6751bd9d78
Change integration tests to open buffers via the project
2022-01-21 12:23:17 -08:00
Antonio Scandurra
6e7e86e491
Remove weak worktrees from project when nobody references them
...
Also, avoid showing them in the project panel as well as in the
contacts panel.
2022-01-21 14:34:14 +01:00
Antonio Scandurra
71082d4cdc
Return a Task<Result<()>>
in {ItemView,Buffer,MultiBuffer}::save
2022-01-20 09:58:24 +01:00
Max Brunsfeld
e56c043693
Get tests passing, centralize more diagnostic logic in Project
2022-01-19 16:32:55 -08:00
Max Brunsfeld
f43dcd6763
Move logic for starting language servers to the project
2022-01-19 14:05:06 -08:00
Antonio Scandurra
f51cf6b05e
Cleanup worktrees' shared state when unsharing
2022-01-17 10:58:49 +01:00
Nathan Sobo
057dc62b90
Merge pull request #338 from zed-industries/use-wildcard-cert
...
Associate staging and production load balancers with wildcard cert
2022-01-12 17:23:04 -07:00
Nathan Sobo
a93502bb64
Add placeholder environment variables to our deploy
...
We have the ability to define environment-specific environment variables, but don't current need it. This keeps these files in place while avoiding noise from running `export` with no args due to the files being empty.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-01-12 16:33:41 -07:00
Nathan Sobo
e71b989041
Use the same wildcard certificate on production and staging
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-01-12 16:28:09 -07:00
Nathan Sobo
3a82d0d8e1
Use a wildcard cert on DigitalOcean in the staging environment
...
If this works, we'll use it for production as well and delete the other certs.
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-01-12 16:17:21 -07:00
Antonio Scandurra
8b53868f8a
Preserve the order of responses with respect to all other incoming messages
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-01-12 18:26:00 +01:00
Antonio Scandurra
9e4b118214
Use synchronous locks for Peer
state
...
We hold these locks for a short amount of time anyway, and using an
async lock could cause parallel sends to happen in an order different
than the order in which `send`/`request` was called.
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-12 18:02:41 +01:00
Antonio Scandurra
310def2923
Implement Buffer::format
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-12 18:01:20 +01:00
Antonio Scandurra
cf62d26ed8
Display a "Checking..." message when running disk-based diagnostics
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-01-07 15:03:19 +01:00
Nathan Sobo
943571af2a
Report backtraces of pending conditions when deterministic executor illegally parks
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-01-06 13:33:55 -07:00
Nathan Sobo
2dbee1d914
Send diagnostic summaries to guests when they join the project
...
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-01-06 12:12:09 -07:00
Max Brunsfeld
0bcd0a3f08
Forward events from remote worktrees to their projects
2022-01-04 16:01:25 -08:00