mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Fix js defvaralias errors in Emacs 27
In later versions of Emacs, if a var alias is created *after* it has been assigned a value, an error is thrown. This prevents the user from opening js files.
This commit is contained in:
@ -21,12 +21,12 @@
|
||||
|
||||
(add-hook! 'js2-mode-hook #'(flycheck-mode rainbow-delimiters-mode))
|
||||
|
||||
;; Indent switch-case another step
|
||||
(setq-hook! 'js2-mode-hook js-switch-indent-offset js2-basic-offset)
|
||||
|
||||
(set-electric! 'js2-mode :chars '(?\} ?\) ?. ?:))
|
||||
(set-repl-handler! 'js2-mode #'+javascript/repl)
|
||||
|
||||
;; Conform switch-case indentation to js2 normal indent
|
||||
(defvaralias 'js-switch-indent-offset 'js2-basic-offset)
|
||||
|
||||
(sp-with-modes '(js2-mode rjsx-mode)
|
||||
(sp-local-pair "/*" "*/" :post-handlers '(("| " "SPC"))))
|
||||
|
||||
|
Reference in New Issue
Block a user