branch: elpa/smartparens commit 9ffb373082fca531ccc8e878aeb2048b3b9abfb0 Author: Dmitry Polienko <dmi...@eldis.ru> Commit: Dmitry Polienko <dmi...@eldis.ru>
Add support for triple quoted string literals in Scala --- smartparens-scala.el | 2 ++ test/smartparens-scala-test.el | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/smartparens-scala.el b/smartparens-scala.el index 7e79016..7b37472 100644 --- a/smartparens-scala.el +++ b/smartparens-scala.el @@ -76,5 +76,7 @@ ("| " "SPC") sp-scala-wrap-with-indented-newlines)) +(sp-local-pair 'scala-mode "\"\"\"" "\"\"\"") + (provide 'smartparens-scala) ;;; smartparens-scala.el ends here diff --git a/test/smartparens-scala-test.el b/test/smartparens-scala-test.el index 596b0cb..5c669f5 100644 --- a/test/smartparens-scala-test.el +++ b/test/smartparens-scala-test.el @@ -43,3 +43,10 @@ (scala-mode) (execute-kbd-macro "{") (should (equal (buffer-string) "{\n foo\n}")))) + +(ert-deftest sp-test-scala-triple-quotes () + "Close triple quotes" + (sp-test-with-temp-buffer "sql|" + (scala-mode) + (execute-kbd-macro (kbd "\"\"\"SELECT")) + (should (equal (buffer-string) "sql\"\"\"SELECT\"\"\""))))