2018-06-27 14:07:19 -04:00
|
|
|
(defun dotspacemacs/user-config ()
|
|
|
|
"Configuration function for user code.
|
|
|
|
This function is called at the very end of Spacemacs initialization after
|
|
|
|
layers configuration.
|
|
|
|
This is the place where most of your configurations should be done. Unless it is
|
|
|
|
explicitly specified that a variable should be set before a package is loaded,
|
|
|
|
you should place your code here."
|
|
|
|
(editorconfig-mode 1)
|
2018-06-27 16:40:14 -04:00
|
|
|
|
|
|
|
;; neotree
|
|
|
|
(setq neo-smart-open t)
|
2018-06-27 14:07:19 -04:00
|
|
|
(setq neo-theme (if (display-graphic-p) 'icons 'arrow))
|
|
|
|
(setq neo-vc-integration '(face))
|
2018-06-27 16:40:14 -04:00
|
|
|
|
2018-06-28 17:09:30 -04:00
|
|
|
;; Use typescript mode for js/jsx too
|
2018-07-02 13:07:39 -04:00
|
|
|
(add-hook 'before-save-hook 'tide-format-before-save)
|
|
|
|
(setq tide-format-options
|
|
|
|
'(
|
|
|
|
:configFileName "tsconfig.prod.json"
|
|
|
|
:insertSpaceAfterFunctionKeywordForAnonymousFunctions
|
|
|
|
t
|
|
|
|
:insertSpaceBeforeFunctionParenthesis
|
|
|
|
t
|
|
|
|
:insertSpaceAfterConstructor
|
|
|
|
t
|
|
|
|
:spaceBeforeFunctionParen t
|
|
|
|
:terIndent 2
|
|
|
|
:complexity t
|
|
|
|
:no-unused-vars t
|
|
|
|
:allowJs t
|
|
|
|
:placeOpenBraceOnNewLineForFunctions nil))
|
|
|
|
|
|
|
|
;; (setq js2-basic-offset 2)
|
2018-06-28 17:09:30 -04:00
|
|
|
(add-to-list 'auto-mode-alist '("\\.js\\'" . typescript-mode))
|
|
|
|
(add-to-list 'auto-mode-alist '("\\.jsx\\'" . typescript-mode))
|
2018-06-27 14:07:19 -04:00
|
|
|
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . typescript-mode))
|
|
|
|
)
|