added typescript and readme

This commit is contained in:
Raymundo Vásquez Ruiz
2019-10-27 19:05:34 +01:00
parent b6023212ea
commit 22a9de120e
156 changed files with 7949 additions and 689 deletions

25
init.el
View File

@@ -26,7 +26,7 @@ There are two things you can do about this warning:
("a24c5b3c12d147da6cef80938dca1223b7c7f70f2f382b26308eba014dc4833a" "a7051d761a713aaf5b893c90eaba27463c791cd75d7257d3a8e66b0c8c346e77" default)))
'(package-selected-packages
(quote
(material-theme zenburn-theme ac-js2 auto-complete projectile helm js2-mode cargo rust-mode))))
(json-mode flymake-json tss tide material-theme zenburn-theme ac-js2 auto-complete projectile helm js2-mode cargo rust-mode))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
@@ -45,3 +45,26 @@ There are two things you can do about this warning:
(add-hook 'js2-mode-hook 'ac-js2-mode)
(setq ac-js2-evaluate-calls t)
(load-theme 'zenburn t)
(require 'typescript-mode)
(add-to-list 'auto-mode-alist '("\\.ts\\'" . typescript-mode))
(defun setup-tide-mode ()
(interactive)
(tide-setup)
(flycheck-mode +1)
(setq flycheck-check-syntax-automatically '(save mode-enabled))
(eldoc-mode +1)
(tide-hl-identifier-mode +1)
;; company is an optional dependency. You have to
;; install it separately via package-install
;; `M-x package-install [ret] company`
(company-mode +1))
;; aligns annotation to the right hand side
(setq company-tooltip-align-annotations t)
;; formats the buffer before saving
(add-hook 'before-save-hook 'tide-format-before-save)
(add-hook 'typescript-mode-hook #'setup-tide-mode)
(add-hook 'json-mode #'flycheck-mode)