diff options
| author | bors <bors@rust-lang.org> | 2022-09-13 15:09:53 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-09-13 15:09:53 +0000 |
| commit | dbb8fedf8b887adfde3b445f9ec4bdf11da9ae9f (patch) | |
| tree | f8d369c61f18e5f5d6170fa8e39106f4c5ce3fb5 /editors/code | |
| parent | ba15f75c39acf488d1fc4cc11cfc1cbb3dda0f7a (diff) | |
| parent | f57c15f3e9843ad6b220d5f75f3e0b2cb126098a (diff) | |
| download | rust-dbb8fedf8b887adfde3b445f9ec4bdf11da9ae9f.tar.gz rust-dbb8fedf8b887adfde3b445f9ec4bdf11da9ae9f.zip | |
Auto merge of #13221 - mdx97:mdx97/annotations-above-whole-item, r=Veykril
Allow configuration of annotation location. I've added the ability to configure where lens annotations render relevant to the item they describe. Previously, these would render directly above the line the item is declared on. Now, there is the ability to render these annotations above the entire item (including doc comments, and attributes). The names of the config options are up for debate, I did what seemed best to me but if anyone has better ideas let me know. This is my first contribution so if I've missed anything please let me know. Here's a preview of what the new option looks like: <img width="577" alt="Screen Shot 2022-09-11 at 10 39 51 PM" src="https://user-images.githubusercontent.com/33100798/189570298-b4fcbf9c-ee49-4b79-aae6-1037ae4f26af.png"> closes https://github.com/rust-lang/rust-analyzer/issues/13218
Diffstat (limited to 'editors/code')
| -rw-r--r-- | editors/code/package.json | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/editors/code/package.json b/editors/code/package.json index 6aa74ce92af..e2cc2c16c92 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -963,6 +963,19 @@ "default": true, "type": "boolean" }, + "rust-analyzer.lens.location": { + "markdownDescription": "Where to render annotations.", + "default": "above_name", + "type": "string", + "enum": [ + "above_name", + "above_whole_item" + ], + "enumDescriptions": [ + "Render annotations above the name of the item.", + "Render annotations above the whole item, including documentation comments and attributes." + ] + }, "rust-analyzer.lens.references.adt.enable": { "markdownDescription": "Whether to show `References` lens for Struct, Enum, and Union.\nOnly applies when `#rust-analyzer.lens.enable#` is set.", "default": false, |
