From fb347dd35ab78825380ebfbae016c3ea69684572 Mon Sep 17 00:00:00 2001 From: Jonathan Jin Date: Wed, 5 Jun 2024 13:23:01 +0100 Subject: [PATCH] only enable yaml-ts-mode if grammar is installed --- kele.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kele.el b/kele.el index 7f1e0364..bb64087d 100644 --- a/kele.el +++ b/kele.el @@ -119,7 +119,7 @@ pods." (defcustom kele-yaml-highlighting-mode (cond ((featurep 'yaml-mode) 'yaml-mode) - ((featurep 'yaml-ts-mode) 'yaml-ts-mode)) + ((and (featurep 'yaml-ts-mode) (treesit-ready-p 'yaml)) 'yaml-ts-mode)) "Which major mode to use for YAML highlighting. Set to nil to disable YAML highlighting."