León Orell Valerian Liehr
32864e3b49
Correctly complete items with leading underscore
2020-10-03 03:00:09 +02:00
Igor Aleksanov
e447b3a4a2
Improve checks for postfix suggestions
2020-10-02 12:42:39 +03:00
Igor Aleksanov
ea320141c6
Add postfix completion for format-like string literals
2020-10-02 12:42:39 +03:00
bors[bot]
9d3483a74d
Merge #5846
...
5846: Add references to fn args during completion r=matklad a=adamrk
When completing a function call, if there is an argument taken as a ref or mut ref which matches the name and type of a variable in scope, we will insert a `&` or `&mut` when filling in the function arguments. This addresses https://github.com/rust-analyzer/rust-analyzer/issues/5449 .
E.g.
```rust
fn foo(x: &i32) {}
fn main() {
let x = 5;
foo # completing foo here generates `foo(&x)` now instead of `foo(x)`
}
```
Co-authored-by: adamrk <ark.email@gmail.com>
2020-09-24 12:23:28 +00:00
Kirill Bulatov
a7d75463c7
Fix the tests
2020-09-10 01:42:20 +03:00
Kirill Bulatov
9fb83211f9
Complete semicolon when needed
2020-09-10 01:42:20 +03:00
Kirill Bulatov
57a260f579
Properly reacto to keywords
2020-09-10 01:42:20 +03:00
Kirill Bulatov
f9c14ac720
Move most of the logic into the completion module
2020-09-10 01:42:20 +03:00
Kirill Bulatov
6ba479cd05
Finally cretae the mod completion module
2020-09-10 01:42:20 +03:00
Kirill Bulatov
b2bcc5278d
Properly handle special cases (binaries, mod.rs)
2020-09-10 01:42:20 +03:00
Kirill Bulatov
486c5c3285
Exclude special files
2020-09-10 01:42:20 +03:00
Kirill Bulatov
8aa740dab4
Happy path implemented
2020-09-10 01:42:20 +03:00
Kirill Bulatov
17870a3e2c
Better API
2020-09-10 01:42:20 +03:00
Kirill Bulatov
4bed588001
First steps for mod<|> completion
2020-09-10 01:42:20 +03:00
adamrk
d9bb86ad7d
Collect locals in context
2020-09-02 22:14:37 +02:00
Aleksey Kladov
18b667cfcb
Complete pub
in fields
2020-08-25 17:22:23 +02:00
Aleksey Kladov
863b1fb731
⬆️ ungrammar
2020-08-21 19:14:05 +02:00
Aleksey Kladov
125744c057
Rename hypothetical -> speculative
2020-08-14 15:23:27 +02:00
Aleksey Kladov
86f89d9b31
Remove Hygiene from completion
2020-08-13 22:41:55 +02:00
Aleksey Kladov
0e1cda3079
Minor
2020-08-13 18:17:53 +02:00
Aleksey Kladov
1b0c7701cc
Rename ra_ide -> ide
2020-08-13 17:58:27 +02:00