Changelog #19
Commit: ec3fb1c
Release: 2020-04-06
New Features
-
BREAKING
#3824
changed the name of many options. The current set is specified here. If you are using a non-VS Code client, note that rust-analyzer now asks forrust-analyzer
secion of configuration, and expects this config to be present ininitializationOptions
. -
#3804
,#3825
it is now possible to use arbitrary command for on the fly error checking:1 2 3 4 5
{ "rust-analyzer.checkOnSave.overrideCommand": [ "./x.py", "check", "--json-output" ] }
-
#3807
,#3825
similarly, it is now possible to completely overriderustfmt
command. -
#3820
remove support for old syntax highlighting. To use the new semantic tokens highlighting:-
install the recent vscode insiders build
-
add
1 2 3 4
{ "rust-analyzer.highlighting.semanticTokens": true, "editor.semanticHighlighting.enabled": false, }
to config
-
run vscode as
code-insiders --enabled-proposed-api matklad.rust-analyzer
-
make sure to use a color theme with support for syntax highlighitng.
-
Rust specific tokens and modifiers are listed here. For example, to underline all
mut
and&mut
variables, add this tosettings.json
:1 2 3 4 5
"editor.tokenColorCustomizationsExperimental": { "*.mutable": { "fontStyle": "underline" } }
-
-
#3814
add Implement From for enum variant assist -
#3746
add Create function assist. -
#3840
automatically add call parenthesis for tuple-like enum variants -
#3666
handle some configuration changes without server restart. -
#3777
populate default task list in VS Code with cargo commands. -
#3765
SSR no longer takes field order into account. -
#3829
SSR treats method call and UFCS equivalently. -
#3779
code completion for recrod literals now suggest only fields which are not already present.
Fixes
-
#3785
attach doc comments to declaration even if there’s a blank line after comment. -
#3781
,#3819
make Run action correctly handle the case with several major versions of the package in the crate graph. -
#3786
Fill Match Arms assits does not leave the floating comma behind. -
#3797
don’t show chaining hints for record literals and unit structs. -
#3844
make sure that default configuration values are honored. -
#3857
fix inference of function pointer return types. -
#3858
don’t show return type for()
-returning function.
Internal Improvements
-
#3817
,#3815
,#3816
Show Syntax Tree internal command now has syntax highlighting and auto scroll from source. -
#3790
use uniiform naming (config
) for all configuration-related functionality. -
#3792
,#3802
inspired by Emacs, rename "cargo watch" functionality to flycheck. -
#3793
add integrated test for code-generating build.rs. -
#3795
decouple flycheck and project model. -
#3809
reduce the number of structs holding configuration from three to one. -
#3836
wrap macros in pattern position intoast::MacroPat
node to not confuse them with expressions. -
#3744
upgrade chalk.