Skip to content

Commit

Permalink
Add just-ts-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
purcell committed Nov 21, 2024
1 parent 317994e commit 7a725b2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions init.el
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@
(require 'init-nix)
(maybe-require-package 'nginx-mode)
(maybe-require-package 'just-mode)
(when (maybe-require-package 'just-ts-mode)
;; Undo overly-optimistic autoloading, so that things still work in
;; Emacs 29 without treesitter
(sanityinc/remove-auto-mode 'just-ts-mode))
(maybe-require-package 'justl)

(require 'init-paredit)
Expand Down
4 changes: 4 additions & 0 deletions lisp/init-utils.el
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ BUFFER and ALIST are as for `display-buffer-full-frame'."
(dolist (pattern patterns)
(add-to-list 'auto-mode-alist (cons pattern mode))))

(defun sanityinc/remove-auto-mode (mode)
"Remove entries from `auto-mode-alist' that are for `MODE'."
(setq auto-mode-alist (seq-remove (lambda (x) (eq mode (cdr x))) auto-mode-alist)))

;; Like diminish, but for major modes
(defun sanityinc/set-major-mode-name (name)
"Override the major mode NAME in this buffer."
Expand Down

0 comments on commit 7a725b2

Please sign in to comment.