mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
Add typescript-mode and coffee-mode
This commit is contained in:
@ -86,5 +86,25 @@
|
||||
(narf|enable-tab-width-2)
|
||||
(setq js-indent-level 2)))
|
||||
|
||||
(use-package typescript-mode
|
||||
:mode "\\.ts$"
|
||||
:config
|
||||
(require 'tide)
|
||||
(defun narf|typescript-setup ()
|
||||
(tide-setup)
|
||||
(flycheck-mode 1)
|
||||
(eldoc-mode 1))
|
||||
|
||||
(add-hook! typescript-mode 'narf|typescript-setup)
|
||||
(add-hook! web-mode (when (string-equal "tsx" (file-name-extension buffer-file-name)) (narf|typescript-setup))))
|
||||
|
||||
(use-package coffee-mode
|
||||
:mode "\\.coffee$"
|
||||
:init (add-hook! coffee-mode 'narf|enable-tab-width-2)
|
||||
:config
|
||||
(setq-default
|
||||
coffee-tab-width 2
|
||||
coffee-indent-like-python-mode t))
|
||||
|
||||
(provide 'module-js)
|
||||
;;; module-js.el ends here
|
||||
|
Reference in New Issue
Block a user