Lukas Wirth
92f7db447c
minor: Lift out FxIndex{Map/Set} types into ide_db
2021-11-16 12:15:47 +01:00
Lukas Wirth
d2513deb62
fix: Reimplement mapping out of test/bench attributes for runnables
2021-11-16 11:51:24 +01:00
Jake Heinz
520ff62f4e
flip the default
2021-11-13 23:39:34 +00:00
Jake Heinz
d3d768de0d
inlay hints: add the option to always show constructor inlay hints
2021-11-13 23:12:29 +00:00
Lukas Wirth
2d7f5891f7
Remove faulty logic for ascending test attributes for runnables
2021-11-11 18:47:24 +01:00
Lukas Wirth
a510021065
Replace some more ide usages of ModuleDef with Definition
2021-11-11 18:20:54 +01:00
Jonas Schievink
acbe8bc7ac
Prime a more reasonable set of crates
2021-11-11 14:44:12 +01:00
Lukas Wirth
7776aad166
internal: Flatten Definition::ModuleDef
variant
2021-11-11 00:05:53 +01:00
Lukas Wirth
26419c0379
Fix proc-macro attributes being shadowed by their functions in IDE layer
2021-11-08 14:49:50 +01:00
bors[bot]
10782bbb39
Merge #10685
...
10685: fix: Enable markdown tables r=Veykril a=Veykril
Should fix https://github.com/rust-analyzer/rust-analyzer/issues/10655
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-11-05 11:25:17 +00:00
Lukas Wirth
439a8194b0
Replace more Name::to_string usages with Name::to_smol_str
2021-11-04 18:12:05 +01:00
Lukas Wirth
4d4574f5b6
Enable markdown tables
2021-11-04 17:36:58 +01:00
bors[bot]
962be38004
Merge #10645
...
10645: fix: make `rename` multi-token mapping aware r=Veykril a=spookyvision
Co-authored-by: Anatol Ulrich <anatol.ulrich@ferrous-systems.com>
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Co-authored-by: Anatol Ulrich <45840+spookyvision@users.noreply.github.com>
2021-11-04 16:31:16 +00:00
bors[bot]
c96481e25f
Merge #10691
...
10691: minor: Use array `into_iter` in more places r=lnicola a=lnicola
bors r+
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-11-04 05:52:05 +00:00
Laurențiu Nicola
139bf9b4e1
Use array into_iter in more places
2021-11-04 07:51:20 +02:00
Anatol Ulrich
83927e08a8
Update crates/ide/src/rename.rs
...
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-11-03 15:44:32 +01:00
Lukas Wirth
52f5af7165
Expose version string of crates fom HIR
2021-11-03 15:40:06 +01:00
Anatol Ulrich
9bce4d6696
accept identical Indels when merging; add rename test case
2021-11-02 21:38:38 +01:00
Lukas Wirth
7fdbdc4ab2
Enable auto-import and qualify-path in derive attributes
2021-10-28 18:40:38 +02:00
Lukas Wirth
3018ffd85e
Refactor ide handling for paths in derive inputs
2021-10-28 16:47:19 +02:00
Anatol Ulrich
1ac35532c4
remove TODO comment
2021-10-27 17:26:38 +02:00
Anatol Ulrich
df9fb9b159
re-introduce always!
2021-10-27 17:25:42 +02:00
Anatol Ulrich
28c73f8374
unwrap--
2021-10-27 17:23:23 +02:00
Anatol Ulrich
4a1a5ff54e
fix logic error: alias detection was too lenient
2021-10-27 17:20:12 +02:00
Anatol Ulrich
6cd15c296d
wip
2021-10-27 15:40:49 +02:00
Anatol Ulrich
8d3ac328ee
remove resolved TODO questions
2021-10-27 15:40:30 +02:00
Anatol Ulrich
f244ed6a1a
doxx
2021-10-27 04:46:02 +02:00
Anatol Ulrich
2e0610e64e
one down
2021-10-27 04:42:58 +02:00
Anatol Ulrich
95199ac30b
make imports less odd
2021-10-27 04:36:32 +02:00
Anatol Ulrich
6decfceae1
WIP: fix: make rename
multi-token mapping aware
2021-10-27 04:31:14 +02:00
bors[bot]
a3830dfd3b
Merge #10641
...
10641: fix: make `expand_macro` multi-token mapping aware r=spookyvision a=spookyvision
Co-authored-by: Anatol Ulrich <anatol.ulrich@ferrous-systems.com>
Co-authored-by: Anatol Ulrich <45840+spookyvision@users.noreply.github.com>
2021-10-26 18:18:22 +00:00
Anatol Ulrich
b42093915a
Update crates/ide/src/expand_macro.rs
...
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-10-26 20:17:47 +02:00
Anatol Ulrich
e6913be47b
fix test
2021-10-26 20:15:25 +02:00
Anatol Ulrich
04f2eb0fba
wording
2021-10-26 20:10:09 +02:00
Anatol Ulrich
3f82989153
fix: make expand_macro
multi-token mapping aware
2021-10-26 20:09:14 +02:00
bors[bot]
c48730cb72
Merge #10639 #10640
...
10639: fix: make `goto_declaration` multi-token mapping aware r=Veykril a=spookyvision
10640: assume valid identifier r=Veykril a=spookyvision
improve https://github.com/rust-analyzer/rust-analyzer/pull/10637/ by always returning `Some(potentially_empty_vec)` instead of `None` in the empty case
Co-authored-by: Anatol Ulrich <anatol.ulrich@ferrous-systems.com>
2021-10-26 17:51:33 +00:00
Anatol Ulrich
53be26df50
assume valid identifier
2021-10-26 19:33:50 +02:00
Anatol Ulrich
d8ed15b6a6
fix: make goto_declaration
multi-token mapping aware
2021-10-26 19:31:49 +02:00
Anatol Ulrich
c69879423e
fix imports
2021-10-26 12:34:40 +02:00
Anatol Ulrich
686f8fbea3
simplify
2021-10-26 12:21:18 +02:00
Anatol Ulrich
2490807ca5
fix: make goto_type_definition
multi-token mapping aware
2021-10-25 23:43:58 +02:00
Laurențiu Nicola
8457ae34bd
Set MSRV
2021-10-23 15:07:11 +03:00
Lukas Wirth
1294bfce86
Migrate to edition 2021
2021-10-21 20:10:40 +02:00
bors[bot]
6877240fdf
Merge #10563
...
10563: feat: Make "Generate getter" assist use semantic info r=agluszak a=agluszak
This PR makes "Generate getter" assist use semantic info instead of dealing with types encoded as strings.
Getters for types which are:
- `Copy` no longer return references
- `AsRef<str>` (i.e. `String`) return `&str` (instead of `&String`)
- `AsRef<[T]>` (i.e. `Vec<T>`) return `&[T]` (instead of `&Vec<T>`)
- `AsRef<T>` (i.e. `Box<T>`) return `&T` (instead of `&Box<T>`)
- `Option<T>` return `Option<&T>` (instead of `&Option<T>`)
- `Result<T, E>` return `Result<&T, &E>` (instead of `&Result<T, E>`)
String, Vec, Box and Option were previously handled as special cases.
Closes #10295
Co-authored-by: Andrzej Głuszak <gluszak.andrzej@gmail.com>
2021-10-20 21:02:46 +00:00
Lukas Wirth
8ed86fc25d
Fix standard library doclinks not going to the correct page
2021-10-20 16:36:01 +02:00
Andrzej Głuszak
98676efdc5
Semantic getter
2021-10-17 16:33:14 +02:00
Milo
5a93457c1b
revert
2021-10-16 14:13:43 +01:00
Milo
35e5daacc3
more clippy fixes
2021-10-16 12:32:55 +01:00
Milo
35de195c41
a few clippy fixes
2021-10-14 19:57:21 +01:00
bors[bot]
8619058d3d
Merge #10538
...
10538: fix: matching brace should prefer brace on cursor's right r=Veykril a=codgician
I observed a brace matching issue with the following Rust code:
```rust
let x = (1 + (2 + 3)) * 4;
```
In a situation like `<|>(1 + (2 + 3)) * 4`, the cursor will go to `(1 + (2 + 3)<|>) * 4`, and if user tries to match bracket again it will go like `(1 + <|>(2 + 3)) * 4` while logically the expected result should be `<|>(1 + (2 + 3)) * 4`. This behavior exists in both line cursor style and block cursor style.
This PR fixes this by letting `matching_brace` prefer the brace to cursor's right when the cursor lies between multiple consecutive braces. It **does NOT** fix #1942 but could be related. Please review.
Co-authored-by: codgician <15964984+codgician@users.noreply.github.com>
2021-10-14 11:50:14 +00:00