Aleksey Kladov
561b4b11ff
Name assist handlers
2020-02-07 17:28:02 +01:00
Aleksey Kladov
aa1234e02b
Generalize invert_if to just always work
2020-02-07 12:14:33 +01:00
Aleksey Kladov
cf812c12d1
Assists are not generic
2020-02-06 17:12:02 +01:00
Jeremy Kolb
e04661e495
Fix casing
2020-01-14 12:32:26 -05:00
Jeremy Kolb
4cb82c334d
More UI friendly labels
2020-01-14 11:49:14 -05:00
bravomikekilo
adac4fc2f2
do refact and fix some issue
2019-11-24 13:14:57 +08:00
bravomikekilo
8a8be06219
initial invert_if
2019-11-22 02:51:40 +08:00
Aleksey Kladov
cda6355de2
simplify AssistCtx API
...
We never actually use ability to create multiple actions out of a
single context
2019-10-27 17:35:37 +03:00
Aleksey Kladov
8118dc1bb9
use more consistent naming
...
I think this is the first time I use global rename for rust-analyzer
itself :-)
2019-10-27 11:53:09 +03:00
Aleksey Kladov
394e474479
add blank lines for readability
2019-10-26 17:27:47 +03:00
Aleksey Kladov
d385438bcc
generate more assists docs
2019-10-25 23:38:15 +03:00
Lúcás Meier
e17243d698
[ #1807 ] Refactor file structure
...
Use the more conventional way of importing the ast types, and
put the assist at the top of the file.
2019-10-04 10:51:41 +02:00
Lúcás Meier
1ed1e3d4a7
Fix formatting
2019-10-04 08:21:24 +02:00
Lúcás Meier
e769a54502
Create an assist for applying De Morgan's law
...
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.
2019-10-03 22:48:35 +02:00