bors[bot]
d4fa6721af
Merge #8054
...
8054: Item movers r=matklad a=ivan770
Closes #6823
https://user-images.githubusercontent.com/14003886/111331579-b4f43480-8679-11eb-9af0-e4dabacc4923.mp4
Implementation issues:
- [ ] Most of items are non-movable, since _movability_ of any item has to be determined manually. Common ones are movable though
- [x] Cursor should move with the item
Co-authored-by: ivan770 <leshenko.ivan770@gmail.com>
2021-03-22 13:08:45 +00:00
Matthias Krüger
202b51bc7b
a lot of clippy::style fixes
2021-03-21 16:15:41 +01:00
ivan770
7d60458495
Item up and down movers
2021-03-18 11:22:27 +02:00
bors[bot]
7accf6bc37
Merge #7799
...
7799: Related tests r=matklad a=vsrs
![tests](https://user-images.githubusercontent.com/62505555/109397453-a9013680-7947-11eb-8b11-ac03079f7645.gif )
This adds an ability to look for tests for the item under the cursor: function, constant, data type, etc
The LSP part is bound to change. But the feature itself already works and I'm looking for a feedback :)
Co-authored-by: vsrs <vit@conrlab.com>
2021-03-13 13:50:35 +00:00
Aleksey Kladov
3d80e0a154
Migrate to user-centric config name for cargo check
stuff
2021-03-04 15:38:53 +03:00
vsrs
669e117644
Add LSP request and VSCode command
2021-02-27 20:04:43 +03:00
Florian Diebold
a7387cae2c
Fix slow tests sometimes failing
...
In some situations we reloaded the workspace in the tests after having reported
to be ready. There's two fixes here:
1. Add a version to the VFS config and include that version in progress reports,
so that we don't think we're done prematurely;
2. Delay status transitions until after changes are applied. Otherwise the last
change during loading can potentially trigger a workspace reload, if it contains
interesting changes.
2021-02-12 16:31:16 +01:00
Jonas Schievink
70f388cedb
Pin Rust to 1.49.0 on CI
2021-02-12 13:05:56 +01:00
Edwin Cheng
9358eecc04
Async Loading outdir and proc-macro
2021-01-29 01:04:14 +08:00
Aleksey Kladov
bb453edebe
Honor client's dynamic registration caps
...
cc https://github.com/rust-analyzer/rust-analyzer/pull/5516#issuecomment-757520828
2021-01-10 22:38:35 +03:00
Aleksey Kladov
2ed258ba42
Fix progress token is already registered crash
...
After we started reporting progress when running cargo check during
loading, it is possible to crash the client with two identical progress
tokens.
This points to a deeper issue: we might be running several cargo checks
concurrently, which doesn't make sense.
This commit linearizes all workspace fetches, making sure no updates are
lost.
As an additional touch, it also normalizes progress & result reporting,
to make sure they stand in sync.
2021-01-10 18:02:02 +03:00
Edwin Cheng
2b2d699b35
Report progress for cargo metadata and output-dir
2021-01-08 01:18:58 +08:00
Aleksey Kladov
66ed821e18
Speed up snapshoting
...
Config can be fairly big, no need to deep clone it frequently
2021-01-06 15:46:31 +03:00
Aleksey Kladov
f7a15b5cd1
More maintainable config
...
Rather than eagerly converting JSON, we losslessly keep it as is, and
change the shape of user-submitted data at the last moment.
This also allows us to remove a bunch of wrong Defaults
2021-01-06 15:39:28 +03:00
Phil Ellison
077592a12f
Initial implementation of view-hir command
2020-12-28 18:29:58 +00:00
Jeremy Kolb
4f989cfa08
Implement workspace/willRenameFiles for single-level file moves
...
Renames modules during file rename if they're in the same directory.
2020-12-23 07:47:31 -05:00
Jeremy Kolb
26a1675764
Remove some redundant allocations
2020-12-12 12:27:09 -05:00
kjeremy
78dd2ba196
Send a CodeLensRefresh when we reload
2020-12-09 14:36:47 -05:00
Jonas Schievink
6857989f6f
Fix "no value set for FileTextQuery(FileId(..))"
2020-12-09 17:30:46 +01:00
Kirill Bulatov
93bc009a59
Remove the state
2020-12-07 23:41:08 +02:00
Kirill Bulatov
74c3bbacc9
Make completion resolve async
2020-12-07 23:41:08 +02:00
Kirill Bulatov
f6d2540df0
Simplify import edit calculation
2020-12-07 23:41:08 +02:00
Kirill Bulatov
6d2d279389
Working resolve completion imports prototype
2020-12-07 23:41:08 +02:00
Kirill Bulatov
48acd7d455
Draft the new lsp handler
2020-12-07 23:41:08 +02:00
Jonas Schievink
6da651f5da
Don't prime caches when just opening a file
2020-12-02 20:18:28 +01:00
Jonas Schievink
f52abbe62d
Coalesce flycheck events
2020-11-27 22:52:22 +01:00
Laurențiu Nicola
a5477d7f29
Remove unused import
2020-11-26 19:25:59 +02:00
Jonas Schievink
9ed883f373
Publish diagnostics on file open
...
Diagnostics are sometimes only showing up when typing.
This should fix that.
2020-11-26 13:33:47 +01:00
Matt Jibson
117c793e80
Don't assume DidChangeTextDocument paths exist
...
Fixes #5933
2020-11-23 16:35:34 -07:00
kjeremy
233fdb12ce
Latest LSP 3.16 protocol
...
Pulls in https://github.com/gluon-lang/lsp-types/pull/186
2020-11-16 15:10:13 -05:00
Anatol Liu
b1b7727e04
add open Cargo.toml action
2020-11-12 17:48:07 -08:00
Aleksey Kladov
7d2eb000b0
Switch to upstream protocol for resolving code action
...
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.
2020-11-10 18:48:46 +01:00
Jonas Schievink
285960aa6b
Fix coalescing of prime_caches updates
...
The previous implementation could try to create a progress bar when one
was already registered
2020-11-02 18:49:54 +01:00
Jonas Schievink
58e3fd8e8e
Remove unnecessary clone
2020-11-02 18:33:46 +01:00
Jonas Schievink
a968cb6aef
Remove debug print
2020-11-02 17:24:35 +01:00
Jonas Schievink
6e8ddac165
Coalesce prime_caches updates
2020-11-02 17:24:35 +01:00
Aleksey Kladov
3b9548e163
Respond with JSON-RPC error if we failed to deserialize request
...
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!
2020-10-30 19:57:52 +01:00
kjeremy
2d4be2ef2a
Request a refresh of semantic tokens if things are loaded up
2020-10-26 09:23:34 -04:00
Igor Aleksanov
19cce08662
Re-export base_db from ide_db
2020-10-24 11:39:57 +03:00
Jonas Schievink
cde7392ec8
Improve prime_caches and display its progress
2020-10-12 13:35:01 +02:00
Zac Pullar-Strecker
a14194b428
Changes from review
2020-10-08 15:01:30 +13:00
Zac Pullar-Strecker
bfda0d2583
WIP: Command to open docs under cursor
2020-10-08 14:59:31 +13:00
Aleksey Kladov
6219142c96
Better progress API
...
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!
2020-10-07 12:15:37 +02:00
Aleksey Kladov
e7df0ad2fb
Remove periodic gc stub
2020-09-29 21:22:48 +02:00
Jonas Schievink
1a28f30ba4
Spawn a flycheck instance per workspace
2020-09-27 19:41:54 +02:00
kjeremy
b527257330
Move to vscode-languageclient 7.0.0-next.9
...
Stabilizes call hierarchy and semantic tokens features.
2020-09-02 09:40:59 -04:00
Aleksey Kladov
3a72afed8c
Improve logging
2020-08-25 11:43:21 +02:00
Aleksey Kladov
0866b1be89
Align diagnostics config with the rest of rust-analyzer
2020-08-18 16:03:15 +02:00
Aleksey Kladov
1b0c7701cc
Rename ra_ide -> ide
2020-08-13 17:58:27 +02:00
Aleksey Kladov
ed20a857f4
Rename ra_db -> base_db
2020-08-13 16:29:33 +02:00