Closed TLINDEN closed 1 year ago
This should be default in lisp modes. It's configured via sp-navigate-reindent-after-up
. This makes sp-up-sexp
also reindent the closing paren if necessary.
To make )
act as sp-up-sexp
, you can use the strict mode (smartparens-strict-mode
) which adds some other features though, or you can remap )
to sp-up-sexp
. This is not that crazy because you should rarely need to insert the closing pair manually, and if necessary, C-q )
can insert it literally.
Mapping )
to sp-up-sexp
works like a charm! Thanks a lot for the help!
This is just a question if smartparens supports this feature or a feature request if it doesn't:
I am currently still using
electric-pair-mode
just because of this feature. Given the following code (|
denoting point):When I now enter
)
inelectric-pair-mode
it doesn't insert a paren but instead pulls the already existing paren up to where it should be instead of inserting an additional paren:This doesn't work when I disable
electric-pair-mode
. In fact, an additional paren will be inserted which results in unbalanced parens.Would be great if this could be achieved with smartparens.
Environment & version information
smartparens
version: 20230225.1026major-mode
:autoscratch-mode
M-x emacs-version
): GNU Emacs 28.2 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) of 2023-04-26