From 9dcdb024cba173f5dbbefffb7fd30badbbd1602b Mon Sep 17 00:00:00 2001 From: Steve Purcell Date: Fri, 2 Aug 2024 10:39:00 +0100 Subject: [PATCH] Ensure there's an auto-mode-alist entry for nix-ts-mode --- lisp/init-nix.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/init-nix.el b/lisp/init-nix.el index ef46ba32f9..2272f8a662 100644 --- a/lisp/init-nix.el +++ b/lisp/init-nix.el @@ -3,8 +3,9 @@ ;;; Code: (if (maybe-require-package 'nix-ts-mode) - (when (and (fboundp 'treesit-ready-p) (treesit-ready-p 'nix t)) - (add-to-list 'auto-mode-alist '("\\.nix\\'" . nix-ts-mode))) + ;; If the TS mode is installed, then the non-TS mode is not, so + ;; nobody will have added an auto-mode-alist entry + (add-to-list 'auto-mode-alist '("\\.nix\\'" . nix-ts-mode)) (maybe-require-package 'nix-mode)) (with-eval-after-load 'eglot