about summary refs log tree commit diff
path: root/editors/code
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-03-19 19:15:06 +0000
committerGitHub <noreply@github.com>2022-03-19 19:15:06 +0000
commit7315d973478560f6be3ff3d6fceadabc900d9ffa (patch)
tree6c0bf3d51efddc99cd51a3680442f71affb511b0 /editors/code
parent85311a862747e4d4857dd49493e1ef7b45de8be3 (diff)
parent7da5b80f259a777a43ea4e208def4672cb0fb545 (diff)
downloadrust-7315d973478560f6be3ff3d6fceadabc900d9ffa.tar.gz
rust-7315d973478560f6be3ff3d6fceadabc900d9ffa.zip
Merge #11755
11755: feat: Implement lifetime elision hints r=Veykril a=Veykril

With names on:
![Code_erl26zKvuf](https://user-images.githubusercontent.com/3757771/159134856-e2c75d2d-f17c-45c7-9a78-3da5ee8b1acd.png)
With names off:
![Code_MRP1Pbfe9d](https://user-images.githubusercontent.com/3757771/159134857-30fac3a1-825e-4f49-ba9b-9fa0bb215694.png)


Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Diffstat (limited to 'editors/code')
-rw-r--r--editors/code/package.json20
1 files changed, 20 insertions, 0 deletions
diff --git a/editors/code/package.json b/editors/code/package.json
index 56d10f587d2..ffd89d96d4c 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -795,6 +795,26 @@
                     "default": false,
                     "type": "boolean"
                 },
+                "rust-analyzer.inlayHints.lifetimeElisionHints": {
+                    "markdownDescription": "Whether to show inlay type hints for elided lifetimes in function signatures.",
+                    "default": "never",
+                    "type": "string",
+                    "enum": [
+                        "always",
+                        "never",
+                        "skip_trivial"
+                    ],
+                    "enumDescriptions": [
+                        "Always show lifetime elision hints.",
+                        "Never show lifetime elision hints.",
+                        "Only show lifetime elision hints if a return type is involved."
+                    ]
+                },
+                "rust-analyzer.inlayHints.lifetimeElisionHints.useParameterNames": {
+                    "markdownDescription": "Whether to prefer using parameter names as the name for elided lifetime hints if possible.",
+                    "default": false,
+                    "type": "boolean"
+                },
                 "rust-analyzer.inlayHints.hideNamedConstructorHints": {
                     "markdownDescription": "Whether to hide inlay hints for constructors.",
                     "default": false,