aboutsummaryrefslogtreecommitdiff
path: root/crates/rust-analyzer/src/main_loop.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* add open Cargo.toml actionAnatol Liu2020-11-131-0/+1
|
* Switch to upstream protocol for resolving code actionAleksey Kladov2020-11-101-1/+1
| | | | | | Note that we have to maintain custom implementation on the client side: I don't see how to marry bulitin resolve support with groups and snippets.
* Fix coalescing of prime_caches updatesJonas Schievink2020-11-021-14/+14
| | | | | The previous implementation could try to create a progress bar when one was already registered
* Remove unnecessary cloneJonas Schievink2020-11-021-1/+1
|
* Remove debug printJonas Schievink2020-11-021-1/+0
|
* Coalesce prime_caches updatesJonas Schievink2020-11-021-9/+35
|
* Respond with JSON-RPC error if we failed to deserialize requestAleksey Kladov2020-10-301-37/+33
| | | | | | | | | | | | | | Historically, we intentinally violated JSON-RPC spec here by hard crashing. The idea was to poke both the clients and servers to fix stuff. However, this is confusing for server implementors, and falls down in one important place -- protocol extension are not always backwards compatible, which causes crashes simply due to version mismatch. We had once such case with our own extension, and one for semantic tokens. So let's be less adventerous and just err on the err side!
* Request a refresh of semantic tokens if things are loaded upkjeremy2020-10-261-0/+6
|
* Re-export base_db from ide_dbIgor Aleksanov2020-10-241-1/+1
|
* Improve prime_caches and display its progressJonas Schievink2020-10-121-7/+35
|
* Changes from reviewZac Pullar-Strecker2020-10-081-1/+1
|
* WIP: Command to open docs under cursorZac Pullar-Strecker2020-10-081-0/+1
|
* Better progress APIAleksey Kladov2020-10-071-1/+1
| | | | | | Percentage is a UI concern, the physical fact here is fraction. It's sad that percentage bleeds into the protocol level, we even duplicated this bad API ourselves!
* Remove periodic gc stubAleksey Kladov2020-09-291-11/+8
|
* Spawn a flycheck instance per workspaceJonas Schievink2020-09-271-5/+12
|
* Move to vscode-languageclient 7.0.0-next.9kjeremy2020-09-021-3/+5
| | | | Stabilizes call hierarchy and semantic tokens features.
* Improve loggingAleksey Kladov2020-08-251-5/+5
|
* Align diagnostics config with the rest of rust-analyzerAleksey Kladov2020-08-181-1/+1
|
* Rename ra_ide -> ideAleksey Kladov2020-08-131-1/+1
|
* Rename ra_db -> base_dbAleksey Kladov2020-08-131-1/+1
|
* Rename ra_project_model -> project_modelPavan Kumar Sunkara2020-08-131-1/+1
|
* Rename ra_prof -> profileAleksey Kladov2020-08-121-3/+2
|
* Return InvalidRequest if Shutdown has been requestedJeremy Kolb2020-08-101-1/+14
| | | | From the LSP 3.16 spec: "If a server receives requests after a shutdown request those requests should error with InvalidRequest."
* Merge #5693bors[bot]2020-08-091-0/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5693: Fix no inlay hints / unresolved tokens until manual edit to refresh r=jonas-schievink a=Veetaha Fixes https://github.com/rust-analyzer/rust-analyzer/issues/5349 Now we return ContentModified during the workspace loading. This signifies the language client to retry the operation (i.e. the client will continue polling the server while it returns ContentModified). I believe that there might be cases of overly big projects where the backoff logic we have setup in `sendRequestWithRetry` (which we use for inlay hints) might bail too early (currently the largest retry standby time is 10 seconds). However, I've tried on one of my project with 500+ dependencies and it is still enough. Here are the examples before/after the change (the gifs are quite lengthy because they show testing rather large cargo workspace). <details> <summary>Before</summary> Here you can see that the client receives empty array of inlay hints and does nothing more. Same applies to semantic tokens. The client receives unresolved tokens and does nothing more. The user needs to do a manual edit to refresh the editor. ![prev-demo](https://user-images.githubusercontent.com/36276403/89717721-e4471280-d9c1-11ea-89ce-7dc3e83d9768.gif) </details> <details> <summary>After</summary> Here the server returns ContentModified, so the client periodically retries the requests and eventually receives the wellformed response. ![new-demo](https://user-images.githubusercontent.com/36276403/89717725-eb6e2080-d9c1-11ea-84c9-796bb2b22cec.gif) </details> Co-authored-by: Veetaha <[email protected]>
| * Let shutdown request to pass through when status == LoadingVeetaha2020-08-091-1/+1
| |
| * Fix no inlay hints / unresolved tokens until manual editVeetaha2020-08-081-0/+10
| | | | | | | | | | | | | | | | | | | | No we return ContentModified during the workspace loading. This signifies the language client to retry the operation (i.e. the client will continue polling the server while it returns ContentModified). I believe that there might be cases of overly big projects where the backoff logic we have setup in `sendRequestWithRetry` (which we use for inlay hints) might bail too early (currently the largest retry standby time is 10 seconds). However, I've tried on one of my project with 500+ dependencies and it is still enough.
* | Remove cloneVeetaha2020-08-081-1/+1
|/
* Merge #5526bors[bot]2020-08-061-0/+5
|\ | | | | | | | | | | | | | | | | | | | | 5526: Handle semantic token deltas r=kjeremy a=kjeremy This basically takes the naive approach where we always compute the tokens but save space sending over the wire which apparently solves some GC problems with vscode. This is waiting for https://github.com/gluon-lang/lsp-types/pull/174 to be merged. I am also unsure of the best way to stash the tokens into `DocumentData` in a safe manner. Co-authored-by: kjeremy <[email protected]> Co-authored-by: Jeremy Kolb <[email protected]>
| * Address PR commentsJeremy Kolb2020-08-061-1/+1
| |
| * Handle semantic token deltaskjeremy2020-08-011-0/+5
| |
* | Revert "Restore line index micro-optimization"Michael Lazear2020-08-031-10/+4
|/ | | | This reverts commit 83a87fcd11298d8de32801ac6496ddf8b4e9c0e1.
* Restore line index micro-optimizationLaurențiu Nicola2020-07-251-4/+10
|
* Add DocumentData to represent in-memory document with LSP infokjeremy2020-07-241-4/+5
|
* Set the document version after changes are applied but before vfskjeremy2020-07-231-3/+6
|
* minorAleksey Kladov2020-07-231-16/+16
|
* Update crates/rust-analyzer/src/main_loop.rsJeremy Kolb2020-07-221-1/+1
| | | Co-authored-by: Aleksey Kladov <[email protected]>
* Clear diagnostics for known file version on closekjeremy2020-07-211-3/+10
|
* Store document version and pass back to the clientkjeremy2020-07-211-7/+17
|
* Allow client to respond to workspace/configuration with null valueskjeremy2020-07-201-0/+2
| | | | | This is allowed per the spec if the client doesn't know about the configuration we've requested.
* Don't drop flycheck messages during restartAleksey Kladov2020-07-151-4/+4
| | | | closes #5386
* Use more explicity type for save registrationkjeremy2020-07-141-19/+23
|
* Optimize VFS processingAleksey Kladov2020-07-101-29/+39
|
* Also reload when adding new examples, tests, etcAleksey Kladov2020-07-101-1/+4
|
* Automatically reload project info on Cargo.toml changesAleksey Kladov2020-07-101-19/+1
|
* Avoid accidently stumping over config valuesAleksey Kladov2020-07-101-3/+3
|
* SimplifyAleksey Kladov2020-07-091-1/+1
|
* Add a command to compute memory usage statisticsJonas Schievink2020-07-071-0/+1
|
* Move cargo metadata off the main loopAleksey Kladov2020-07-021-2/+13
|
* Indicate when project needs a reloadAleksey Kladov2020-07-021-1/+37
|
* Implement StatusBarAleksey Kladov2020-07-021-3/+15
|