Skip to content

Commit d7ebfda

Browse files
committed
Changelog #13
1 parent c518f00 commit d7ebfda

File tree

2 files changed

+73
-17
lines changed

2 files changed

+73
-17
lines changed

manual.adoc

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

77
// Master copy of this document lives in the https://github.com/rust-analyzer/rust-analyzer repository
88

9-
At it's core, rust-analyzer is a *library* for semantic analysis of the Rust code as it changes over time.
9+
At its core, rust-analyzer is a *library* for semantic analysis of Rust code as it changes over time.
1010
This manual focuses on a specific usage of the library -- the implementation of
1111
https://microsoft.github.io/language-server-protocol/[Language Server Protocol].
12-
LSP allows various code editors, like VS Code, Emacs or Vim, to implement semantic feature like completion or goto definition by talking to an external language server process.
12+
LSP allows various code editors, like VS Code, Emacs or Vim, to implement semantic features like completion or goto definition by talking to an external language server process.
1313

1414
To improve this document, send a pull request against
1515
https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/user/readme.adoc[this file].
@@ -20,7 +20,9 @@ In theory, one should be able to just install the server binary and have it auto
2020
We are not there yet, so some editor specific setup is required.
2121

2222
Additionally, rust-analyzer needs sources of the standard library.
23-
This commands adds them:
23+
If the source code is not present, rust-analyzer will attempt to install it automatically.
24+
25+
To add the sources manually, run the following command:
2426

2527
```bash
2628
$ rustup component add rust-src
@@ -34,10 +36,9 @@ https://github.com/rust-analyzer/rust-analyzer/tree/master/editors/code[in tree]
3436

3537
You can install the latest release of the plugin from
3638
https://marketplace.visualstudio.com/items?itemName=matklad.rust-analyzer[the marketplace].
37-
By default, the plugin will download the matching version of the server as well.
39+
By default, the plugin will prompt you to download the matching version of the server as well:
3840

39-
// FIXME: update the image (its text has changed)
40-
image::https://user-images.githubusercontent.com/36276403/74103174-a40df100-4b52-11ea-81f4-372c70797924.png[]
41+
image::https://user-images.githubusercontent.com/9021944/75067008-17502500-54ba-11ea-835a-f92aac50e866.png[]
4142

4243
The server binary is stored in `~/.config/Code/User/globalStorage/matklad.rust-analyzer`.
4344

@@ -58,20 +59,20 @@ $ cargo xtask install
5859
----
5960

6061
You'll need Cargo, nodejs and npm for this.
61-
To make VS Code use the freshly build server, add this to the settings:
62+
To make VS Code use the freshly built server, add this to the settings:
6263

6364
[source,json]
6465
----
65-
{ "rust-analyzer.raLspServerPath": "ra_lsp_server" }
66+
{ "rust-analyzer.serverPath": "rust-analyzer" }
6667
----
6768

6869
Note that installing via `xtask install` does not work for VS Code Remote, instead you'll need to install the `.vsix` manually.
6970

7071
=== Language Server Binary
7172

72-
Other editors generally require `ra_lsp_server` binary to be in `$PATH`.
73-
You can download pre-build binary from
74-
https://github.com/rust-analyzer/rust-analyzer/releases[relases]
73+
Other editors generally require `rust-analyzer` binary to be in `$PATH`.
74+
You can download the pre-built binary from
75+
https://github.com/rust-analyzer/rust-analyzer/releases[releases]
7576
page, or you can install it from source using the following command:
7677

7778
[source,bash]
@@ -83,7 +84,7 @@ $ cargo xtask install --server
8384

8485
Emacs support is maintained https://github.com/emacs-lsp/lsp-mode/blob/master/lsp-rust.el[upstream].
8586

86-
1. Install recent version of `emacs-lsp` package by following the instructions https://github.com/emacs-lsp/lsp-mode[here].
87+
1. Install the most recent version of `emacs-lsp` package by following the instructions https://github.com/emacs-lsp/lsp-mode[here].
8788
2. Set `lsp-rust-server` to `'rust-analyzer`.
8889
3. Run `lsp` in a Rust buffer.
8990
4. (Optionally) bind commands like `lsp-rust-analyzer-join-lines`, `lsp-extend-selection` and `lsp-rust-analyzer-expand-macro` to keys.
@@ -100,7 +101,7 @@ The are several LSP client implementations for vim:
100101
2. Run `:CocInstall coc-rust-analyzer` to install
101102
https://github.com/fannheyward/coc-rust-analyzer[coc-rust-analyzer],
102103
this extension implements _most_ of the features supported in the VSCode extension:
103-
* same configurations as VSCode extension, `rust-analyzer.raLspServerPath`, `rust-analyzer.enableCargoWatchOnStartup` etc.
104+
* same configurations as VSCode extension, `rust-analyzer.serverPath`, `rust-analyzer.enableCargoWatchOnStartup` etc.
104105
* same commands too, `rust-analyzer.analyzerStatus`, `rust-analyzer.startCargoWatch` etc.
105106
* highlighting and inlay_hints are not implemented yet
106107

