From b6fcacd96d26e7edaf37bda852b8b3ad104d4c90 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 27 Oct 2019 17:49:39 +0300 Subject: move all assists to use generated docs --- docs/user/assists.md | 14 ++++++++++++++ docs/user/features.md | 20 +++----------------- 2 files changed, 17 insertions(+), 17 deletions(-) (limited to 'docs') diff --git a/docs/user/assists.md b/docs/user/assists.md index b1fe44d84..303353e74 100644 --- a/docs/user/assists.md +++ b/docs/user/assists.md @@ -136,6 +136,20 @@ impl T for () { } ``` +## `add_import` + +Adds a use statement for a given fully-qualified path. + +```rust +// BEFORE +fn process(map: std::collections::┃HashMap) {} + +// AFTER +use std::collections::HashMap; + +fn process(map: HashMap) {} +``` + ## `apply_demorgan` Apply [De Morgan's law](https://en.wikipedia.org/wiki/De_Morgan%27s_laws). diff --git a/docs/user/features.md b/docs/user/features.md index 7ae2ca7b6..c160dd70b 100644 --- a/docs/user/features.md +++ b/docs/user/features.md @@ -99,24 +99,10 @@ Stop `cargo watch` ### Assists (Code Actions) -These are triggered in a particular context via light bulb. We use custom code on -the VS Code side to be able to position cursor. `<|>` signifies cursor +Assists, or code actions, are small local refactorings, available in a particular context. +They are usually triggered by a shortcut or by clicking a light bulb icon in the editor. -See [assists.md](./assists.md) - -- Import path - -```rust -// before: -impl std::fmt::Debug<|> for Foo { -} - -// after: -use std::fmt::Debug; - -impl Debug<|> for Foo { -} -``` +See [assists.md](./assists.md) for the list of available assists. ### Magic Completions -- cgit v1.2.3