aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/user/README.md5
-rw-r--r--docs/user/assists.md19
2 files changed, 24 insertions, 0 deletions
diff --git a/docs/user/README.md b/docs/user/README.md
index 235676850..1b2d98608 100644
--- a/docs/user/README.md
+++ b/docs/user/README.md
@@ -141,6 +141,11 @@ to load path and require it in `init.el`
141 141
142## Vim and NeoVim 142## Vim and NeoVim
143 143
144Neovim 0.5 has a built in language server. For a quick start configuration of
145rust-analyzer, use [neovim/nvim-lsp](https://github.com/neovim/nvim-lsp#rust_analyzer).
146Once `neovim/nvim-lsp` is installed, you can use `call nvim_lsp#setup("rust_analyzer", {})`
147or `lua require'nvim_lsp'.rust_analyzer.setup({})` to quickly get set up.
148
144* Install coc.nvim by following the instructions at [coc.nvim] 149* Install coc.nvim by following the instructions at [coc.nvim]
145 - You will need nodejs installed. 150 - You will need nodejs installed.
146 - You may want to include some of the sample vim configurations [from here][coc-vim-conf] 151 - You may want to include some of the sample vim configurations [from here][coc-vim-conf]
diff --git a/docs/user/assists.md b/docs/user/assists.md
index 8da7578e2..6f4c30bee 100644
--- a/docs/user/assists.md
+++ b/docs/user/assists.md
@@ -329,6 +329,25 @@ fn main() {
329} 329}
330``` 330```
331 331
332## `invert_if`
333
334Apply invert_if
335This transforms if expressions of the form `if !x {A} else {B}` into `if x {B} else {A}`
336This also works with `!=`. This assist can only be applied with the cursor
337on `if`.
338
339```rust
340// BEFORE
341fn main() {
342 if┃ !y { A } else { B }
343}
344
345// AFTER
346fn main() {
347 if y { B } else { A }
348}
349```
350
332## `make_raw_string` 351## `make_raw_string`
333 352
334Adds `r#` to a plain string literal. 353Adds `r#` to a plain string literal.