aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/matching_brace.rs
diff options
context:
space:
mode:
authorAyomide Bamidele <[email protected]>2021-03-31 00:08:10 +0100
committerAyomide Bamidele <[email protected]>2021-03-31 00:08:10 +0100
commit276022682b0b4745d44027a2f6c47f5e07cecbc3 (patch)
treeff0e4cde988fc722cc4792bbd61471e0458a06ff /crates/ide/src/matching_brace.rs
parent95107a7ccfcb27510884e2c4eaeba369854b4787 (diff)
Gifs and screenshots for features in manual
Diffstat (limited to 'crates/ide/src/matching_brace.rs')
-rw-r--r--crates/ide/src/matching_brace.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/ide/src/matching_brace.rs b/crates/ide/src/matching_brace.rs
index 4241a6dac..261dcc255 100644
--- a/crates/ide/src/matching_brace.rs
+++ b/crates/ide/src/matching_brace.rs
@@ -14,6 +14,8 @@ use syntax::{
14// 14//
15// | VS Code | **Rust Analyzer: Find matching brace** 15// | VS Code | **Rust Analyzer: Find matching brace**
16// |=== 16// |===
17//
18// image::https://user-images.githubusercontent.com/48062697/113065573-04298180-91b1-11eb-8dec-d4e2a202f304.gif[]
17pub(crate) fn matching_brace(file: &SourceFile, offset: TextSize) -> Option<TextSize> { 19pub(crate) fn matching_brace(file: &SourceFile, offset: TextSize) -> Option<TextSize> {
18 const BRACES: &[SyntaxKind] = 20 const BRACES: &[SyntaxKind] =
19 &[T!['{'], T!['}'], T!['['], T![']'], T!['('], T![')'], T![<], T![>], T![|], T![|]]; 21 &[T!['{'], T!['}'], T!['['], T![']'], T!['('], T![')'], T![<], T![>], T![|], T![|]];