@@ -110,18 +111,18 @@ The are several LSP client implementations for vim:
110111
https://github.com/autozimu/LanguageClient-neovim[here]
111112
* The github project wiki has extra tips on configuration
112113

113-
2. Configure by adding this to your vim/neovim config file (replacing the existing rust specific line if it exists):
114+
2. Configure by adding this to your vim/neovim config file (replacing the existing Rust-specific line if it exists):
114115
+
115116
[source,vim]
116117
----
117118
let g:LanguageClient_serverCommands = {
118-
\ 'rust': ['ra_lsp_server'],
119+
\ 'rust': ['rust-analyzer'],
119120
\ }
120121
----
121122

122123
==== nvim-lsp
123124

124-
NeoVim 0.5 (not yet released) has built in language server support.
125+
NeoVim 0.5 (not yet released) has built-in language server support.
125126
For a quick start configuration of rust-analyzer, use https://github.com/neovim/nvim-lsp#rust_analyzer[neovim/nvim-lsp].
126127
Once `neovim/nvim-lsp` is installed, use `lua require'nvim_lsp'.rust_analyzer.setup({})` in your `init.vim`.
127128

@@ -140,7 +141,7 @@ Installation:
140141
[source,json]
141142
----
142143
"rust-analyzer": {
143-
"command": ["ra_lsp_server"],
144+
"command": ["rust-analyzer"],
144145
"languageId": "rust",
145146
"scopes": ["source.rust"],
146147
"syntaxes": [
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
= Changelog #13
2+
:sectanchors:
3+
:page-layout: post
4+
5+
Commit: commit:cba3c991c8188e87363bbff190e9528606140808[] +
6+
Release: release:2020-02-24[]
7+
8+
== New Features
9+
10+
* pr:3216[] language server binary is renamed from `ra_lsp_server` to `rust-analyzer`.
11+
Additionally, `rust-analyzer.lspServerPath` config is renamed to `rust-analyzer.serverPath`
12+
13+
* pr:3199[], pr:3200[] merge `ra_cli` batch processing utils with the main `rust-analyzer` binary.
14+
Now you can, eg, run `rust-analyzer analysis-stats path/to/my/project` to type check all functions in batch.
15+
This is intended to help with debugging rust-analyzer itself.
16+
17+
* pr:3206[] automatically install `rust-src` component.
18+
* pr:3231[] add **Remove mut** assist.
19+
* pr:3252[] for syntax highlighting, take token color customization into account.
20+
* pr:3269[] document inlay hints.
21+
* pr:3278[], pr:3279[] show inlay hints in more cases.
22+
* pr:3275[] document structural search and replace.
23+
24+
== Fixes
25+
26+
* pr:3229[] fix a crash with non-ascii whitespace in doc-comments.
27+
* pr:3228[] fix hover for for code inside macro calls.
28+
* pr:3233[] extend selection correctly handles commas in tuple patterns
29+
* pr:3239[] remove dependency on libbacktrace.
30+
* pr:3241[] **Fill missing fields** fix works with enum variants as well.
31+
* pr:3215[] exclude methods from non-parameter types introduced by generic constraints
32+
* pr:3248[] fix custom `onEnter` not triggering at the start of a doc comment
33+
* pr:3251[], pr:3282[] better error messages when workspace loading fails.
34+
* pr:3259[] fix handing of associated type.
35+
* pr:3244[] renaming a module now renames both the file and the references to the module.
36+
* pr:3262[] correctly distinguish between const patterns and bindings.
37+
* pr:3260[] fix name resolution rules for build-in types.
38+
* pr:3230[] fix macro expansion for invalid tokens.
39+
* pr:3277[] gracefully handle cancellation errors in VS Code plugin.
40+
* pr:3289[], pr:3290[] don't break the kbd:[Enter] key if rust-analyzer returns an error.
41+
42+
43+
== Internal Improvements
44+
45+
* pr:3195[] remove dependency on `proptest` property based testing library to
46+
improve compile times.
47+
* pr:3209[], pr:3205[], pr:3258[] switch TypeScript extension linter to eslint.
48+
* pr:3214[] document all modules in the language server crate.
49+
* pr:3026[] simplify internal representation of syntax errors.
50+
* pr:3234[], pr:3235[], pr:3236[] refactor handing of symbols/defs in IDE.
51+
* pr:3242[] make sure that, by default, rust-analyzer does not depend on C code.
52+
* pr:3247[] make `rust-analyzer --version` more useful and reliable.
53+
* pr:3263[] use chalk for unsizing coercions.
54+
* pr:3274[] refactor navigation-related code to use hir instead of AST.
55+
* pr:3261[] setup client-side logging infrastructure.

0 commit comments

Comments
 (0)