Commit Graph
289 Commits
Author SHA1 Message Date
Max Brunsfeld b33a049958 Merge branch 'main' into settings-file 2022-03-13 10:43:23 -07:00
Nathan Sobo 33bcd6d904 Merge remote-tracking branch 'origin/main' into select-on-rename 2022-03-12 10:10:23 -07:00
Max Brunsfeld 20fed599b2 Start work on relaying settings to language servers 2022-03-11 17:36:27 -08:00
Nathan Sobo 951fd1ab36 Merge branch 'main' into select-on-rename 2022-03-11 15:30:07 -07:00
Max Brunsfeld 7a68b2d371 Provide JSON language server with settings schema 2022-03-11 11:46:22 -08:00
Nathan SoboandAntonio Scandurra 134496ce8f Remove dead code
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-11 08:24:42 -07:00
Antonio Scandurra ee6d7fc6d5 Delete till previous tabstop when backspacing within indent column 2022-03-10 10:28:24 +01:00
Nathan Sobo ac1eb19f83 Start on text highlight support 2022-03-09 20:51:35 -07: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
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
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
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 BrunsfeldandNathan Sobo 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
Max BrunsfeldandNathan Sobo 28bacabc4e Move Network test helper from util crate into text crate
This way, `util` does not depend on `clock`.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-04 13:54:07 -08: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
Antonio Scandurra 7c420050c7 Observe selection set lamport timestamps when deserializing buffer 2022-03-04 09:34:30 +01:00
Antonio Scandurra bcd5c28833 Allow receiving diagnostic updates out of order 2022-03-04 09:27:49 +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 78d96a05fc Make fake language servers have full capabilities 2022-03-03 15:42:29 -08:00
Max BrunsfeldandNathan Sobo 9999862016 Enable formatting feature of JSON language server
The feature doesn't work yet because the JSON language server
only supports *range* formatting, not document formatting.
We need to adjust our code to inspect the server's capabilities
and send range formatting requests instead when needed.

We're going to hold off on doing this right now, because it
will create merge conflicts with the `preserve-worktrees`
branch (#525)

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-03 14:16:58 -08:00
Max BrunsfeldandNathan Sobo 0582c557e3 Add JSON language server
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-03 13:29:25 -08:00
556d9cc53f Correctly defer undo operations when messages arrive out of order
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-03-03 18:07:59 +01:00
Antonio Scandurra 14d26eeedc Move several buffer-related messages to the background 2022-03-03 12:18:19 +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
Nathan Sobo 2f427769df Allow a new search to be created with cmd-enter
This replaces the `cmd-alt-shift-F` binding to open a new search. Instead, you can preserve the existing search results by entering a query and then hitting `cmd-enter` instead of `enter`. This opens a new project find view and restores the previous view to whatever query it was previously displaying. It's a bit strange, but I don't want to rely on splitting as the only way of creating multiple sets of search results.
2022-02-26 13:23:05 -07:00
Antonio Scandurra 0bf944e038 Use Project::search in ProjectFind and show search results 2022-02-25 10:32:45 +01:00
Antonio Scandurra 9e173564e9 Pass an AsyncAppContext to fake language server request handlers 2022-02-23 16:14:36 +01:00
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
Antonio ScandurraandNathan Sobo fad335b2ba Don't serialize the full LSP symbol when collaborating
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-22 18:08:43 +01:00
Antonio Scandurra 8a8ae0fbcd Rename CompletionLabel to CodeLabel and add Project::symbols
This only works locally for now and we haven't implemented the
`RustLsp::label_for_symbol` method yet.
2022-02-22 10:01:08 +01:00
Nathan Sobo 99594333a5 Log an error instead of panicking when there's no LSP download dir 2022-02-21 17:44:00 -07:00
Max BrunsfeldandNathan Sobo 03ec6e11b7 Assign language server download directory on startup
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-21 16:23:38 -08:00
Max BrunsfeldandNathan Sobo 79910ba931 Show more information in lsp status bar item
* Distinguish between checking for updates and downloading
* Show dismissable error message when downloading failed and there
  is no cached server.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-21 16:11:51 -08:00
Max BrunsfeldandNathan Sobo ededfff3a8 Download language servers on-demand
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-21 13:54:52 -08:00
Antonio ScandurraandNathan Sobo aee479d615 Show message indicating when we're downloading language servers
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-21 17:25:52 +01:00
Antonio Scandurra 793d9e8bba Download rust-analyzer from GitHub 2022-02-21 16:15:54 +01:00
Antonio Scandurra fafe521e9f Introduce LspPostProcessor::download_language_server 2022-02-21 09:46:18 +01:00
Antonio Scandurra 1ca50d0134 Make language server initialization asynchronous 2022-02-21 09:39:28 +01:00
Antonio Scandurra b8523509da Revert "WIP: avoid code-signing rust-analyzer to prevent proc macro errors"
This reverts commit fc3bccc1a1.
2022-02-21 08:13:05 +01:00
Antonio Scandurra fc3bccc1a1 WIP: avoid code-signing rust-analyzer to prevent proc macro errors
If this works, I think we should set the permissions asynchronously,
maybe as part of starting the language server, so that we avoid doing
synchronous I/O.
2022-02-20 12:14:43 +01:00
Antonio Scandurra 30e4ea1a4c Fix warnings 2022-02-17 17:26:03 +01:00
Antonio Scandurra 50a31721eb Wait for version before returning completions 2022-02-17 11:41:19 +01:00
Max BrunsfeldandNathan Sobo e3c4ce208a Remove unnecessary waiting when handling save RPC requests
Add saving to the randomized integration test

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-16 17:47:21 -08:00
Max BrunsfeldandNathan Sobo 41ba980c9b Remove unnecessary waiting during completion RPC requests
Also, add completion requests to the randomized collaboration integration test,
to demonstrate that this is valid.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-16 17:23:16 -08:00
Max BrunsfeldandNathan Sobo c4dff12d69 Allow multiple fake language servers to be started for a given project
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-16 16:10:36 -08:00
Max BrunsfeldandNathan Sobo d358072c74 Include the desired version in a SaveBuffer RPC request
When handling this messages on the host, wait until the desired
version has been observed before performing the save.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-02-14 17:51:26 -08:00