smartparens
smartparens copied to clipboard
Parens not completed within snippets
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
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.
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.