Add typescript-mode and coffee-mode
This commit is contained in:
parent
27bbf93b64
commit
3c98b56ed3
2 changed files with 23 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue