Skip to content

Commit 2ea2dfa

Browse files
authored
Merge pull request #1224 from gav451/master
Add go-ts-mode to smartparens-go.el
2 parents 8de43d7 + 5c4861e commit 2ea2dfa

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

smartparens-go.el

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,17 @@
4545
(require 'smartparens)
4646

4747
(declare-function go-mode "go-mode")
48+
(declare-function go-ts-mode "go-ts-mode")
4849

49-
(sp-with-modes 'go-mode
50+
(sp-with-modes '(go-mode go-ts-mode)
5051
(sp-local-pair "{" nil :post-handlers '(("||\n[i]" "RET")))
5152
(sp-local-pair "/*" "*/" :post-handlers '(("| " "SPC")
5253
("* ||\n[i]" "RET"))))
5354

5455
;; Go has no sexp suffices. This fixes slurping
5556
;; (|foo).bar -> (foo.bar)
5657
(add-to-list 'sp-sexp-suffix (list #'go-mode 'regexp ""))
58+
(add-to-list 'sp-sexp-suffix (list #'go-ts-mode 'regexp ""))
5759

5860
(provide 'smartparens-go)
5961

0 commit comments

Comments
 (0)