branch: elpa/smartparens commit 2ea2dfa3b91829787f6d90dbb37f35c4232586d0 Merge: 8de43d7d58 5c4861e4cf Author: Matus Goljer <matus.gol...@gmail.com> Commit: GitHub <nore...@github.com>
Merge pull request #1224 from gav451/master Add go-ts-mode to smartparens-go.el --- smartparens-go.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/smartparens-go.el b/smartparens-go.el index 7479a4cc2a..48bf7c026c 100644 --- a/smartparens-go.el +++ b/smartparens-go.el @@ -45,8 +45,9 @@ (require 'smartparens) (declare-function go-mode "go-mode") +(declare-function go-ts-mode "go-ts-mode") -(sp-with-modes 'go-mode +(sp-with-modes '(go-mode go-ts-mode) (sp-local-pair "{" nil :post-handlers '(("||\n[i]" "RET"))) (sp-local-pair "/*" "*/" :post-handlers '(("| " "SPC") ("* ||\n[i]" "RET")))) @@ -54,6 +55,7 @@ ;; Go has no sexp suffices. This fixes slurping ;; (|foo).bar -> (foo.bar) (add-to-list 'sp-sexp-suffix (list #'go-mode 'regexp "")) +(add-to-list 'sp-sexp-suffix (list #'go-ts-mode 'regexp "")) (provide 'smartparens-go)