Skip to content

Commit 82d2cf0

Browse files
authored
Merge pull request #1239 from alternateved/add-markdown-ts-mode-support
feat(markdown): add support for built-in markdown-ts-mode
2 parents 386e923 + 7e957c7 commit 82d2cf0

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

smartparens-config.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ ID, ACTION, CONTEXT."
148148
(eval-after-load 'latex '(require 'smartparens-latex))
149149
(eval-after-load 'lua-mode '(require 'smartparens-lua))
150150
(eval-after-load 'lua-ts-mode '(require 'smartparens-lua))
151-
(eval-after-load 'markdown-mode '(require 'smartparens-markdown))
151+
(--each '(markdown-mode markdown-ts-mode)
152+
(eval-after-load it '(require 'smartparens-markdown)))
152153
(--each '(python-mode python-ts-mode python)
153154
(eval-after-load it '(require 'smartparens-python)))
154155
(eval-after-load 'org '(require 'smartparens-org))

smartparens-markdown.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,15 @@ This predicate is only tested on \"insert\" action."
6969
(goto-char mb)
7070
(save-match-data (looking-at "^\\* "))))
7171

72-
(sp-with-modes '(markdown-mode gfm-mode)
72+
(sp-with-modes '(markdown-mode markdown-ts-mode gfm-mode)
7373
(sp-local-pair "*" "*"
7474
:unless '(sp--gfm-point-after-word-p sp-point-at-bol-p)
7575
:post-handlers '(("[d1]" "SPC"))
7676
:skip-match 'sp--gfm-skip-asterisk)
7777
(sp-local-pair "**" "**")
7878
(sp-local-pair "_" "_" :unless '(sp-point-after-word-p)))
7979

80-
(sp-with-modes 'markdown-mode
80+
(sp-with-modes '(markdown-mode markdown-ts-mode)
8181
(sp-local-pair "```" "```"))
8282

8383
(sp-with-modes 'gfm-mode

0 commit comments

Comments
 (0)