             "--stdin-filename"
             ,buffer-file-name
             "--ext"
-            ".json,.js,.jsx,.mjs,.mjsx,.cjs,.cjsx,.ts,.tsx")))
+            ".json,.js,.jsx,.mjs,.cjs,.cjsx,.ts,.tsx")))
 
 (dolist (mode '(css-mode js-mode markdown-mode scss-mode typescript-mode web-mode yaml-mode))
   (let ((mode-hook (intern (concat (symbol-name mode) "-hook"))))

                                                 (lsp--workspace-server-id lsp--cur-workspace))))))))
                    (if (or yarn-pnp-p (executable-find "yarn"))
                        (progn
                          (define-key (derived-mode-map-name mode) (kbd "C-c f") 'yarn-eslint-format-buffer)
                          (yarn-eslint-format-on-save-mode))
                      (progn
                        (define-key (derived-mode-map-name mode) (kbd "C-c f") 'eslint-format-buffer)
                        (eslint-format-on-save-mode))))
                   ((eq formatter 'prettier)
                    (use-package prettier
                      :delight
                      :config
                      (prettier-mode)
                      (define-key (derived-mode-map-name mode) (kbd "C-c f") 'prettier-prettify)))))))))

;; Node
(add-hook 'js-mode-hook
          (lambda ()
            (use-package import-js
              :bind (:map js-mode-map
                          ("C-c t i"   . import-js-import)
                          ("C-c t f"   . import-js-fix)
                          ("C-c t M-." . import-js-goto))
              :config (run-import-js))

            (use-package js-doc
              :bind (:map js-mode-map
                          ("C-c C-d m" . js-doc-insert-file-doc)
                          ("C-c C-d f" . js-doc-insert-function-doc-snippet)))

            (use-package nodejs-repl
              :bind(:map js-mode-map
                         ("C-c e e" . nodejs-repl-send-last-expression)
                         ("C-c e r" . nodejs-repl-send-region)
                         ("C-c e b" . nodejs-repl-send-buffer)
                         ("C-c e l" . nodejs-repl-load-file)
                         ("C-c M-:" . nodejs-repl-switch-to-repl)))

            (define-key js-mode-map [menu-bar] nil)
            (define-key js-mode-map (kbd "M-.") nil)))

(use-package js2-mode
  :interpreter ("node" . js2-mode)

              (when (not (key-binding (kbd "C-c f")))
                (define-key json-mode-map (kbd "C-c f") 'json-pretty-print-buffer)))))

(use-package poly-markdown)

;; TypeScript
(use-package typescript-mode
  :mode ("\\.tsx?\\'"))

(use-package ts-comint
  :after (typescript-mode)
