Skip to content

Commit

Permalink
Merge pull request #1174 from akreisher/add-js-typescript-ts-modes
Browse files Browse the repository at this point in the history
Add support for js-ts-mode and typescript-ts-mode
  • Loading branch information
Fuco1 authored Oct 24, 2023
2 parents 37f9172 + 96fccc0 commit 0778a8a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion smartparens-config.el
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ ID, ACTION, CONTEXT."
(eval-after-load 'tuareg '(require 'smartparens-ml))
(eval-after-load 'fsharp-mode '(require 'smartparens-ml))
(eval-after-load 'unisonlang-mode '(require 'smartparens-unison))
(--each '(js js2-mode)
(--each '(js js2-mode typescript-ts-mode)
(eval-after-load it '(require 'smartparens-javascript)))
(provide 'smartparens-config)

Expand Down
11 changes: 10 additions & 1 deletion smartparens-javascript.el
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,16 @@

;; (|sys).path.append---the dot should not travel with the closing
;; paren
(--each '(js-mode javascript-mode js2-mode typescript-mode rjsx-mode)
(--each '(
js-mode
javascript-mode
js2-mode
typescript-mode
rjsx-mode
js-ts-mode
typescript-ts-mode
tsx-ts-mode
)
(add-to-list 'sp-sexp-suffix (list it 'regexp "")))

(provide 'smartparens-javascript)
Expand Down
1 change: 1 addition & 0 deletions smartparens.el
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,7 @@ Symbol is defined as a chunk of text recognized by
js-jsx-mode
js2-jsx-mode
rjsx-mode
tsx-ts-mode
)
"List of HTML modes.")

Expand Down

0 comments on commit 0778a8a

Please sign in to comment.