smartparens icon indicating copy to clipboard operation
smartparens copied to clipboard

\( should not pair with \) in swift-mode

Open samglt opened this issue 10 months ago • 0 comments

Swift uses "(...)" for interpolation in strings like this: "Some Var: \(somevar)" but the default sp behavior inserts a ")" which is invalid. Just disabling the default pair with (sp-local-pair "\\(" nil :actions nil) fixes this. I'm not aware of any time parens are special characters that could need to be escaped in Swift.

I'll submit a PR with a test later today.

samglt avatar Feb 05 '25 21:02 samglt