typescript and stuff

This commit is contained in:
John Doty 2018-03-21 17:38:23 -07:00
parent 351d0dbc69
commit 6fdab9e745
2 changed files with 28 additions and 15 deletions

View file

@ -330,12 +330,6 @@
(add-to-list 'auto-mode-alist '("\\.h\\'" . c++-mode))
(add-to-list 'auto-mode-alist '("\\.w\\'" . c++-mode))
(defun my-makefile-hook ()
(setq-local indent-tabs-mode nil) ;; Makefiles haven't needed tabs for a long time.
)
(add-hook 'makefile-mode-hook 'my-makefile-hook)
(add-to-list 'auto-mode-alist '("makefile" . makefile-mode))
(add-to-list 'auto-mode-alist '("sources" . makefile-mode))
(add-to-list 'auto-mode-alist '("dirs" . makefile-mode))
@ -575,6 +569,15 @@
(require 'flycheck-elm)
(add-to-list 'flycheck-checkers 'elm)
(defun my-elm-hook ()
"My ELM-MODE hook."
(company-mode +1)
(setq company-backends '(company-elm))
(elm-oracle-setup-completion)
(flycheck-elm-setup))
(add-hook 'elm-mode-hook 'my-elm-hook)
;; =================================================================
;; Flycheck
;; =================================================================
@ -736,13 +739,24 @@
;; =================================================================
;; Typescript-Mode
;; =================================================================
(autoload 'typescript-mode "typescript" nil t)
(add-to-list 'auto-mode-alist '("\\.ts\\'" . typescript-mode))
(defun setup-tide-mode ()
"Common hooks for tide.
(require 'tss)
(setq tss-popup-help-key "C-:")
(setq tss-jump-to-definition-key "C->")
(tss-config-default)
(See more at https://github.com/ananthakumaran/tide.)"
(interactive)
(tide-setup)
(flycheck-mode +1)
(setq flycheck-check-syntax-automatically '(save mode-enabled))
(eldoc-mode +1)
(tide-hl-identifier-mode +1)
(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)
;; =================================================================
;; Archive mode for appx

View file

@ -20,7 +20,6 @@
(company-dabbrev-code company-gtags company-etags company-keywords)
company-oddmuse company-dabbrev company-flow)))
'(css-indent-offset 2)
'(debug-on-error nil)
'(fast-lock-cache-directories (quote ("~/flc-cache")))
'(fast-lock-minimum-size nil)
'(fill-column 77)
@ -40,7 +39,6 @@
'(js2-bounce-indent-p t)
'(js2-strict-trailing-comma-warning nil)
'(make-backup-files nil)
'(markdown-command "pandoc -f markdown+yaml_metadata_block -t html -s")
'(mouse-buffer-menu-mode-mult 0)
'(omnisharp-server-executable-path nil)
'(org-export-with-toc nil)
@ -51,7 +49,7 @@
((sequence "TODO" "|" "DONE" "ABANDONED" "DEFERRED"))))
'(package-selected-packages
(quote
(mocha add-node-modules-path rjsx-mode xref-js2 js2-refactor company omnisharp geiser cider clojure-mode graphviz-dot-mode multi-term xterm-color thrift markdown-mode tuareg merlin ag use-package flycheck dockerfile-mode js2-mode web-mode zencoding-mode tss switch-window python-mode paredit magit lua-mode go-mode go-autocomplete exec-path-from-shell csharp-mode color-theme-solarized color-theme-monokai auto-complete auto-complete-nxml flymake flyspell json-mode popup ruby-mode)))
(mocha add-node-modules-path rjsx-mode xref-js2 js2-refactor company omnisharp geiser cider clojure-mode graphviz-dot-mode multi-term xterm-color thrift markdown-mode tuareg merlin ag use-package flycheck dockerfile-mode js2-mode web-mode zencoding-mode tss switch-window python-mode paredit magit lua-mode go-mode go-autocomplete exec-path-from-shell csharp-mode color-theme-solarized color-theme-monokai auto-complete auto-complete-nxml flymake flyspell json-mode popup ruby-mode company-jedi tide ahg elm-mode monky)))
'(reb-re-syntax (quote string))
'(rmail-mail-new-frame t)
'(safe-local-variable-values
@ -81,6 +79,7 @@
'(tags-revert-without-query t)
'(transient-mark-mode t)
'(truncate-lines t)
'(typescript-indent-level 2)
'(use-dialog-box nil)
'(web-mode-code-indent-offset 2)
'(web-mode-css-indent-offset 2)