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.
This commit is contained in:
Daniel S Poulin 2021-11-07 19:57:26 -05:00 committed by GitHub
parent a252ecd8c8
commit 1e793c2bbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,13 @@
use crate::{Rope, Syntax};
const PAIRS: &[(char, char)] = &[('(', ')'), ('{', '}'), ('[', ']'), ('<', '>')];
const PAIRS: &[(char, char)] = &[
('(', ')'),
('{', '}'),
('[', ']'),
('<', '>'),
('\'', '\''),
('"', '"'),
];
// limit matching pairs to only ( ) { } [ ] < >
#[must_use]