From 2b06041692dcdbc1c49292fd64fdc67da312c1ca Mon Sep 17 00:00:00 2001 From: "Daniel M. Capella" Date: Tue, 5 May 2020 18:23:32 -0400 Subject: Update Arch Linux and ALE install instructions Package has been added to the Arch repos: https://www.archlinux.org/packages/community/x86_64/rust-analyzer/ ALE merged rust-analyzer support: https://github.com/dense-analysis/ale/commit/70005134e5b2d40d176ee5b851ac64a296b22201 --- docs/user/readme.adoc | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) (limited to 'docs') diff --git a/docs/user/readme.adoc b/docs/user/readme.adoc index 69f5b13d6..2f2b1d37a 100644 --- a/docs/user/readme.adoc +++ b/docs/user/readme.adoc @@ -139,17 +139,16 @@ If your editor can't find the binary even though the binary is on your `$PATH`, ==== Arch Linux -The `rust-analyzer` binary can be installed from AUR (Arch User Repository): +The `rust-analyzer` binary can be installed from the repos or AUR (Arch User Repository): -- https://aur.archlinux.org/packages/rust-analyzer-bin[`rust-analyzer-bin`] (binary from GitHub releases) -- https://aur.archlinux.org/packages/rust-analyzer[`rust-analyzer`] (built from latest tagged source) -- https://aur.archlinux.org/packages/rust-analyzer-git[`rust-analyzer-git`] (latest git version) +- https://www.archlinux.org/packages/community/x86_64/rust-analyzer/[`rust-analyzer`] (built from latest tagged source) +- https://aur.archlinux.org/packages/rust-analyzer-git[`rust-analyzer-git`] (latest Git version) -Install it with AUR helper of your choice, for example: +Install it with pacman, for example: [source,bash] ---- -$ yay -S rust-analyzer-bin +$ pacman -S rust-analyzer ---- === Emacs @@ -187,7 +186,7 @@ The are several LSP client implementations for vim or neovim: 1. Install LanguageClient-neovim by following the instructions https://github.com/autozimu/LanguageClient-neovim[here] - * The github project wiki has extra tips on configuration + * The GitHub project wiki has extra tips on configuration 2. Configure by adding this to your vim/neovim config file (replacing the existing Rust-specific line if it exists): + @@ -220,17 +219,11 @@ let g:ycm_language_server = ==== ALE -To add the LSP server to https://github.com/dense-analysis/ale[ale]: +To use the LSP server in https://github.com/dense-analysis/ale[ale]: [source,vim] ---- -call ale#linter#Define('rust', { -\ 'name': 'rust-analyzer', -\ 'lsp': 'stdio', -\ 'executable': 'rust-analyzer', -\ 'command': '%e', -\ 'project_root': '.', -\}) +let g:ale_linters = {'rust': ['analyzer']} ---- ==== nvim-lsp -- cgit v1.2.3 From 51c02ab84f6b88ba39e2d0a3ed22bea51114b05a Mon Sep 17 00:00:00 2001 From: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com> Date: Tue, 5 May 2020 19:02:45 +0200 Subject: add Ok wrapping Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com> --- docs/user/assists.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'docs') diff --git a/docs/user/assists.md b/docs/user/assists.md index ee515949e..692fd4f52 100644 --- a/docs/user/assists.md +++ b/docs/user/assists.md @@ -241,6 +241,18 @@ fn main() { } ``` +## `change_return_type_to_result` + +Change the function's return type to Result. + +```rust +// BEFORE +fn foo() -> i32┃ { 42i32 } + +// AFTER +fn foo() -> Result { Ok(42i32) } +``` + ## `change_visibility` Adds or changes existing visibility specifier. -- cgit v1.2.3 From e0b63855b1874ccc71a49c933f73c62c95a92d54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Wed, 6 May 2020 19:53:14 +0300 Subject: Fix Windows server path CC @Coder-256. --- docs/user/readme.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/user/readme.adoc b/docs/user/readme.adoc index 69f5b13d6..301e9a49c 100644 --- a/docs/user/readme.adoc +++ b/docs/user/readme.adoc @@ -61,7 +61,7 @@ The server binary is stored in: * Linux: `~/.config/Code/User/globalStorage/matklad.rust-analyzer` * macOS: `~/Library/Application Support/Code/User/globalStorage/matklad.rust-analyzer` -* Windows: `%APPDATA%\Code\User\globalStorage` +* Windows: `%APPDATA%\Code\User\globalStorage\matklad.rust-analyzer` Note that we only support the latest version of VS Code. -- cgit v1.2.3