[submodule "ghub"]
path = packages/ghub
url = https://github.com/magit/ghub.git
+[submodule "typescript-mode"]
+ path = packages/typescript-mode
+ url = https://github.com/ananthakumaran/typescript.el.git
+[submodule "tide"]
+ path = packages/tide
+ url = https://github.com/ananthakumaran/tide.git
(require 'json-mode)
(require 'js)
(require 'js2-mode)
+(require 'typescript-mode)
+(require 'tide)
(add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode))
(add-to-list 'interpreter-mode-alist '("node" . js2-mode))
(setq js2-concat-multiline-strings 'eol)
(setq js2-mode-show-parse-errors nil)
(setq js2-mode-show-strict-warnings nil)
(setq js--declaration-keyword-re "x^") ; declarations should have normal indentation
-(require 'js2-refactor)
+
+(add-hook 'js2-mode-hook #'tide-setup)
(add-hook 'js2-mode-hook #'js2-refactor-mode)
+(add-hook 'typescript-mode-hook #'tide-setup)
+(add-hook 'typescript-mode-hook #'js2-refactor-mode)
+
+(require 'js2-refactor)
(js2r-add-keybindings-with-prefix "C-c C-m")
(setq js2r-always-insert-parens-around-arrow-function-params t)
(setq js2r-prefered-quote-type 2)
-(when (require 'tern nil 'noerror)
- (add-hook 'js2-mode-hook (lambda () (tern-mode t))))
-(defun tern-project-dir ()
- (or (and (equal tern-last-file-name (buffer-file-name)) tern-project-dir)
- (and (not (buffer-file-name)) (setf tern-project-dir ""))
- (setf tern-project-dir (expand-file-name (locate-dominating-file default-directory ".git"))))
- ;; Track the file name to detect if it changed, which means the project
- ;; directory needs to be found again.
- (setf tern-last-file-name (buffer-file-name))
- tern-project-dir)
(require 'ledger-mode nil 'noerror)
(add-hook 'after-init-hook
(lambda ()
(diminish 'editorconfig-mode)
- (diminish 'elisp-slime-nav-mode)
(diminish 'git-gutter-mode)
(diminish 'highlight-symbol-mode)
(diminish 'indent-guide-mode)
(diminish 'ivy-mode)
- (diminish 'js2-refactor-mode)
- (diminish 'tern-mode)
(diminish 'yas-minor-mode)))