aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel S Poulin2021-11-08 00:57:26 +0000
committerGitHub2021-11-08 00:57:26 +0000
commit1e793c2bbfb4e6d3226f4ba97d99a70934b5cf5c (patch)
tree497a9bff690c06dee913a3fdf46f3ea798a8fab5
parenta252ecd8c85af5cc16638a4752011e2e920fa652 (diff)
Adds single and double quotes to matching pairs (#995)
This enables `mm` to work on quote characters as well as highlighting of matching quote when on it.
-rw-r--r--helix-core/src/match_brackets.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/helix-core/src/match_brackets.rs b/helix-core/src/match_brackets.rs
index a4b2fb9c..136ce320 100644
--- a/helix-core/src/match_brackets.rs
+++ b/helix-core/src/match_brackets.rs
@@ -1,6 +1,13 @@
use crate::{Rope, Syntax};
-const PAIRS: &[(char, char)] = &[('(', ')'), ('{', '}'), ('[', ']'), ('<', '>')];
+const PAIRS: &[(char, char)] = &[
+ ('(', ')'),
+ ('{', '}'),
+ ('[', ']'),
+ ('<', '>'),
+ ('\'', '\''),
+ ('"', '"'),
+];
// limit matching pairs to only ( ) { } [ ] < >
#[must_use]