Commit Graph

9791 Commits

Author SHA1 Message Date
Aleksey Kladov
dd59237e0c minor 2020-04-23 23:18:18 +02:00
bors[bot]
189ac4abbf
Merge #4108
4108: Fully get rid of SyntaxNodePtr::range r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-04-23 19:24:20 +00:00
Aleksey Kladov
27dd0086ea Fully get rid of SyntaxNodePtr::range 2020-04-23 21:23:36 +02:00
bors[bot]
d283f87f6d
Merge #4107
4107: Disable onEnter command by default r=matklad a=matklad

We are transitioning from experimental to production-ready stance, so
it makes sense to disable potentially disruptive features by default.



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-04-23 19:06:50 +00:00
Aleksey Kladov
919015ce8a Disable onEnter command by default
We are transitioning from experimental to production-ready stance, so
it makes sense to disable potentially disruptive features by default.
2020-04-23 21:01:17 +02:00
Edwin Cheng
1627b55028 Bubble up error 2020-04-24 01:38:58 +08:00
bors[bot]
29bc218fba
Merge #4102
4102: Cleanup proc_macro config r=matklad a=matklad

In general, there should be no reason to call `.to_string_lossy`.
If you want to display the path, use `.display()`.
If you want to pass the path to an OS API (like std::process::Command)
than use `PathBuf` or `OsString`.



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-04-23 16:56:05 +00:00
Aleksey Kladov
ca6d7bfe61 Cleanup proc_macro config
In general, there should be no reason to call `.to_string_lossy`.
If you want to display the path, use `.display()`.
If you want to pass the path to an OS API (like std::process::Command)
than use `PathBuf` or `OsString`.
2020-04-23 18:55:26 +02:00
bors[bot]
9b53e79aeb
Merge #4100
4100: Bump required rust to 1.43 r=matklad a=kjeremy

This only impacts source builds

Co-authored-by: kjeremy <kjeremy@gmail.com>
2020-04-23 16:40:26 +00:00
Edwin Cheng
25e8f5ded9 Fix typo 2020-04-24 00:16:17 +08:00
Edwin Cheng
0744497699 Panic proc macro srv if read request failed 2020-04-24 00:06:01 +08:00
kjeremy
4378c63272 Bump required rust to 1.43 2020-04-23 11:56:32 -04:00
bors[bot]
278bf351e3
Merge #4065
4065: Complete unqualified enum names in patterns and expressions r=matklad a=nathanwhit

This PR implements the completion described in #4014.
The result looks like so for patterns:
<img width="542" alt="Screen Shot 2020-04-20 at 3 53 55 PM" src="https://user-images.githubusercontent.com/17734409/79794010-8f529400-831f-11ea-9673-f838aa9bc962.png">

and for `expr`s:
<img width="620" alt="Screen Shot 2020-04-21 at 3 51 24 PM" src="https://user-images.githubusercontent.com/17734409/79908784-d73ded80-83e9-11ea-991d-921f0cb27e6f.png">


I'm not confident that the completion text itself is very robust, as it will unconditionally add completions for enum variants with the form `Enum::Variant`. This means (I believe) it would still suggest `Enum::Variant` even if the local name is changed i.e. `use Enum as Foo` or the variants are brought into scope such as through `use Enum::*`.

Co-authored-by: nathanwhit <nathan.whitaker01@gmail.com>
2020-04-23 15:35:31 +00:00
bors[bot]
4a18509a98
Merge #4099
4099: Remove SyntaxPtr::range from more places r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-04-23 14:40:07 +00:00
Aleksey Kladov
4176c03d12 Remove SyntaxPtr::range from more places 2020-04-23 16:33:01 +02:00
bors[bot]
0502be3bf4
Merge #4093
4093: Simplify config r=matklad a=Veetaha



Co-authored-by: veetaha <veetaha2@gmail.com>
2020-04-23 09:49:03 +00:00
bors[bot]
6ec64805e3
Merge #4094
4094: proc_macro: add ability to log to stderr and view output in vscode r=matklad a=Veetaha

r? @edwin0cheng 

Co-authored-by: veetaha <veetaha2@gmail.com>
2020-04-23 09:32:45 +00:00
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