Aleksey Kladov
0866b1be89
Align diagnostics config with the rest of rust-analyzer
2020-08-18 16:03:15 +02:00
bors[bot]
a3947129c5
Merge #5794
...
5794: Simplify building a symbol hierarchy
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com >
2020-08-18 12:32:32 +00:00
Aleksey Kladov
e01cfe2b45
Simplify building a symbol hierarchy
2020-08-18 14:29:31 +02:00
bors[bot]
b8dfc331ab
Merge #5682
...
5682: Add an option to disable diagnostics r=matklad a=popzxc
As far as I know, currently it's not possible to disable a selected type of diagnostics provided by `rust-analyzer`.
This causes an inconvenient situation with a false-positive warnings: you either have to disable all the diagnostics, or you have to ignore these warnings.
There are some open issues related to this problem, e.g.: https://github.com/rust-analyzer/rust-analyzer/issues/5412 , https://github.com/rust-analyzer/rust-analyzer/issues/5502
This PR attempts to make it possible to selectively disable some diagnostics on per-project basis.
Co-authored-by: Igor Aleksanov <popzxc@yandex.ru >
2020-08-18 12:04:49 +00:00
bors[bot]
2252a65f23
Merge #5687
...
5687: Fix document symbols order r=matklad a=magurotuna
Resolves #5655
And adds tests for `handle_document_symbol`, both with `hierarchical_symbols` enabled and with it disabled.
Previously document symbols were displayed in reverse order in sublime text with its LSP plugin, but this patch fixes it like this:

Co-authored-by: Yusuke Tanaka <yusuktan@maguro.dev >
2020-08-18 11:58:02 +00:00
Igor Aleksanov
b56cfcca10
Make disabled diagnostics an argument of corresponding function
2020-08-18 13:32:29 +03:00
Aleksey Kladov
6a4c9fc9fd
Don't make fields private unless you have to
2020-08-17 16:11:29 +02:00
Aleksey Kladov
1b0c7701cc
Rename ra_ide -> ide
2020-08-13 17:58:27 +02:00
Pavan Kumar Sunkara
eac24d52e6
Rename ra_project_model -> project_model
2020-08-13 12:05:30 +02:00
Aleksey Kladov
a1c187eef3
Rename ra_syntax -> syntax
2020-08-12 18:30:53 +02:00
Aleksey Kladov
8d34262956
Rename ra_toolchain -> toolchain
2020-08-12 16:52:28 +02:00
Aleksey Kladov
208b7bd7ba
Rename ra_prof -> profile
2020-08-12 16:35:29 +02:00
Kirill Bulatov
188ec3459e
Simplify fix structure
2020-08-11 17:13:40 +03:00
Kirill Bulatov
26e102a567
Separate diagnostics and diagnostics fix ranges
2020-08-11 15:09:08 +03:00
JmPotato
dc6e1e0dac
Address some FIXMEs
...
Signed-off-by: JmPotato <ghzpotato@gmail.com >
2020-08-11 10:55:26 +08:00
bors[bot]
9995e79cce
Merge #5414
...
5414: Fix test code lens r=jonas-schievink a=avrong
Closes #5217
The implementation is quite similar to #4821 . Maybe we should somehow deal with duplicated code.
Also, both of these requests introduce some unclear behavior. I'm not sure how to process this, therefore asking for advice. Examples are below.
<img width="286" alt="image" src="https://user-images.githubusercontent.com/6342851/87713209-83595f80-c7b2-11ea-8c0f-a12e7571e7df.png ">
Co-authored-by: Aleksei Trifonov <avrong@avrong.me >
2020-08-09 21:23:20 +00:00
Yusuke Tanaka
b970d675f5
Reverse document symbols for each scope ( #5655 )
2020-08-08 20:48:45 +09:00
bors[bot]
f1d507270c
Merge #5526
...
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 <kjeremy@gmail.com >
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com >
2020-08-06 01:44:38 +00:00
Jeremy Kolb
195111d769
Address PR comments
2020-08-05 21:35:35 -04:00
Aleksey Kladov
ffe4a5e114
Fix relative path handling for custom rustfmt
...
`current_dir` and relative paths to executables works differently on
unix and windows (unix behavior does not make sense), see:
17e30e83a1/src/lib.rs (L295-L324)
The original motivation to set cwd was to make rustfmt read the
correct rustfmt.toml, but that was future proofing, rather than a bug
fix.
So, let's just remove this and see if breaks or fixes more use-cases.
If support for per-file config is needed, we could use `--config-path`
flag.
2020-08-05 13:20:36 +02:00
Aleksei Trifonov
85d5ed3675
Fix test code lens
2020-08-02 13:53:34 +03:00
kjeremy
fcfd7cb1e3
Handle semantic token deltas
2020-07-31 20:57:53 -04:00
Aleksey Kladov
be49547b44
Use split_once polyfill
2020-07-30 22:23:12 +02:00
Aleksey Kladov
c83467796b
Finalize Trait grammar
2020-07-30 18:17:28 +02:00
Aleksey Kladov
609680ef97
Rename EnumDef -> Enum
2020-07-30 17:52:53 +02:00
Aleksey Kladov
216a5344c8
Rename StructDef -> Struct
2020-07-30 17:50:40 +02:00
Aleksey Kladov
1ae4721c9c
Finalize union grammar
2020-07-30 17:38:52 +02:00
Aleksey Kladov
1142112c70
Rename FnDef -> Fn
2020-07-30 15:16:05 +02:00
Kirill Bulatov
85d71f4dff
Run package-specific cargo check and test for all targets
2020-07-29 15:35:27 +03:00
David Lattimore
cf55806257
SSR: Restrict to current selection if any
...
The selection is also used to avoid unnecessary work, but only to the
file level. Further restricting unnecessary work is left for later.
2020-07-29 15:06:58 +10:00
Jonas Schievink
92a4ec80a0
Only display experimental diagnostics when enabled
2020-07-24 17:39:44 +02:00
David Lattimore
3975952601
SSR: Pass current file position through to SSR code.
...
In a subsequent commit, it will be used for resolving paths.
2020-07-24 21:34:00 +10:00
kjeremy
7eedf19cfa
Move deprecated attribute to where it is needed
2020-07-22 15:41:38 -04:00
kjeremy
9a9c0e1105
Use symbol tags
2020-07-22 12:18:48 -04:00
bors[bot]
2ca0e9e00e
Merge #5327
...
5327: Mark fixes from check as preferred r=matklad a=kjeremy
This allows us to run the auto fix command from vscode to automatically fix diagnostics in the file.
They are also distinguished in the UI.
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com >
2020-07-17 11:12:40 +00:00
Aleksey Kladov
d7548a36a7
Unclutter NavigationTarget API
2020-07-17 12:42:48 +02:00
Aleksey Kladov
e1e79cf064
Take label offets client capability into account
2020-07-16 18:48:02 +02:00
Aleksey Kladov
ff0312fa32
Semantical call info
2020-07-16 18:03:04 +02:00
Jeremy Kolb
d7cd88b1a2
Mark machine applicable fixes as preferred
...
This allows us to run the auto fix command from vscode to automatically
fix all diagnostics in the file.
They are also distinguished in the UI.
2020-07-16 10:51:25 -04:00
Jeremy Kolb
21c1504ca9
Move allow list into AssistConfig
2020-07-15 09:45:30 -04:00
Jeremy Kolb
6a7d1d4412
Invert condition
2020-07-15 08:17:48 -04:00
kjeremy
aa598ecb75
Filter assists
2020-07-13 17:41:47 -04:00
bors[bot]
49fbd1b625
Merge #5325
...
5325: Update lsp-types to account for new CodeActionKind structure r=kjeremy a=kjeremy
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com >
2020-07-11 22:36:53 +00:00
Jeremy Kolb
007812dcae
Update lsp-types to account for new CodeActionKind structure
2020-07-11 17:29:45 -04:00
Aleksey Kladov
b34cdf7bf4
Implementations lens for unions
...
closes #4728
2020-07-11 22:53:31 +02:00
Aleksey Kladov
0f0c5081c0
Make sure there are no commands in code actions
2020-07-11 11:53:24 +02:00
Aleksey Kladov
e8bb153b19
Add Markup type
2020-07-08 22:37:35 +02:00
Jonas Schievink
f44c4b61e1
Add a command to compute memory usage statistics
2020-07-07 12:10:14 +02:00
Aleksey Kladov
569504938e
Fix typo
2020-07-05 11:19:16 +02:00
Jeremy Kolb
20d864807d
Use the selection range when resolving call hierarchy items
...
Add a test in call_hierarchy that already passed
Fixes #5103
2020-07-01 07:56:15 -04:00