From 7edd293e5ca9b97953b37efda4d33654aa74e887 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Tue, 28 Apr 2020 21:01:10 -0400 Subject: add ale to the nvim setup section of the readme --- docs/user/readme.adoc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'docs') diff --git a/docs/user/readme.adoc b/docs/user/readme.adoc index 76d065d35..5a78f06a9 100644 --- a/docs/user/readme.adoc +++ b/docs/user/readme.adoc @@ -212,6 +212,21 @@ let g:ycm_language_server = \ ] ---- +==== ALE + +To add the LSP server to 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': '.', +\}) +---- + ==== nvim-lsp NeoVim 0.5 (not yet released) has built-in language server support. -- cgit v1.2.3 From 6b0be2f67fc98748980079eed4a5749c54f7ce7e Mon Sep 17 00:00:00 2001 From: Boris Staletic Date: Wed, 29 Apr 2020 12:50:54 +0200 Subject: Fix YouComplteMe instructions link --- 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 5a78f06a9..8b80a7df7 100644 --- a/docs/user/readme.adoc +++ b/docs/user/readme.adoc @@ -195,7 +195,7 @@ let g:LanguageClient_serverCommands = { ==== YouCompleteMe 1. Install YouCompleteMe by following the instructions - https://ycm-core.github.io/YouCompleteMe/#rust-semantic-completion[here] + https://github.com/ycm-core/lsp-examples#rust-rust-analyzer[here] 2. Configure by adding this to your vim/neovim config file (replacing the existing Rust-specific line if it exists): + -- cgit v1.2.3 From 9ff566212e392033db9477ef3fb72649499bb684 Mon Sep 17 00:00:00 2001 From: KENTARO OKUDA Date: Wed, 29 Apr 2020 16:00:52 -0400 Subject: Fix Typos on features.md --- docs/user/features.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/user/features.md b/docs/user/features.md index 56d2969fd..b9a365fc1 100644 --- a/docs/user/features.md +++ b/docs/user/features.md @@ -140,8 +140,8 @@ space or `;` depending on the return type of the function. When completing a function call, `()` are automatically inserted. If a function takes arguments, the cursor is positioned inside the parenthesis. -There are postifx completions, which can be triggerd by typing something like -`foo().if`. The word after `.` determines postifx completion. Possible variants are: +There are postfix completions, which can be triggered by typing something like +`foo().if`. The word after `.` determines postfix completion. Possible variants are: - `expr.if` -> `if expr {}` - `expr.match` -> `match expr {}` -- cgit v1.2.3 From 2e4ce5390c7c990ee503d9c24042194054efed51 Mon Sep 17 00:00:00 2001 From: Heyward Fann Date: Thu, 30 Apr 2020 11:38:20 +0800 Subject: docs(user): method chaining hints support https://github.com/fannheyward/coc-rust-analyzer/issues/177#issuecomment-621109410 --- docs/user/readme.adoc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/user/readme.adoc b/docs/user/readme.adoc index 8b80a7df7..54342026b 100644 --- a/docs/user/readme.adoc +++ b/docs/user/readme.adoc @@ -169,13 +169,15 @@ The are several LSP client implementations for vim: 1. Install coc.nvim by following the instructions at https://github.com/neoclide/coc.nvim[coc.nvim] - (nodejs required) + (Node.js required) 2. Run `:CocInstall coc-rust-analyzer` to install https://github.com/fannheyward/coc-rust-analyzer[coc-rust-analyzer], this extension implements _most_ of the features supported in the VSCode extension: + * automatically install and upgrade stable/nightly releases * same configurations as VSCode extension, `rust-analyzer.serverPath`, `rust-analyzer.cargo.features` etc. * same commands too, `rust-analyzer.analyzerStatus`, `rust-analyzer.ssr` etc. - * highlighting and inlay_hints are not implemented yet + * inlay hints for method chaining support, _Neovim Only_ + * semantic highlighting is not implemented yet ==== LanguageClient-neovim -- cgit v1.2.3 From a00647cefe180243060e02f100c140ef7bc4440c Mon Sep 17 00:00:00 2001 From: hafiz <20735482+ayazhafiz@users.noreply.github.com> Date: Thu, 30 Apr 2020 11:21:16 -0700 Subject: Fix typo in language server binary docs --- 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 54342026b..0743d117f 100644 --- a/docs/user/readme.adoc +++ b/docs/user/readme.adoc @@ -111,7 +111,7 @@ Here are some useful self-diagnostic commands: === rust-analyzer Language Server Binary Other editors generally require the `rust-analyzer` binary to be in `$PATH`. -You can download the pre-built binary from the https://github.com/rust-analyzer/rust-analyzer/releases[releases] page. Typically, you then need to rename the binary for your platform, e.g. `rust-analyzer-mac` if you're on Mac OS, to `rust-analzyer` and make it executable in addition to moving it into a directory in your `$PATH`. +You can download the pre-built binary from the https://github.com/rust-analyzer/rust-analyzer/releases[releases] page. Typically, you then need to rename the binary for your platform, e.g. `rust-analyzer-mac` if you're on Mac OS, to `rust-analyzer` and make it executable in addition to moving it into a directory in your `$PATH`. On Linux to install the `rust-analyzer` binary into `~/.local/bin`, this commands could be used -- cgit v1.2.3 From d185cbd99e424783e8f8c5bef7a40f91563d1b7c Mon Sep 17 00:00:00 2001 From: hafiz <20735482+ayazhafiz@users.noreply.github.com> Date: Thu, 30 Apr 2020 11:29:21 -0700 Subject: Update readme.adoc --- docs/user/readme.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/user/readme.adoc b/docs/user/readme.adoc index 0743d117f..4cb1e23e8 100644 --- a/docs/user/readme.adoc +++ b/docs/user/readme.adoc @@ -246,9 +246,9 @@ You also need the `LSP` package. To install it: * Type `Install Package Control`, press enter 2. In the command palette, run `Package control: Install package`, and in the list that pops up, type `LSP` and press enter. -Finally, with your Rust project open, in the command palette, run `LSP: Enable Language Server In Project` or `LSP: Enable Language Server Globally`, then select `rust-analyzer` in the list that pops up to enable the rust-analyzer LSP. The latter means that rust-analzyer is enabled by default in Rust projects. +Finally, with your Rust project open, in the command palette, run `LSP: Enable Language Server In Project` or `LSP: Enable Language Server Globally`, then select `rust-analyzer` in the list that pops up to enable the rust-analyzer LSP. The latter means that rust-analyzer is enabled by default in Rust projects. -If it worked, you should see "rust-analzyer, Line X, Column Y" on the left side of the bottom bar, and after waiting a bit, functionality like tooltips on hovering over variables should become available. +If it worked, you should see "rust-analyzer, Line X, Column Y" on the left side of the bottom bar, and after waiting a bit, functionality like tooltips on hovering over variables should become available. If you get an error saying `No such file or directory: 'rust-analyzer'`, see the <> section on installing the language server binary. -- cgit v1.2.3 From 742055e29f1b25063e291d021640430e58698b73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Sinan=20A=C4=9Facan?= Date: Thu, 30 Apr 2020 23:27:06 +0300 Subject: Update Roslyn link in syntax.md Eric Lippert has a new blog that he keeps updating, update the link to that --- docs/dev/syntax.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/dev/syntax.md b/docs/dev/syntax.md index 4dd1de659..33973ffec 100644 --- a/docs/dev/syntax.md +++ b/docs/dev/syntax.md @@ -35,7 +35,7 @@ The syntax tree consists of three layers: * AST Of these, only GreenNodes store the actual data, the other two layers are (non-trivial) views into green tree. -Red-green terminology comes from Roslyn ([link](https://docs.microsoft.com/en-ie/archive/blogs/ericlippert/persistence-facades-and-roslyns-red-green-trees)) and gives the name to the `rowan` library. Green and syntax nodes are defined in rowan, ast is defined in rust-analyzer. +Red-green terminology comes from Roslyn ([link](https://ericlippert.com/2012/06/08/red-green-trees/)) and gives the name to the `rowan` library. Green and syntax nodes are defined in rowan, ast is defined in rust-analyzer. Syntax trees are a semi-transient data structure. In general, frontend does not keep syntax trees for all files in memory. -- cgit v1.2.3