Skip to content

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

@samglt

Description

@samglt

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    To triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions