spacemacs/.spacemacs.d/spacemacs-user-config.el

38 lines
1.2 KiB
EmacsLisp

(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)
;; neotree
(setq neo-smart-open t)
(setq neo-theme (if (display-graphic-p) 'icons 'arrow))
(setq neo-vc-integration '(face))
;; Use typescript mode for js/jsx too
(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)
(add-to-list 'auto-mode-alist '("\\.js\\'" . typescript-mode))
(add-to-list 'auto-mode-alist '("\\.jsx\\'" . typescript-mode))
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . typescript-mode))
)