smartparens
smartparens copied to clipboard
Can't wrap JSX in `{` `}`
Expected behavior
// Be able to select the inner div and wrap it in {}
<div>
<div />
</div>
// Which will become
<div>
{<div />}
</div>
// This is useful when doing something like this
<div>
{somePredicate && <div />}
</div>
Actual behavior
Receive the following error
mismatch sexp state: wrapping would break structure
Environment & version information
smartparensversion: <Please specify manually>- Active
major-mode:typescript-tsx-mode - Smartparens strict mode: nil
- Emacs version (
M-x emacs-version): GNU Emacs 28.2 (build 1, aarch64-apple-darwin21.1.0, NS appkit-2113.00 Version 12.0.1 (Build 21A559)) of 2023-02-23 - Starterkit/Distribution: Doom
- OS: darwin
Where does the typescript-tsx-mode come from? I'm using the regular typescript-mode and it wraps.