Last active
September 26, 2017 11:41
-
-
Save JohnL4/8e2ffb31aa371a2d9a74d5defa72587e to your computer and use it in GitHub Desktop.
emacs tide (typescript-mode) configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(add-hook 'typescript-mode-hook | |
(lambda () | |
(tide-setup) | |
(flycheck-mode +1) | |
(eldoc-mode +1) | |
(company-mode) | |
(setq fill-column 120) | |
(local-set-key "\C-j" 'newline) | |
(local-set-key "\r" 'newline-and-indent) ;Auto-indent. | |
(local-set-key "\M-o" 'one-line-section-break) | |
(local-set-key (kbd "<f2> r") 'tide-rename-symbol) | |
(local-set-key (kbd "S-<f12>") 'tide-references) | |
)) | |
;; Note that the following don't work for me when set inside the mode hook. Don't know why. | |
(setq typescript-indent-level 3) | |
(setq tide-format-options '(:placeOpenBraceOnNewLineForFunctions t :placeOpenBraceOnNewLineForControlBlocks t)) | |
(setq company-tooltip-align-annotations t) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment