Aleksey Kladov
4b59c3a538
Make logger-based debugging more pleasant
2021-01-28 17:07:53 +03:00
Aleksey Kladov
a44f6c18fb
Use RA_LOG in tests
2021-01-28 16:49:07 +03:00
Aleksey Kladov
a58fa29dc2
Easier to debug timeouts in tests
2021-01-28 16:00:33 +03:00
bors[bot]
0ebf548ab7
Merge #7451
...
7451: rust-analyzer.files.excludeDirs r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-01-27 15:48:35 +00:00
Aleksey Kladov
5101f85da0
Squelch a warning
2021-01-27 12:40:15 +03:00
bors[bot]
fc08fdaf5a
Merge #7457
...
7457: Add no-buffering file logging and wait for a debugger option. r=vsrs a=vsrs
Adds two command line flags: `--no-buffering` and `--wait-dbg`.
Not sure if someone else needs this, but personally I found both flags extremely useful trying to figure out why RA does not work with Visual Studio. Or better to say why Visual Studio does not work with RA.
Co-authored-by: vsrs <vit@conrlab.com>
2021-01-26 22:37:11 +00:00
vsrs
5f1eb544da
Apply suggestions.
2021-01-27 01:16:39 +03:00
vsrs
0269071283
cargo fmt
2021-01-27 00:33:27 +03:00
vsrs
ad603c3867
Add debug only guard for the --wait-dbg flag
2021-01-27 00:09:15 +03:00
Aleksey Kladov
d35bda6429
Make always-assert crate reusable
2021-01-26 22:13:42 +03:00
Aleksey Kladov
2870e70163
Add config option to ignore directories
2021-01-26 16:45:54 +03:00
Aleksey Kladov
a733f65126
Allow non-absolute paths to rust source
2021-01-26 16:40:08 +03:00
Aleksey Kladov
c04b561e7e
Remove the need to manually sync config in package.json
2021-01-26 16:22:24 +03:00
vsrs
185cd736a6
Add RA_WAIT_DBG and docs
2021-01-25 17:46:03 +03:00
vsrs
8c843d1dac
Add the ability to wait for a debugger.
2021-01-25 17:46:03 +03:00
vsrs
98d7512e93
Add stderr flush
2021-01-25 17:46:03 +03:00
vsrs
43fabfbe36
Add --no-buffering flag for the file logging.
2021-01-25 17:46:03 +03:00
vsrs
3618c4e0d3
Add References code lens.
...
For Struct, Enum, Union and Trait symbols.
2021-01-23 16:56:20 +03:00
Aleksey Kladov
02a17cdffc
Make assertion failures more annoying for maintainers
2021-01-22 19:13:21 +03:00
bors[bot]
0c37b3a0fc
Merge #7353
...
7353: Add LifetimeParam and ConstParam to CompletionItemKind r=matklad a=Veykril
Adds `LifetimeParam` and `ConstParam` to `CompletionItemKind` and maps them both to `TypeParam` in the protocol conversion as there are no equivalents, so nothing really changes there.
`ConstParam` could be mapped to `Const` I guess but I'm split on whether that would be better?
Additions were solely inspired by (the single) test output for const params.
Also sorts the variants of `CompletionItemKind` and its to_proto match.
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-01-22 15:31:47 +00:00
Aleksey Kladov
e5c5c0a040
Include countme
crate to count important data structures.
2021-01-21 19:30:52 +03:00
Laurențiu Nicola
c067ca505a
chdir to file before rustfmt
2021-01-21 15:58:17 +02:00
Lukas Wirth
f2cb7dbcb7
Partially unify SymbolKind and CompletionItemKind
2021-01-20 18:39:46 +01:00
Lukas Wirth
563a175fdb
Move SymbolKind to ide_db
2021-01-20 15:25:34 +01:00
Lukas Wirth
83e49200d8
Add LifetimeParam and ConstParam to CompletionItemKind
2021-01-19 20:25:29 +01:00
kjeremy
db0aaeca33
Update pico-args
...
Should maintains existing behavior
2021-01-19 11:56:45 -05:00
bors[bot]
342bf41022
Merge #7297 #7338
...
7297: Propose trait associated items and autoimport traits on completion r=matklad a=SomeoneToIgnore
![trait_imports](https://user-images.githubusercontent.com/2690773/104819998-6faeb480-583a-11eb-8b45-b7351b51b90e.gif )
Closes #7248
7338: Parse `impl const Trait` r=Veykril a=Veykril
Closes #7313
bors r+
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-01-18 19:40:11 +00:00
Lukas Wirth
21a6384ce6
Remove obsolete RangeInfo usage in rename
2021-01-18 20:28:20 +01:00
Jonas Schievink
9b5fa1c61a
Add back jemalloc support
2021-01-18 19:39:46 +01:00
Aleksey Kladov
add87f5424
Avoid blocking the main loop when editing Cargo.toml
...
I've noticed a bunch of "main loop too long" warnings in console when
typing in Cargo.toml. Profiling showed that the culprit is `rustc
--print cfg` call.
I moved it to the background project loading phase, where it belongs.
This highlighted a problem: we generally use single `cfg`, while it
really should be per crate.
2021-01-18 14:52:12 +03:00
Aleksey Kladov
e13065b8ac
Add profile call
2021-01-18 13:30:12 +03:00
Kirill Bulatov
db335a1bbf
Add flyimport completion for trait assoc items
2021-01-16 20:44:12 +02:00
Kirill Bulatov
6742f38e49
Share import_assets and related entities
2021-01-16 19:33:36 +02:00
Jonas Schievink
36500fe496
Don't duplicate rustc diagnostics fixes
2021-01-15 18:11:54 +01:00
Lukas Wirth
d5095329a1
Phase out SourceFileEdits in favour of a plain HashMap
2021-01-14 22:43:36 +01:00
Lukas Wirth
f51457a643
Group file source edits by FileId
2021-01-14 18:35:22 +01:00
Aleksey Kladov
8dc68ecdfc
Introduce more appropriate assertion mechanism
...
rust-analyzer is a long-running program, so we *should* handle assertion
failures.
See also https://www.sqlite.org/assert.html .
2021-01-14 18:25:19 +03:00
bors[bot]
42e00032c6
Merge #7220
...
7220: same level folder rename for will_rename_files r=kjeremy a=ShuiRuTian
use tricky way to support folder rename.
Another step after #7009 and for #4471
Co-authored-by: ShuiRuTian <158983297@qq.com>
Co-authored-by: Song Gao <158983297@qq.com>
2021-01-13 17:40:45 +00:00
ShuiRuTian
727a7827fd
fix windows test.
2021-01-13 22:56:31 +08:00
bors[bot]
f84f5cb0ea
Merge #7262
...
7262: Don't show internal server error on rename r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-01-13 12:09:26 +00:00
Aleksey Kladov
f0e802f490
Don't show internal server error on rename
...
Doesn't quite work due to https://github.com/microsoft/vscode-languageserver-node/issues/730
Note that this intentionally removes `impl std::Error for RenameError`
-- we nether want to blindly bubble the rename error.
2021-01-13 15:07:30 +03:00
ShuiRuTian
76e6589016
unwrap.
2021-01-13 12:10:45 +08:00
ShuiRuTian
6a15876fc4
skip slow tests.
2021-01-13 00:58:28 +08:00
ShuiRuTian
5f8fa66b77
use path rather than hard code.
2021-01-13 00:53:17 +08:00
ShuiRuTian
e1c9c9b604
fix and add tests.
2021-01-13 00:30:49 +08:00
Lukas Wirth
2c1777a2e2
Ensure uniqueness of file ids in reference search via hashmap
2021-01-12 15:51:02 +01:00
Lukas Wirth
fbdb32adfc
Group references by FileId
2021-01-12 01:03:04 +01:00
Aleksey Kladov
9fd4e5c66c
Improve analysis stats legibility
2021-01-11 22:17:30 +03:00
ShuiRuTian
cf3042f881
format
2021-01-12 00:21:43 +08:00
ShuiRuTian
d877390882
fix as suggestion.
2021-01-12 00:21:03 +08:00