From eeca5767e94fa1033cd8dad4c273408246d8ec9f Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Mon, 8 Jul 2024 14:53:20 -0700 Subject: [PATCH] Require treesit `treesit-available-p' is defined in the C source code, but `treesit-ready-p' is defined in `treesit.el'. --- oni-python/oni-python.el | 1 + oni-yaml.el | 1 + 2 files changed, 2 insertions(+) diff --git a/oni-python/oni-python.el b/oni-python/oni-python.el index 73bf001..c88e7b4 100644 --- a/oni-python/oni-python.el +++ b/oni-python/oni-python.el @@ -101,6 +101,7 @@ for indentation." ;;;###autoload (when (and (functionp 'treesit-available-p) (treesit-available-p) + (require 'treesit) (treesit-ready-p 'python)) (add-to-list 'major-mode-remap-alist '(python-mode . python-ts-mode)) (oni-python--enable-hooks 'python-ts-mode-hook)) diff --git a/oni-yaml.el b/oni-yaml.el index 27a4cf6..6019257 100644 --- a/oni-yaml.el +++ b/oni-yaml.el @@ -54,6 +54,7 @@ ;;;###autoload (when (and (functionp 'treesit-available-p) (treesit-available-p) + (require 'treesit) (treesit-ready-p 'yaml)) (add-to-list 'major-mode-remap-alist '(yaml-mode . yaml-ts-mode)) (oni-yaml--enable-hooks 'yaml-ts-mode-hook))