     ;; Other
     :yield "import"))
 
+(after! smartparens
+  (sp-with-modes '(js2-mode typescript-mode rjsx-mode)
+    (sp-local-pair "/**" ""  :post-handlers '(("| " "SPC") ("|\n*/[i][d-2]" "RET")))
+    (sp-local-pair "/*" "*/" :post-handlers '(("| " "SPC") ("|\n*/[i][d-2]" "RET")))))
+
 
 ;;
 ;; Major modes

(def-package! js2-mode
  :mode "\\.js\\'"
  :interpreter "node"
  :config
  (setq js2-skip-preprocessor-directives t
        js2-highlight-external-variables nil


(after! typescript-mode
  (add-hook! 'typescript-mode-hook #'(flycheck-mode rainbow-delimiters-mode))
  (setq-hook! 'typescript-mode-hook
    comment-line-break-function #'js2-line-break)
  (set-electric! 'typescript-mode
    :chars '(?\} ?\)) :words '("||" "&&"))
  (set-pretty-symbols! 'typescript-mode
