mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-18 16:06:56 -05:00
fix: backport treesit-available-p sooner
This fixes Doom for Emacs 27-28 users (or builds without treesit).
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
;;; Packages
|
||||
|
||||
(use-package! treesit
|
||||
:when (fboundp 'treesit-available-p)
|
||||
:when (treesit-available-p)
|
||||
:defer t
|
||||
:preface
|
||||
@@ -48,8 +47,7 @@
|
||||
(let ((mode (funcall fn mode)))
|
||||
(if-let* ((ts (get mode '+tree-sitter))
|
||||
(fallback-mode (car ts)))
|
||||
(cond ((or (not (fboundp 'treesit-available-p))
|
||||
(not (treesit-available-p)))
|
||||
(cond ((not (treesit-available-p))
|
||||
(message "Treesit unavailable, falling back to `%S'" fallback-mode)
|
||||
fallback-mode)
|
||||
((not (fboundp mode))
|
||||
|
Reference in New Issue
Block a user