From 1e793c2bbfb4e6d3226f4ba97d99a70934b5cf5c Mon Sep 17 00:00:00 2001 From: Daniel S Poulin Date: Sun, 7 Nov 2021 19:57:26 -0500 Subject: [PATCH] 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. --- helix-core/src/match_brackets.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/helix-core/src/match_brackets.rs b/helix-core/src/match_brackets.rs index a4b2fb9c8..136ce320d 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]