Ability to highlight a pair's content #910
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
paren
gives you an overlay that matches pairs and their content if you set its matching style toexpression
.smartparens
doesn't support this matching style therefore there is no way to highlight the content of a pair.In this PR I'm proposing a new customizable face
sp-show-pair-match-content-face
that will operate solely on the contents of a pair.This has an advantage over the
paren
implementation asparen
is too rigid in that it doesn't allow you to highlight pairs and their contents independently.Here's a look at a possible configuration
![kapture 2018-07-19 at 10 08 16](https://user-images.githubusercontent.com/644589/42933068-ca290358-8b3b-11e8-97f8-1edc37396304.gif)
And a working scenario (should have used a more visible colour for this example :D)
![kapture 2018-07-19 at 10 33 48](https://user-images.githubusercontent.com/644589/42934532-5e71e4fa-8b3f-11e8-992c-62a45fbc2eaf.gif)