Open Jell opened 10 years ago
This is implemented in sp-show--pair-function
. It also has more problems like highlightning also the skipped matches, it needs to be fixed in similar way sp-get-thing
was (using the sp--valid-initial-delimiter-p
macro).
If anyone wants to give it a shot, please. If not, I'll try to fix it sometime this or next week (I'm leaving for 4 days now).
FWIW, show-paren-mode
in recent Emacsen handles almost all those cases (except begin|
and |end
) in ruby-mode.
However, I can confirm this still occurs on current smartparens.
It would also be an option to split the show functionality into a separate package or just deprecate it in favour of the built-in thing, provided it could handle user-registered pairs.
It would be great to highlight the matching delimiters when the cursor is in the tag, not only before or after.
All of the following should be highlighted:
I haven't look at the code, but I suppose that it's implemented with
(or (looking-at-p "...") (looking-back-at "..."))
, and could maybe be replaced by a(thing-at-point-looking-at "...")