diff options
| author | bors <bors@rust-lang.org> | 2024-02-19 06:59:32 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-02-19 06:59:32 +0000 |
| commit | 010f029c905ffeb01ad88288b2cf50efe65b23ae (patch) | |
| tree | cf3e5436c033a6b38daa21eb498b7f53d417936c /src/tools/rust-analyzer/editors/code/rustdoc-inject.json | |
| parent | 90fccaad801a929fc482dbbeca0231aa197de7c7 (diff) | |
| parent | e118c3e8af2ee5c0d20d21e8bf08c1a254a317fb (diff) | |
Auto merge of #3306 - rust-lang:rustup-2024-02-19, r=RalfJung
Automatic Rustup
Diffstat (limited to 'src/tools/rust-analyzer/editors/code/rustdoc-inject.json')
| -rw-r--r-- | src/tools/rust-analyzer/editors/code/rustdoc-inject.json | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/src/tools/rust-analyzer/editors/code/rustdoc-inject.json b/src/tools/rust-analyzer/editors/code/rustdoc-inject.json new file mode 100644 index 00000000000..7a4498fea9d --- /dev/null +++ b/src/tools/rust-analyzer/editors/code/rustdoc-inject.json @@ -0,0 +1,93 @@ +{ + "injectionSelector": "L:source.rust -string -comment -meta.embedded.block.rustdoc.md", + "patterns": [ + { + "include": "#triple-slash" + }, + { + "include": "#double-slash-exclamation" + }, + { + "include": "#slash-start-exclamation" + }, + { + "include": "#slash-double-start" + } + ], + "repository": { + "triple-slash": { + "begin": "(^|\\G)\\s*(///) ?", + "captures": { + "2": { + "name": "comment.line.double-slash.rust" + } + }, + "name": "comment.quote_code.triple-slash.rust", + "contentName": "meta.embedded.block.rustdoc", + "patterns": [ + { + "include": "text.html.markdown.rustdoc" + } + ], + "while": "(^|\\G)\\s*(///) ?" + }, + "double-slash-exclamation": { + "begin": "(^|\\G)\\s*(//!) ?", + "captures": { + "2": { + "name": "comment.line.double-slash.rust" + } + }, + "name": "comment.quote_code.double-slash-exclamation.rust", + "contentName": "meta.embedded.block.rustdoc", + "patterns": [ + { + "include": "text.html.markdown.rustdoc" + } + ], + "while": "(^|\\G)\\s*(//!) ?" + }, + "slash-start-exclamation": { + "begin": "(^)(/\\*!) ?$", + "captures": { + "2": { + "name": "comment.block.rust" + } + }, + "name": "comment.quote_code.slash-start-exclamation.rust", + "contentName": "meta.embedded.block.rustdoc", + "patterns": [ + { + "include": "text.html.markdown.rustdoc" + } + ], + "end": "( ?)(\\*/)" + }, + "slash-double-start": { + "name": "comment.quote_code.slash-double-start-quote-star.rust", + "begin": "(?:^)\\s*/\\*\\* ?$", + "end": "\\*/", + "patterns": [ + { + "include": "#quote-star" + } + ] + }, + "quote-star": { + "begin": "(^|\\G)\\s*(\\*(?!/)) ?", + "captures": { + "2": { + "name": "comment.punctuation.definition.quote_code.slash-star.MR" + } + }, + "contentName": "meta.embedded.block.rustdoc", + "patterns": [ + { + "include": "text.html.markdown.rustdoc" + } + ], + "while": "(^|\\G)\\s*(\\*(?!/)) ?" + } + }, + "scopeName": "comment.markdown-cell-inject.rustdoc" +} |
