2018: assists: add assist for custom implementation for derived trait r=matklad a=paulolieuthier
Please, tell me if something could be more idiomatic or efficient.
Fixes#1256.
Co-authored-by: Paulo Lieuthier <paulolieuthier@gmail.com>
In particular it is necessary to clone the repository before running the other commands. I also removed the `cargo install` side note because it didn't actually work (running the command just produces an error that --package isn't a recognized flag) and added a tldr code block with the list of commands to run.
2343: implement assist invert_if r=matklad a=bravomikekilo
fix [issue 2219 invert if condition](https://github.com/rust-analyzer/rust-analyzer/issues/2219)
I put the assist cursor range to `if` of the if expression, because both condition and body will be replaced. Is there any way to replace them without cover the cursor position?
@matklad
Co-authored-by: bravomikekilo <bmk1221@126.com>
2165: ra_assists: Add add_new assist r=matklad a=rep-nop
Adds a new assist to autogenerate a new fn based on the selected struct, excluding tuple structs and unions. The fn will inherit the same visibility as the struct and the assist will attempt to reuse any existing impl blocks that exist at the same level of struct.
Not marking this as closing #1644 since there's a part 2 of adding autocompletion for when someone starts typing `[pub ]fn new(...`
Co-authored-by: Wesley Norris <repnop@outlook.com>
Adds a new assist to autogenerate a new fn based on the selected struct,
excluding tuple structs and unions. The fn will inherit the same
visibility as the struct and the assist will attempt to reuse any
existing impl blocks that exist at the same level of struct.
1952: Create an assist for applying De Morgan's Law r=matklad a=cronokirby
Fixes#1807
This assist can transform expressions of the form `!x || !y` into
`!(x && y)`. This also works with `&&`.
This assist will only trigger if the cursor is on the central logical
operator.
The main limitation of this current implementation is that both operands
need to be an explicit negation, either of the form `!x`, or `x != y`.
More operands could be accepted, but this would complicate the implementation
quite a bit.
Co-authored-by: Lúcás Meier <cronokirby@gmail.com>
1. `command` has been added to change the default cargo-watch command
2. `check-arguments` has been renamed to `arguments` as a consequence
Thoses changes were merged in #1434