mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-06 15:13:33 -05:00
fix(tree-sitter): backport treesit-*-abi-version
So we don't have to litter these checks with feature/fboundp checks (there will potentially be many of them).
This commit is contained in:
@@ -7,12 +7,24 @@
|
|||||||
|
|
||||||
(autoload 'treesit-ready-p "treesit")
|
(autoload 'treesit-ready-p "treesit")
|
||||||
|
|
||||||
|
;; In case of Emacs builds where treesit isn't built in (to avoid void-function
|
||||||
|
;; errors and verbose, redundant checks everywhere).
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(unless (fboundp 'treesit-available-p)
|
(unless (fboundp 'treesit-available-p)
|
||||||
(defun treesit-available-p ()
|
(defun treesit-available-p ()
|
||||||
"Return non-nil if tree-sitter support is built-in and available."
|
"Return non-nil if tree-sitter support is built-in and available."
|
||||||
nil))
|
nil))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(unless (fboundp 'treesit-library-abi-version)
|
||||||
|
(defun treesit-library-abi-version (&optional _min-compatible)
|
||||||
|
0))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(unless (fboundp 'treesit-language-abi-version)
|
||||||
|
(defun treesit-language-abi-version (&optional _lang)
|
||||||
|
nil))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defcustom treesit-auto-install-grammar 'ask
|
(defcustom treesit-auto-install-grammar 'ask
|
||||||
"Whether to install tree-sitter language grammar libraries when needed.
|
"Whether to install tree-sitter language grammar libraries when needed.
|
||||||
|
Reference in New Issue
Block a user