Smartparens turns 5 years old today and to celebrate we've prepared a new release packed with new features and bug fixes!
You can read more on my blog.
As usual, big thanks to all the contributors who helped on this release!
Changes since 1.10.1
Bug fixes
- When deleting over a delimiter, do not jump to previous sexp in strict-mode if the character before point is a potential unclosed delimiter (#744, #584, #709)
- When
smartparens-mode
is disabled do not mess withdelete-selection-mode
handling (#767) - Automatic pair deletion only operates on valid pairs (#731)
- Properly clean up closing delimiters when re-inserting pairs sharing a prefix (e.g. ``'
and ```''
in LaTeX)
markdown-mode
- Fix
gfm-mode
block insertion (#371)
evil-mode integration
- Better pair highlighting when the point is inside the sexp (= on the delimiter) (#758)
ESS
- Fix apostrophe behaviour in ESS comments (#769)
js-mode
- Fix autoloading of
js-mode
config (#701)
rust-mode
- Do not parse > where it is not a valid delimiter (#793)
elixir-mode
- Do not insert
end
keyword that would spill out of current context (i.e. out of the comment if point is in comment)
ruby-mode
- Fix ruby slurp/barf problems related to change of
:
to prefix class
Features
- Commands executed with
sp-prefix-save-excursion
preserve indentation. - Inhibit pair insertion in
overwrite-mode
(#549) - Allow inserting closing delimiters for non-autoskip pairs (#712)
- Do not drag suffix along with transposed sexps. This preserves
,
in argument lists or;
between statements. - Parsing of strings inside generic string fences is now much faster (#752)
- Add support for defining custom pair configrations (#33, #107, #347)
- Add
sp-backward-delete-symbol
(-word
) which do not put the removed content tokill-ring
(#759) - Add support for
hungry-delete-mode
(#764, #765) - Move point to end of symbol for
sp-convolute-sexp
- Remove extra whitespace when calling
sp-convolute-sexp
- New option
sp-navigate-interactive-always-progress-point
to
improve behaviour ofsp-next-sexp
andsp-previous-sexp
(always
move in the direction of navigation). - Update closing delimiter if opening delimiter is extended via insertion (#741)
- When
sp-autodelete-wrap
is on unwrap the last region in strict mode as well (#678) - Support insertion of emoticons (such as
:)
) in text modes in strict mode (#713) - Show offscreen paired delimiters with
show-smartparens-mode
(#346, #788) - When jumping out of sexp automatically using
sp-skip-closing-pair
(e.g. typing closing delimiter in strict mode) re-align the sexps and clean the whitespace (#778) - Add
sp-change-inner
(#115)
python-mode
- Rewrapping tripple quotes (
"""
to'''
) now works after selecting the single quote for rewrapping (#320)
ML family (tuareg-mode, reason-mode, fsharp-mode)
- Add comment pairs handling (#753)
typescript-mode
- Use javascript settings for
typescript-mode
(#748)
scala-mode
- Add support for
scala-mode
(#673)
haskell-mode
- Add the
{--}
pair - Add setup for
'
pair to better treat it when it is used as function/symbol suffix (#710) - Add LiquidHaskell pragma (#802)
js2-mode
- Better reindent behaviour on
js2-mode
(#696)
text-mode
- Autoload configuration for text modes
elixir-mode
- Better slurping and barfing (#777)
rust-mode
- Allow typing match branches (=>) in strict mode (#789)
markdown-mode
org-mdoe
- Add
org-mode
setup
API
Bug fixes
- The regexp returned by
sp--get-stringlike-regexp
should never match anything if there are no string delimiters (previously returned a regexp which would always match anywhere) sp--strict-regexp-quote
returns unmatchable regexp on nilsp-get-thing
skips closing delimiter with skip function (#774)- Use syntax-class instead of char-syntax to check if we are at string. This accounts for dynamically computed syntax via
syntax-table
text property - When picking first string-like delimiter for parsing always pick a valid one
- Properly skip over regexp-based prefixes (#699, #813)
Features
sp-region-ok-p
now works with all smartparens pairs not just syntax-table (#775, #805)- Add
turn-off-smartparens-strict-mode
(#790) - Return match data from
sp--find-next-stringlike-delimiter
- Use the
p
syntax flag to recognize prefixes (#812) - Strings can now have prefixes (#811)
Misc
- Supply limits to
looking-back
to speed up unsuccessful parsing attempts (#755) - Improve performance of
delete-selection-pre-hook
when no region is active (#794) - Remove obsolete variable
sp-navigate-consider-stringlike-sexp
- Add
sp-describe-system
to generate information when submitting issues to github - Properly integrate strict mode and delete-selection-mode (#726, #738)