aboutsummaryrefslogtreecommitdiff
path: root/docs/user
diff options
context:
space:
mode:
Diffstat (limited to 'docs/user')
-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 bfb190449..913ecea18 100644
--- a/docs/user/README.md
+++ b/docs/user/README.md
@@ -132,6 +132,11 @@ to load path and require it in `init.el`
132 132
133## Vim and NeoVim 133## Vim and NeoVim
134 134
135Neovim 0.5 has a built in language server. For a quick start configuration of
136rust-analyzer, use [neovim/nvim-lsp](https://github.com/neovim/nvim-lsp#rust_analyzer).
137Once `neovim/nvim-lsp` is installed, you can use `call nvim_lsp#setup("rust_analyzer", {})`
138or `lua require'nvim_lsp'.rust_analyzer.setup({})` to quickly get set up.
139
135* Install coc.nvim by following the instructions at [coc.nvim] 140* Install coc.nvim by following the instructions at [coc.nvim]
136 - You will need nodejs installed. 141 - You will need nodejs installed.
137 - You may want to include some of the sample vim configurations [from here][coc-vim-conf] 142 - 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.