Commit graph

9474 commits

Author SHA1 Message Date
bors[bot]
604b936ca0
Merge #4092
4092: feat: run ignored tests r=matklad a=hdevalke

I started making some exercices on https://exercism.io/ and a lot of test have the `#[ignore]` attribute.
The `Run Test|Debug` code lens show up, but running the test results in:

```
running 1 test
test test_one_piece ... ignored

test result: ok. 0 passed; 0 failed; 1 ignored; 0 measured; 5 filtered out
```

This pull request adds the `--ignored` flag if needed.

Co-authored-by: Hannes De Valkeneer <hannes@de-valkeneer.be>
2020-04-23 09:24:15 +00:00
bors[bot]
1101e74b10
Merge #4098
4098: Add YouCompleteMe as a LSP option for vim/neovim r=matklad a=weihanglo

As YouCompleteMe supports [arbitrary LSP implementation](https://ycm-core.github.io/YouCompleteMe/#plugging-an-arbitrary-lsp-server), it could be added to the list of vim LSP implementation. It works like a charm.

Co-authored-by: Weihang Lo <weihanglo@users.noreply.github.com>
2020-04-23 09:11:56 +00:00
Weihang Lo
313409af9e
Add YouCompleteMe as a LSP option for vim/neovim 2020-04-23 17:09:37 +08:00
bors[bot]
8026a95a2a
Merge #4096
4096: tasks.json Support r=matklad a=jcdickinson

Move the task provider anonymous class into a real class, as this seems to be how Microsoft do this in their documentation.

resolveTask is now implemented, which is used by VSCode to determine how to execute tasks that the user has defined in tasks.json.

Resolves #3983

Co-authored-by: Jonathan Dickinson <jonathanD@k2.com>
2020-04-23 08:55:07 +00:00
bors[bot]
ad3f1da2ea
Merge #4095
4095: Fix typo r=edwin0cheng a=Veetaha



Co-authored-by: veetaha <veetaha2@gmail.com>
2020-04-23 05:35:12 +00:00
Jonathan Dickinson
1d8c25b75c tasks.json Support
Move the task provider anonymous class into a real class, as this seems
to be how Microsoft do this in their documentation.

resolveTask is now implemented, which is used by VSCode to determine how
to execute tasks that the user has defined in tasks.json.
2020-04-22 17:05:04 -07:00
veetaha
a3a8d10191 Fix typo 2020-04-23 02:00:56 +03:00
veetaha
b5620341fc proc_macro: add ability to log to stderr and view output in vscode 2020-04-23 01:57:02 +03:00
veetaha
364fbd7fc7 Simplify config 2020-04-23 01:30:55 +03:00
Hannes De Valkeneer
380a2870c7 feat: run ignored tests 2020-04-22 23:54:09 +02:00
nathanwhit
dfde73ef90 Update tests to reflect new completions 2020-04-22 12:21:22 -04:00
nathanwhit
18ad86fdda Add tests for enum completion
Adds tests for completion of enum variants in match arms, if-let statements, and basic expressions.
2020-04-22 12:21:22 -04:00
nathanwhit
8664509745 Complete unqualified enum variants when possible 2020-04-22 12:21:14 -04:00
nathanwhit
6c61a7b22f Add utility fn for expected type of a node
Adds `expected_type_of` to `CompletionContext` to return the expected type of a
node, if it is known.
2020-04-22 12:20:18 -04:00
bors[bot]
3f1f3a835a
Merge #4090
4090: Fix config naming r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-04-22 15:26:47 +00:00
Aleksey Kladov
9e16e2b279 Align the name of proc-macro enabling flag
We use `enable`, not `enabled` elsewhere
2020-04-22 17:22:59 +02:00
Aleksey Kladov
d436beeb04 Match implementation of diagnostics flag to the docs 2020-04-22 17:22:18 +02:00
bors[bot]
0f8ae29cd6
Merge #4089
4089: npm update r=kjeremy a=kjeremy



Co-authored-by: kjeremy <kjeremy@gmail.com>
2020-04-22 15:05:15 +00:00
kjeremy
c6a50aead7 npm update 2020-04-22 10:58:50 -04:00
bors[bot]
e7afc04416
Merge #4088
4088: cargo update r=kjeremy a=kjeremy



Co-authored-by: kjeremy <kjeremy@gmail.com>
2020-04-22 14:54:30 +00:00
kjeremy
08e5654076 cargo update 2020-04-22 10:34:53 -04:00
Leander Tentrup
445052f6d4 Adapt format specifier highlighting to support escaped squences and unicode identifiers 2020-04-22 15:28:35 +02:00
bors[bot]
cb0a24104c
Merge #4082
4082: Don't panic on `rust-analyzer --help` r=matklad a=eminence

Special case handling for `-h` and `--help` if no subcommand is given.

Closes #4068

Co-authored-by: Andrew Chin <achin@eminence32.net>
2020-04-22 11:55:18 +00:00
bors[bot]
e7bb260fbb
Merge #4081
4081: Work around crlf in syntax tree r=matklad a=Veetaha

Workarounds fixes #4067 

Co-authored-by: veetaha <veetaha2@gmail.com>
2020-04-22 11:05:18 +00:00
veetaha
c12d0e0214 Refactor the workaround a bit 2020-04-22 12:35:03 +03:00
veetaha
07bd4bedcb Work around crlf in syntax tree 2020-04-22 12:33:11 +03:00
bors[bot]
3d7451e6e7
Merge #4080
4080: Fix .rast tmGrammar to account for numbers in identifiers r=matklad a=Veetaha



Co-authored-by: veetaha <veetaha2@gmail.com>
2020-04-22 09:10:13 +00:00
Leander Tentrup
b2829a5216 Apply suggestions from code review
Co-Authored-By: bjorn3 <bjorn3@users.noreply.github.com>
2020-04-22 10:18:46 +02:00
Andrew Chin
165f5c6577 Don't panic on rust-analyzer --help
Special case handling for `-h` and `--help` if no subcommand is given.

Closes #4068
2020-04-21 20:23:01 -04:00
veetaha
61a931425d Fix .rast tmGrammar to account for numbers in identifiers 2020-04-22 02:00:58 +03:00
Timo Freiberg
f2f882bc44 Add pub(crate) to functions generated in other module 2020-04-21 23:04:44 +02:00
Timo Freiberg
74780a15f6 Jump to sourceChanges in other files 2020-04-21 23:04:44 +02:00
Timo Freiberg
ba8faf3efc Add target file information to AssistAction 2020-04-21 23:04:44 +02:00
Timo Freiberg
317fc650d5 Make add_function generate functions in other modules via qualified path 2020-04-21 23:04:44 +02:00
bors[bot]
546f9ee7a7
Merge #4078
4078: Do not add default and closure types in 'add explicit type' assist r=matklad a=SomeoneToIgnore



Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2020-04-21 20:13:17 +00:00
Kirill Bulatov
ce06a6b422 Do not add default and closure types in 'add explicit type' assist 2020-04-21 22:56:40 +03:00
bors[bot]
7ab28cacbb
Merge #4076
4076: Improve remove derive attrs r=matklad a=edwin0cheng

This PR implemented a proper `remove_derive_attrs` function which **merely** remove  any `#[derive(*)]` attributes.

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2020-04-21 18:50:53 +00:00
Edwin Cheng
4a303366c8 Improve remove dervie attrs 2020-04-22 01:44:21 +08:00
Benjamin Coenen
da6b136ea5 Improve autocompletion by looking on the type and name
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-04-21 17:19:18 +02:00
bors[bot]
4a250021b1
Merge #4038
4038: Group generated ast boilerplate apart from the interesting part r=matklad a=Veetaha

Boilerplate `AstNode` and `From` impls are moved to the end further from the interesting part in `generated.rs`

Co-authored-by: veetaha <veetaha2@gmail.com>
2020-04-21 12:58:27 +00:00
Benjamin Coenen
b6a7be19d9 Improve autocompletion by looking on the type and name
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-04-21 14:36:56 +02:00
Benjamin Coenen
7f143b154e Merge branch 'master' of github.com:rust-analyzer/rust-analyzer 2020-04-21 14:32:02 +02:00
Benjamin Coenen
1c3a1385a5 Improve autocompletion by looking on the type and name
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-04-21 14:31:57 +02:00
bors[bot]
a88887df07
Merge #4071
4071: Cleanup args a bit r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-04-21 10:10:22 +00:00
Aleksey Kladov
d9bed8aa45 Cleanup args a bit 2020-04-21 12:06:25 +02:00
bors[bot]
192ad01ebd
Merge #4070
4070: docs(readme): improve user docs r=matklad a=fannheyward

cleanup unavailable configurations/commands

Co-authored-by: Heyward Fann <fannheyward@gmail.com>
2020-04-21 10:02:41 +00:00
Heyward Fann
0f49fd818b docs(readme): improve user docs
cleanup unavailable configurations/commands
2020-04-21 17:54:13 +08:00
bors[bot]
4c6c4f3fd5
Merge #4069
4069: More detailed Sublime Text install instructions r=lnicola a=nnmm

* People might typically jump directly to their editor and wonder where the part about installing rust-analyzer is – at least I did. I added a link to the relevant section for ST.
* Make ST instructions more detailed and user friendly (especially beginners), include troubleshooting tips.
* Minor grammar improvements throughout.

Co-authored-by: Nikolai Morin <nnmmgit@gmail.com>
2020-04-21 09:18:55 +00:00
Nikolai Morin
427f634de3
Move the PATH issue up to the non-editor specific section 2020-04-21 11:17:12 +02:00
Nikolai Morin
c0e9a1a476
Delete comma 2020-04-21 10:16:30 +02:00