1978: if completion does auto-insertion, indicate this in the label r=matklad a=matklad
bors try
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
1970: Add <> when completing generics r=matklad a=matklad
@flodiebold wdyt? Is it correct that we always need to add `<>` in generic types?
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
1924: Support inferring&completing `Self` type in enum/struct/union definitions r=ice1000 a=ice1000
Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>
An attempt to fix#1908.
This code works, but I believe the implementation is ugly. Please give me suggestions!
Co-authored-by: ice1000 <ice1000kotlin@foxmail.com>
1951: Lower the precedence of the `as` operator. r=matklad a=goffrie
Previously, the `as` operator was being parsed like a postfix expression, and
therefore being given the highest possible precedence. That caused it to bind
more tightly than prefix operators, which it should not. Instead, parse it
somewhat like a normal binary expression with some special-casing.
Fixes#1851.
Co-authored-by: Geoffry Song <goffrie@gmail.com>
1928: Support `#[cfg(..)]` r=matklad a=oxalica
This PR implement `#[cfg(..)]` conditional compilation. It read default cfg options from `rustc --print cfg` with also hard-coded `test` and `debug_assertion` enabled.
Front-end settings are **not** included in this PR.
There is also a known issue that inner control attributes are totally ignored. I think it is **not** a part of `cfg` and create a separated issue for it. #1949Fixes#1920
Related: #1073
Co-authored-by: uHOOCCOOHu <hooccooh1896@gmail.com>
Co-authored-by: oxalica <oxalicc@pm.me>
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>
1957: Add alternative setup instruction for vim/neovim r=matklad a=Luke-Nukem
Provide another option hint for vim/neovim users who do not want to run nodejs
Co-authored-by: Luke Jones <luke@ljones.dev>
docs weigh a lot, and change a lot. Keeping their changes in history
inflates repo size. By specifying `keep-history: false` we should be
able to avoid that.