mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-04 15:03:42 -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")
|
||||
|
||||
;; In case of Emacs builds where treesit isn't built in (to avoid void-function
|
||||
;; errors and verbose, redundant checks everywhere).
|
||||
;;;###autoload
|
||||
(unless (fboundp 'treesit-available-p)
|
||||
(defun treesit-available-p ()
|
||||
"Return non-nil if tree-sitter support is built-in and available."
|
||||
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
|
||||
(defcustom treesit-auto-install-grammar 'ask
|
||||
"Whether to install tree-sitter language grammar libraries when needed.
|
||||
|
Reference in New Issue
Block a user