Skip to content

Commit c4a703c

Browse files
committed
tweak(editorconfig): trigger on the first file, exclude compressed files
1 parent 9cc51e9 commit c4a703c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

modules/me-prog.el

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,14 @@
101101

102102
(use-package editorconfig
103103
:straight t
104-
:hook (prog-mode . editorconfig-mode)
104+
:hook (minemacs-first-file . editorconfig-mode)
105105
:init
106106
(+map!
107107
"fc" '(editorconfig-find-current-editorconfig :wk "Find current EditorConfig")
108-
"cfe" #'editorconfig-format-buffer))
108+
"cfe" #'editorconfig-format-buffer)
109+
:config
110+
;; Exclude compressed files
111+
(push "\\.\\(zip\\|epub\\|\\(doc\\|xls\\|ppt\\)x\\)\\'" editorconfig-exclude-regexps))
109112

110113
(use-package clang-format
111114
:straight t

0 commit comments

Comments
 (0)