diff options
| author | Laurențiu Nicola <lnicola@dend.ro> | 2023-06-05 12:04:23 +0300 |
|---|---|---|
| committer | Laurențiu Nicola <lnicola@dend.ro> | 2023-06-05 12:04:23 +0300 |
| commit | b8a7d439db0cfd765ed4bfedd2bbaeeee58b05a5 (patch) | |
| tree | 5adcbc6cf50af3bebc2cd4f42d5252a4d728690e /src/tools/rust-analyzer/editors/code/package.json | |
| parent | 51f714c8c5021fe25442e46798b1cbef2f2249ed (diff) | |
| parent | aa9bc8612514d216f84eec218dfd19ab83f3598a (diff) | |
| download | rust-b8a7d439db0cfd765ed4bfedd2bbaeeee58b05a5.tar.gz rust-b8a7d439db0cfd765ed4bfedd2bbaeeee58b05a5.zip | |
Merge commit 'aa9bc8612514d216f84eec218dfd19ab83f3598a' into sync-from-ra
Diffstat (limited to 'src/tools/rust-analyzer/editors/code/package.json')
| -rw-r--r-- | src/tools/rust-analyzer/editors/code/package.json | 208 |
1 files changed, 198 insertions, 10 deletions
diff --git a/src/tools/rust-analyzer/editors/code/package.json b/src/tools/rust-analyzer/editors/code/package.json index c5eb08748bf..ee1f832d323 100644 --- a/src/tools/rust-analyzer/editors/code/package.json +++ b/src/tools/rust-analyzer/editors/code/package.json @@ -44,7 +44,8 @@ "anser": "^2.1.1", "d3": "^7.6.1", "d3-graphviz": "^5.0.2", - "vscode-languageclient": "^8.0.2" + "vscode-languageclient": "^8.0.2", + "@hpcc-js/wasm": "2.5.0" }, "devDependencies": { "@types/node": "~16.11.7", @@ -120,6 +121,11 @@ "category": "rust-analyzer (debug command)" }, { + "command": "rust-analyzer.interpretFunction", + "title": "Interpret Function", + "category": "rust-analyzer (debug command)" + }, + { "command": "rust-analyzer.viewFileText", "title": "View File Text (as seen by the server)", "category": "rust-analyzer (debug command)" @@ -200,12 +206,17 @@ "category": "rust-analyzer" }, { + "command": "rust-analyzer.rebuildProcMacros", + "title": "Rebuild proc macros and build scripts", + "category": "rust-analyzer" + }, + { "command": "rust-analyzer.addProject", "title": "Add current file's crate to workspace", "category": "rust-analyzer" }, { - "command": "rust-analyzer.reload", + "command": "rust-analyzer.restartServer", "title": "Restart server", "category": "rust-analyzer" }, @@ -273,6 +284,11 @@ "command": "rust-analyzer.clearFlycheck", "title": "Clear flycheck diagnostics", "category": "rust-analyzer" + }, + { + "command": "rust-analyzer.revealDependency", + "title": "Reveal File", + "category": "rust-analyzer" } ], "keybindings": [ @@ -444,6 +460,16 @@ "type": "string" } }, + "rust-analyzer.showUnlinkedFileNotification": { + "markdownDescription": "Whether to show a notification for unlinked files asking the user to add the corresponding Cargo.toml to the linked projects setting.", + "default": true, + "type": "boolean" + }, + "rust-analyzer.showDependenciesExplorer": { + "markdownDescription": "Whether to show the dependencies view.", + "default": true, + "type": "boolean" + }, "$generated-start": {}, "rust-analyzer.assist.emitMustUse": { "markdownDescription": "Whether to insert #[must_use] when generating `as_` methods\nfor enum variants.", @@ -527,6 +553,11 @@ "default": true, "type": "boolean" }, + "rust-analyzer.cargo.cfgs": { + "markdownDescription": "List of cfg options to enable with the given values.", + "default": {}, + "type": "object" + }, "rust-analyzer.cargo.extraArgs": { "markdownDescription": "Extra arguments that are passed to every cargo invocation.", "default": [], @@ -591,7 +622,7 @@ ] }, "rust-analyzer.cargo.unsetTest": { - "markdownDescription": "Unsets `#[cfg(test)]` for the specified crates.", + "markdownDescription": "Unsets the implicit `#[cfg(test)]` for the specified crates.", "default": [ "core" ], @@ -870,6 +901,11 @@ "default": true, "type": "boolean" }, + "rust-analyzer.highlightRelated.closureCaptures.enable": { + "markdownDescription": "Enables highlighting of all captures of a closure while the cursor is on the `|` or move keyword of a closure.", + "default": true, + "type": "boolean" + }, "rust-analyzer.highlightRelated.exitPoints.enable": { "markdownDescription": "Enables highlighting of all exit points while the cursor is on any `return`, `?`, `fn`, or return type arrow (`->`).", "default": true, @@ -926,10 +962,89 @@ "type": "boolean" }, "rust-analyzer.hover.links.enable": { - "markdownDescription": "Use markdown syntax for links in hover.", + "markdownDescription": "Use markdown syntax for links on hover.", + "default": true, + "type": "boolean" + }, + "rust-analyzer.hover.memoryLayout.alignment": { + "markdownDescription": "How to render the align information in a memory layout hover.", + "default": "hexadecimal", + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "enum": [ + "both", + "decimal", + "hexadecimal" + ], + "enumDescriptions": [ + "Render as 12 (0xC)", + "Render as 12", + "Render as 0xC" + ] + } + ] + }, + "rust-analyzer.hover.memoryLayout.enable": { + "markdownDescription": "Whether to show memory layout data on hover.", "default": true, "type": "boolean" }, + "rust-analyzer.hover.memoryLayout.niches": { + "markdownDescription": "How to render the niche information in a memory layout hover.", + "default": false, + "type": [ + "null", + "boolean" + ] + }, + "rust-analyzer.hover.memoryLayout.offset": { + "markdownDescription": "How to render the offset information in a memory layout hover.", + "default": "hexadecimal", + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "enum": [ + "both", + "decimal", + "hexadecimal" + ], + "enumDescriptions": [ + "Render as 12 (0xC)", + "Render as 12", + "Render as 0xC" + ] + } + ] + }, + "rust-analyzer.hover.memoryLayout.size": { + "markdownDescription": "How to render the size information in a memory layout hover.", + "default": "both", + "anyOf": [ + { + "type": "null" + }, + { + "type": "string", + "enum": [ + "both", + "decimal", + "hexadecimal" + ], + "enumDescriptions": [ + "Render as 12 (0xC)", + "Render as 12", + "Render as 0xC" + ] + } + ] + }, "rust-analyzer.imports.granularity.enforce": { "markdownDescription": "Whether to enforce the import granularity setting for all files. If set to false rust-analyzer will try to keep import styles consistent per file.", "default": false, @@ -1003,6 +1118,11 @@ "type": "integer", "minimum": 0 }, + "rust-analyzer.inlayHints.closureCaptureHints.enable": { + "markdownDescription": "Whether to show inlay hints for closure captures.", + "default": false, + "type": "boolean" + }, "rust-analyzer.inlayHints.closureReturnTypeHints.enable": { "markdownDescription": "Whether to show inlay type hints for return types of closures.", "default": "never", @@ -1018,6 +1138,23 @@ "Only show type hints for return types of closures with blocks." ] }, + "rust-analyzer.inlayHints.closureStyle": { + "markdownDescription": "Closure notation in type and chaining inlay hints.", + "default": "impl_fn", + "type": "string", + "enum": [ + "impl_fn", + "rust_analyzer", + "with_id", + "hide" + ], + "enumDescriptions": [ + "`impl_fn`: `impl FnMut(i32, u64) -> i8`", + "`rust_analyzer`: `|i32, u64| -> i8`", + "`with_id`: `{closure#14352}`, where that id is the unique number of the closure in r-a internals", + "`hide`: Shows `...` for every closure type" + ] + }, "rust-analyzer.inlayHints.discriminantHints.enable": { "markdownDescription": "Whether to show enum variant discriminant hints.", "default": "never", @@ -1066,8 +1203,8 @@ "enumDescriptions": [ "Always show adjustment hints as prefix (`*expr`).", "Always show adjustment hints as postfix (`expr.*`).", - "Show prefix or postfix depending on which uses less parenthesis, prefering prefix.", - "Show prefix or postfix depending on which uses less parenthesis, prefering postfix." + "Show prefix or postfix depending on which uses less parenthesis, preferring prefix.", + "Show prefix or postfix depending on which uses less parenthesis, preferring postfix." ] }, "rust-analyzer.inlayHints.lifetimeElisionHints.enable": { @@ -1242,6 +1379,11 @@ ], "minimum": 0 }, + "rust-analyzer.lru.query.capacities": { + "markdownDescription": "Sets the LRU capacity of the specified queries.", + "default": {}, + "type": "object" + }, "rust-analyzer.notifications.cargoTomlNotFound": { "markdownDescription": "Whether to show `can't find Cargo.toml` error message.", "default": true, @@ -1272,7 +1414,7 @@ "type": "object" }, "rust-analyzer.procMacro.server": { - "markdownDescription": "Internal config, path to proc-macro server executable (typically,\nthis is rust-analyzer itself, but we override this in tests).", + "markdownDescription": "Internal config, path to proc-macro server executable.", "default": null, "type": [ "null", @@ -1337,6 +1479,11 @@ "default": true, "type": "boolean" }, + "rust-analyzer.semanticHighlighting.nonStandardTokens": { + "markdownDescription": "Whether the server is allowed to emit non-standard tokens and modifiers.", + "default": true, + "type": "boolean" + }, "rust-analyzer.semanticHighlighting.operator.enable": { "markdownDescription": "Use semantic tokens for operators.\n\nWhen disabled, rust-analyzer will emit semantic tokens only for operator tokens when\nthey are tagged with modifiers.", "default": true, @@ -1348,7 +1495,7 @@ "type": "boolean" }, "rust-analyzer.semanticHighlighting.punctuation.enable": { - "markdownDescription": "Use semantic tokens for punctuations.\n\nWhen disabled, rust-analyzer will emit semantic tokens only for punctuation tokens when\nthey are tagged with modifiers or have a special role.", + "markdownDescription": "Use semantic tokens for punctuation.\n\nWhen disabled, rust-analyzer will emit semantic tokens only for punctuation tokens when\nthey are tagged with modifiers or have a special role.", "default": false, "type": "boolean" }, @@ -1358,7 +1505,7 @@ "type": "boolean" }, "rust-analyzer.semanticHighlighting.punctuation.specialization.enable": { - "markdownDescription": "Use specialized semantic tokens for punctuations.\n\nWhen enabled, rust-analyzer will emit special token types for punctuation tokens instead\nof the generic `punctuation` token type.", + "markdownDescription": "Use specialized semantic tokens for punctuation.\n\nWhen enabled, rust-analyzer will emit special token types for punctuation tokens instead\nof the generic `punctuation` token type.", "default": false, "type": "boolean" }, @@ -1461,6 +1608,18 @@ "endColumn": 6 } ] + }, + { + "name": "rust-panic", + "patterns": [ + { + "regexp": "^thread '.*' panicked at '(.*)', (.*):(\\d*):(\\d*)$", + "message": 1, + "file": 2, + "line": 3, + "column": 4 + } + ] } ], "languages": [ @@ -1487,6 +1646,16 @@ "language": "ra_syntax_tree", "scopeName": "source.ra_syntax_tree", "path": "ra_syntax_tree.tmGrammar.json" + }, + { + "scopeName": "rustdoc.markdown.injection", + "path": "rustdoc.markdown.injection.tmGrammar.json", + "injectTo": [ + "source.rust" + ], + "embeddedLanguages": { + "meta.embedded.block.markdown": "text.html.markdown" + } } ], "problemMatchers": [ @@ -1511,6 +1680,16 @@ "pattern": "$rustc-json" }, { + "name": "rust-panic", + "owner": "rust-panic", + "source": "panic", + "fileLocation": [ + "autoDetect", + "${workspaceRoot}" + ], + "pattern": "$rust-panic" + }, + { "name": "rustc-watch", "owner": "rustc", "source": "rustc", @@ -1876,7 +2055,7 @@ "when": "inRustProject" }, { - "command": "rust-analyzer.reload", + "command": "rust-analyzer.restartServer", "when": "inRustProject" }, { @@ -1913,6 +2092,15 @@ } ] }, + "views": { + "explorer": [ + { + "id": "rustDependencies", + "name": "Rust Dependencies", + "when": "inRustProject && config.rust-analyzer.showDependenciesExplorer" + } + ] + }, "jsonValidation": [ { "fileMatch": "rust-project.json", |
