From 86993310143c1347db6308a66c1f31a7a5644f56 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 5 Oct 2020 17:41:49 +0200 Subject: Make ImportPrefix a configuration option --- editors/code/package.json | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'editors/code') diff --git a/editors/code/package.json b/editors/code/package.json index cc2ac3bd2..1f0e7550b 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -652,6 +652,21 @@ "default": "full", "description": "The strategy to use when inserting new imports or merging imports." }, + "rust-analyzer.assist.importPrefix": { + "type": "string", + "enum": [ + "plain", + "by_self", + "by_crate" + ], + "enumDescriptions": [ + "Insert import paths relative to the current module, using up to one `super` prefix if the parent module contains the requested item.", + "Prefix all import paths with `self` if they don't begin with `self`, `super`, `crate` or a crate name", + "Force import paths to be absolute by always starting them with `crate` or the crate name they refer to." + ], + "default": "plain", + "description": "The path structure for newly inserted paths to use." + }, "rust-analyzer.runnables.overrideCargo": { "type": [ "null", @@ -1033,4 +1048,4 @@ ] } } -} +} \ No newline at end of file -- cgit v1.2.3