Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

smartparens breaks rust-analyzer's automatic wrapping #1154

Open
p00f opened this issue Apr 5, 2023 · 0 comments
Open

smartparens breaks rust-analyzer's automatic wrapping #1154

p00f opened this issue Apr 5, 2023 · 0 comments

Comments

@p00f
Copy link

p00f commented Apr 5, 2023

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 {:

sp-correct.mp4

Actual behavior

rust-analyzer's automatic wrapping doesn't work. Screencast with smartparens on:

sp-bug.mp4

Sometimes I get this:
image

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

  • smartparens version: 1d5cd5e
  • 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
@p00f p00f changed the title Make exception for some major modes smartparens breaks rust-analyzer's automatic wrapping Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To triage
Development

No branches or pull requests

1 participant