diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-10-06 12:43:08 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-10-06 12:43:08 +0100 |
commit | af0e54a566ab8c8be9b39a628aaa4992f161695c (patch) | |
tree | 6b12b51c50d64cd5412271101692d9e39282988f /editors/code | |
parent | 69512dae26278f06b5ac96a7b6093abb69cdd040 (diff) | |
parent | 86993310143c1347db6308a66c1f31a7a5644f56 (diff) |
Merge #6139
6139: Make find_path_prefixed configurable r=matklad a=Veykril
This makes `find_path_prefixed` more configurable allowing one to choose whether it always returns absolute paths, self-prefixed paths or to ignore local imports when building the path.
The config names are just thrown in here, taking better names if they exist :)
This should fix #6131 as well?
Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'editors/code')
-rw-r--r-- | editors/code/package.json | 17 |
1 files changed, 16 insertions, 1 deletions
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 @@ | |||
652 | "default": "full", | 652 | "default": "full", |
653 | "description": "The strategy to use when inserting new imports or merging imports." | 653 | "description": "The strategy to use when inserting new imports or merging imports." |
654 | }, | 654 | }, |
655 | "rust-analyzer.assist.importPrefix": { | ||
656 | "type": "string", | ||
657 | "enum": [ | ||
658 | "plain", | ||
659 | "by_self", | ||
660 | "by_crate" | ||
661 | ], | ||
662 | "enumDescriptions": [ | ||
663 | "Insert import paths relative to the current module, using up to one `super` prefix if the parent module contains the requested item.", | ||
664 | "Prefix all import paths with `self` if they don't begin with `self`, `super`, `crate` or a crate name", | ||
665 | "Force import paths to be absolute by always starting them with `crate` or the crate name they refer to." | ||
666 | ], | ||
667 | "default": "plain", | ||
668 | "description": "The path structure for newly inserted paths to use." | ||
669 | }, | ||
655 | "rust-analyzer.runnables.overrideCargo": { | 670 | "rust-analyzer.runnables.overrideCargo": { |
656 | "type": [ | 671 | "type": [ |
657 | "null", | 672 | "null", |
@@ -1033,4 +1048,4 @@ | |||
1033 | ] | 1048 | ] |
1034 | } | 1049 | } |
1035 | } | 1050 | } |
1036 | } | 1051 | } \ No newline at end of file |