From c60f9bf4c6d6ddd341c673b228b6aa1add3da62b Mon Sep 17 00:00:00 2001 From: Seivan Heidari Date: Mon, 4 Nov 2019 23:59:11 +0100 Subject: * Adding scope mapping configuration manifest in `package.json` * Loading configurable scope mappings from settings. * Updating Readme with `rust-analyzer.scopeMappings`. `rust-analyzer.scopeMappings` -- a scheme backed JSON object to tweak Rust Analyzer scopes to TextMate scopes. ```jsonc { //Will autocomplete keys to available RA scopes. "keyword.unsafe": ["keyword", "keyword.control"], //Values are string | TextMateScope | [string | TextMateScope] "comments": "comment.block" } ``` --- docs/user/README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/user/README.md b/docs/user/README.md index eb1d5ed14..42742c0e6 100644 --- a/docs/user/README.md +++ b/docs/user/README.md @@ -82,7 +82,16 @@ host. ### Settings -* `rust-analyzer.highlightingOn`: enables experimental syntax highlighting +* `rust-analyzer.highlightingOn`: enables experimental syntax highlighting. +* `rust-analyzer.scopeMappings` -- a scheme backed JSON object to tweak Rust Analyzer scopes to TextMate scopes. + ```jsonc + { + //Will autocomplete keys to available RA scopes. + "keyword.unsafe": ["keyword", "keyword.control"], + //Values are string | TextMateScope | [string | TextMateScope] + "comments": "comment.block" + } + ``` * `rust-analyzer.enableEnhancedTyping`: by default, rust-analyzer intercepts `Enter` key to make it easier to continue comments. Note that it may conflict with VIM emulation plugin. * `rust-analyzer.raLspServerPath`: path to `ra_lsp_server` executable @@ -101,7 +110,7 @@ host. * `rust-analyzer.trace.cargo-watch`: enables cargo-watch logging * `RUST_SRC_PATH`: environment variable that overwrites the sysroot * `rust-analyzer.featureFlags` -- a JSON object to tweak fine-grained behavior: - ```js + ```jsonc { // Show diagnostics produced by rust-analyzer itself. "lsp.diagnostics": true, -- cgit v1.2.3