Move most of Emacs config to general .editorconfig file

This commit is contained in:
Lucien Cartier-Tilet 2023-02-24 16:42:47 +01:00
parent 1fb0c5c2de
commit 3cc7bb6f63
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA
2 changed files with 19 additions and 8 deletions

View File

@ -1,11 +1,7 @@
;;; Directory Local Variables -*- no-byte-compile: t -*- ;;; Directory Local Variables -*- no-byte-compile: t -*-
;;; For more information see (info "(emacs) Directory Variables") ;;; For more information see (info "(emacs) Directory Variables")
((js-json-mode . ((js-indent-level . 2) ((css-mode . ((eval . (prettier-js-mode 1))))
(eval . (prettier-js-mode 1)))) (js-json-mode . ((eval . (prettier-js-mode 1))))
(typescript-mode . ((typescript-indent-level . 2) (typescript-mode . ((eval . (prettier-js-mode 1))))
(eval . (prettier-js-mode 1)) (typescript-ts-mode . ((eval . (prettier-js-mode 1)))))
(prettier-js-args . ("--single-quote" "--jsx-single-quote"))))
(typescript-ts-mode . ((typescript-indent-level . 2)
(eval . (prettier-js-mode 1))
(prettier-js-args . ("--single-quote" "--jsx-single-quote")))))

15
.editorconfig Normal file
View File

@ -0,0 +1,15 @@
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true
[*.{json,ts,css}]
indent_style = space
indent_size = 2
[*.ts]
quote_type = single