smartparens icon indicating copy to clipboard operation
smartparens copied to clipboard

Parens not completed within snippets

Open rishisubramanian opened this issue 6 years ago • 1 comments

Expected behavior

In Latex mode, inside a snippet, adding an open paren does not automatically close it.

Actual behavior

\frac{(}{} should be \frac{()}{}

Steps to reproduce the problem

Using yasnippet, insert a snippet with tabstops, then try inserting parenthesis (or any kind of bracket)

Environment & version information

  • smartparens version: 20180717.335
  • Active major-mode: latex-mode
  • Emacs version (M-x emacs-version): 261
  • Spacemacs/Evil/Other starterkit (specify which)/Vanilla: Spacemacs
  • OS: Arch Linux

rishisubramanian avatar Jul 23 '18 02:07 rishisubramanian

This issue is also present in LSP modes, including Go, Rust, Java, Kotlin, etc. Additionally, the smartparens mode get disabled silently after the snippet completion.

rinconjc avatar Jul 06 '22 10:07 rinconjc

Additionally, the smartparens mode get disabled silently after the snippet completion.

This is impossible unless some yasnippet hook has it configured to disable the mode. It can never turn itself off.

The behaviour from OP I was able to reproduce and I have a fix planned, but need to test it more.

The issue with LSP, does it include company mode? I can reproduce the bug with yasnippet or company mode, because those are specially handled in smartparens, but we have no special "compatibility" for LSP mode.

Fuco1 avatar Mar 29 '24 22:03 Fuco1