From c690ed600af910724cc5be6e4250a9340795d675 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 25 May 2020 02:23:58 -0400 Subject: [PATCH] lang/swift: add pair rule for string interpolation --- modules/config/default/config.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/config/default/config.el b/modules/config/default/config.el index ac9e53ba4..3b44f1b1c 100644 --- a/modules/config/default/config.el +++ b/modules/config/default/config.el @@ -111,6 +111,9 @@ :pre-handlers '(:rem sp-ruby-pre-handler) :post-handlers '(:rem sp-ruby-post-handler)) + ;; Don't eagerly escape Swift style string interpolation + (sp-local-pair 'swift-mode "\\(" ")" :when '(sp-in-string-p)) + ;; Don't do square-bracket space-expansion where it doesn't make sense to (sp-local-pair '(emacs-lisp-mode org-mode markdown-mode gfm-mode) "[" nil :post-handlers '(:rem ("| " "SPC")))