Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-completion/src/snippet.rs')
-rw-r--r--crates/ide-completion/src/snippet.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/ide-completion/src/snippet.rs b/crates/ide-completion/src/snippet.rs
index 866b83a614..07f33a826e 100644
--- a/crates/ide-completion/src/snippet.rs
+++ b/crates/ide-completion/src/snippet.rs
@@ -8,8 +8,7 @@
//
// A custom snippet can be defined by adding it to the `rust-analyzer.completion.snippets.custom` object respectively.
//
-// [source,json]
-// ----
+// ```json
// {
// "rust-analyzer.completion.snippets.custom": {
// "thread spawn": {
@@ -25,7 +24,7 @@
// }
// }
// }
-// ----
+// ```
//
// In the example above:
//
@@ -39,6 +38,7 @@
// * `description` is an optional description of the snippet, if unset the snippet name will be used.
//
// * `requires` is an optional list of item paths that have to be resolvable in the current crate where the completion is rendered.
+
// On failure of resolution the snippet won't be applicable, otherwise the snippet will insert an import for the items on insertion if
// the items aren't yet in scope.
//
@@ -55,8 +55,8 @@
//
// For the VSCode editor, rust-analyzer also ships with a small set of defaults which can be removed
// by overwriting the settings object mentioned above, the defaults are:
-// [source,json]
-// ----
+//
+// ```json
// {
// "Arc::new": {
// "postfix": "arc",
@@ -98,7 +98,7 @@
// "scope": "expr"
// }
// }
-// ----
+// ````
use hir::{ModPath, Name, Symbol};
use ide_db::imports::import_assets::LocatedImport;