From 2a473e5aa6c8869dfef3891e32c77085338e4f46 Mon Sep 17 00:00:00 2001 From: Chayim Refael Friedman Date: Fri, 6 Jun 2025 16:34:53 +0300 Subject: In "Fill match arms", allow users to prefer `Self` to the enum name when possible But default to not to. I chose to have a more generic config name because maybe other assists could also use the same approach. --- src/tools/rust-analyzer/editors/code/package.json | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/tools/rust-analyzer/editors/code') diff --git a/src/tools/rust-analyzer/editors/code/package.json b/src/tools/rust-analyzer/editors/code/package.json index c8c36cd85c8..398d0c51e9a 100644 --- a/src/tools/rust-analyzer/editors/code/package.json +++ b/src/tools/rust-analyzer/editors/code/package.json @@ -680,6 +680,16 @@ } } }, + { + "title": "assist", + "properties": { + "rust-analyzer.assist.preferSelf": { + "markdownDescription": "When inserting a type (e.g. in \"fill match arms\" assist), prefer to use `Self` over the type name where possible.", + "default": false, + "type": "boolean" + } + } + }, { "title": "assist", "properties": { -- cgit 1.4.1-3-g733a5