smartparens
smartparens copied to clipboard
smartparens breaks rust-analyzer's automatic wrapping
This doesn't happen with electric pair
Expected behavior
rust-analyzer's automatic wrapping works. Screencast with smartparens off (move the cursor to the left of 1 and press {:
https://user-images.githubusercontent.com/36493671/230092833-9a7f295f-8a7c-4407-a0b6-78c6e0fe685f.mp4
Actual behavior
rust-analyzer's automatic wrapping doesn't work. Screencast with smartparens on:
https://user-images.githubusercontent.com/36493671/230093056-2e29f400-ceca-4441-9bbc-bebe7737add9.mp4
Sometimes I get this:

Steps to reproduce the problem
(use-package smartparens
:hook
(rust-mode
c++-mode
c-mode
css-mode
json-mode
zig-mode)
:custom
(sp-highlight-pair-overlay nil)
:config
(require 'smartparens-config)
(dolist (mode '(rust-mode
c++-mode
c-mode
zig-mode
json-mode
css-mode))
(sp-local-pair mode "{" nil :post-handlers '(("||\n[i]" "RET")
("| " "SPC")))
(sp-local-pair mode "[" nil :post-handlers '(("||\n[i]" "RET")))
(sp-local-pair mode "(" nil :post-handlers '(("||\n[i]" "RET")))))
Backtraces if necessary (M-x toggle-debug-on-error)
N/A
Environment & version information
smartparensversion: 1d5cd5e8d46e182b935f8cd3cf29c8c4410aab0a- Active
major-mode:rustic-mode - Smartparens strict mode: nil
- Emacs version (
M-x emacs-version): GNU Emacs 30.0.50 (build 10, x86_64-pc-linux-gnu, GTK+ Version 3.24.37, cairo version 1.17.8) of 2023-03-29 - Starterkit/Distribution: Evil
- OS: gnu/linux