Skip to content

Commit b50775d

Browse files
committed
refactor(builtin): conditionally enable treesit stuff the MinEmacs way
1 parent 6c562ac commit b50775d

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

core/me-builtin.el

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -302,20 +302,22 @@
302302
:after oc
303303
:demand t)
304304

305-
(when (+emacs-features-p 'tree-sitter)
306-
(use-package treesit
307-
:straight (:type built-in)
308-
:custom
309-
(treesit-font-lock-level 4))
310-
311-
(use-package dockerfile-ts-mode
312-
:straight (:type built-in)
313-
:mode "/Dockerfile\\'")
314-
315-
(use-package cmake-ts-mode
316-
:straight (:type built-in)
317-
:mode "CMakeLists\\.txt\\'"
318-
:mode "\\.cmake\\'"))
305+
(unless (+emacs-features-p 'tree-sitter)
306+
(push '(treesit dockerfile-ts-mode cmake-ts-mode) minemacs-disabled-packages))
307+
308+
(use-package treesit
309+
:straight (:type built-in)
310+
:custom
311+
(treesit-font-lock-level 4))
312+
313+
(use-package dockerfile-ts-mode
314+
:straight (:type built-in)
315+
:mode "/Dockerfile\\'")
316+
317+
(use-package cmake-ts-mode
318+
:straight (:type built-in)
319+
:mode "CMakeLists\\.txt\\'"
320+
:mode "\\.cmake\\'")
319321

320322
(use-package autoinsert
321323
;; NOTE: When prompting (like in Keywords), hit M-RET when finished

0 commit comments

Comments
 (0)