Skip to content

Commit ca1fdd7

Browse files
committed
Regen docs
1 parent 1f7e14e commit ca1fdd7

File tree

4 files changed

+30
-11
lines changed

4 files changed

+30
-11
lines changed

crates/ide_completion/src/snippet.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
//! User (postfix)-snippet definitions.
2+
//!
3+
//! Actual logic is implemented in [`crate::completions::postfix`] and [`crate::completions::snippet`].
14
use ide_db::helpers::{import_assets::LocatedImport, insert_use::ImportScope};
25
use itertools::Itertools;
36
use syntax::ast;

crates/rust-analyzer/src/config.rs

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,9 @@ config_data! {
282282
rustfmt_enableRangeFormatting: bool = "false",
283283

284284
/// Workspace symbol search scope.
285-
workspace_symbol_search_scope: WorskpaceSymbolSearchScopeDef = "\"workspace\"",
285+
workspace_symbol_search_scope: WorkspaceSymbolSearchScopeDef = "\"workspace\"",
286286
/// Workspace symbol search kind.
287-
workspace_symbol_search_kind: WorskpaceSymbolSearchKindDef = "\"only_types\"",
287+
workspace_symbol_search_kind: WorkspaceSymbolSearchKindDef = "\"only_types\"",
288288
}
289289
}
290290

@@ -893,14 +893,14 @@ impl Config {
893893
pub fn workspace_symbol(&self) -> WorkspaceSymbolConfig {
894894
WorkspaceSymbolConfig {
895895
search_scope: match self.data.workspace_symbol_search_scope {
896-
WorskpaceSymbolSearchScopeDef::Workspace => WorkspaceSymbolSearchScope::Workspace,
897-
WorskpaceSymbolSearchScopeDef::WorkspaceAndDependencies => {
896+
WorkspaceSymbolSearchScopeDef::Workspace => WorkspaceSymbolSearchScope::Workspace,
897+
WorkspaceSymbolSearchScopeDef::WorkspaceAndDependencies => {
898898
WorkspaceSymbolSearchScope::WorkspaceAndDependencies
899899
}
900900
},
901901
search_kind: match self.data.workspace_symbol_search_kind {
902-
WorskpaceSymbolSearchKindDef::OnlyTypes => WorkspaceSymbolSearchKind::OnlyTypes,
903-
WorskpaceSymbolSearchKindDef::AllSymbols => WorkspaceSymbolSearchKind::AllSymbols,
902+
WorkspaceSymbolSearchKindDef::OnlyTypes => WorkspaceSymbolSearchKind::OnlyTypes,
903+
WorkspaceSymbolSearchKindDef::AllSymbols => WorkspaceSymbolSearchKind::AllSymbols,
904904
},
905905
}
906906
}
@@ -1065,14 +1065,14 @@ enum ImportPrefixDef {
10651065

10661066
#[derive(Deserialize, Debug, Clone)]
10671067
#[serde(rename_all = "snake_case")]
1068-
enum WorskpaceSymbolSearchScopeDef {
1068+
enum WorkspaceSymbolSearchScopeDef {
10691069
Workspace,
10701070
WorkspaceAndDependencies,
10711071
}
10721072

10731073
#[derive(Deserialize, Debug, Clone)]
10741074
#[serde(rename_all = "snake_case")]
1075-
enum WorskpaceSymbolSearchKindDef {
1075+
enum WorkspaceSymbolSearchKindDef {
10761076
OnlyTypes,
10771077
AllSymbols,
10781078
}
@@ -1203,6 +1203,12 @@ fn field_props(field: &str, ty: &str, doc: &[&str], default: &str) -> serde_json
12031203
"items": { "type": "string" },
12041204
"uniqueItems": true,
12051205
},
1206+
"FxHashMap<String, PostfixSnippetDef>" => set! {
1207+
"type": "object",
1208+
},
1209+
"FxHashMap<String, SnippetDef>" => set! {
1210+
"type": "object",
1211+
},
12061212
"FxHashMap<String, String>" => set! {
12071213
"type": "object",
12081214
},
@@ -1259,15 +1265,15 @@ fn field_props(field: &str, ty: &str, doc: &[&str], default: &str) -> serde_json
12591265
"type": "array",
12601266
"items": { "type": ["string", "object"] },
12611267
},
1262-
"WorskpaceSymbolSearchScopeDef" => set! {
1268+
"WorkspaceSymbolSearchScopeDef" => set! {
12631269
"type": "string",
12641270
"enum": ["workspace", "workspace_and_dependencies"],
12651271
"enumDescriptions": [
12661272
"Search in current workspace only",
12671273
"Search in current workspace and dependencies"
12681274
],
12691275
},
1270-
"WorskpaceSymbolSearchKindDef" => set! {
1276+
"WorkspaceSymbolSearchKindDef" => set! {
12711277
"type": "string",
12721278
"enum": ["only_types", "all_symbols"],
12731279
"enumDescriptions": [

docs/dev/lsp-extensions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!---
2-
lsp_ext.rs hash: ad52054176909945
2+
lsp_ext.rs hash: c6568e4035333f3a
33
44
If you need to change the above hash to make the test pass, please check if you
55
need to adjust this doc as well and ping this issue:

editors/code/package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,11 +585,21 @@
585585
"default": true,
586586
"type": "boolean"
587587
},
588+
"rust-analyzer.completion.snippets": {
589+
"markdownDescription": "Custom completion snippets.",
590+
"default": {},
591+
"type": "object"
592+
},
588593
"rust-analyzer.completion.postfix.enable": {
589594
"markdownDescription": "Whether to show postfix snippets like `dbg`, `if`, `not`, etc.",
590595
"default": true,
591596
"type": "boolean"
592597
},
598+
"rust-analyzer.completion.postfix.snippets": {
599+
"markdownDescription": "Custom postfix completion snippets.",
600+
"default": {},
601+
"type": "object"
602+
},
593603
"rust-analyzer.completion.autoimport.enable": {
594604
"markdownDescription": "Toggles the additional completions that automatically add imports when completed.\nNote that your client must specify the `additionalTextEdits` LSP client capability to truly have this feature enabled.",
595605
"default": true,

0 commit comments

Comments
 (0)