Skip to content

Commit

Permalink
fix(language/toml): switch back to conf-toml-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
jimehk committed Jul 15, 2024
1 parent 64d520c commit 9ba69c8
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions modules/languages/siren-toml.el
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,24 @@

(require 'siren-prog-mode)

;; Requires Emacs 29.x or later for built-in treesit support.
(if (fboundp 'toml-ts-mode)
(use-package toml-ts-mode
:straight (:type built-in)
:mode "\\.toml\\'" "Cargo\\.lock\\'"
:hook
(toml-ts-mode . siren-toml-mode-setup)
:preface
(require 'siren-treesit)
:config
(siren-treesit-auto-ensure-grammar 'toml))
(use-package conf-toml-mode
:straight (:type built-in)
:mode "\\.toml\\'" "Cargo\\.lock\\'"
:hook (conf-toml-mode . siren-toml-mode-setup)))
;; TODO: Revisit toml-ts-mode at some point the future. It's a bit buggy at the
;; moment.
;;
;; (if (fboundp 'toml-ts-mode)
;; (use-package toml-ts-mode
;; :straight (:type built-in)
;; :mode "\\.toml\\'" "Cargo\\.lock\\'"
;; :hook
;; (toml-ts-mode . siren-toml-mode-setup)
;; :preface
;; (require 'siren-treesit)
;; :config
;; (siren-treesit-auto-ensure-grammar 'toml)))

(use-package conf-toml-mode
:straight (:type built-in)
:mode "\\.toml\\'" "Cargo\\.lock\\'"
:hook (conf-toml-mode . siren-toml-mode-setup))

(defun siren-toml-mode-setup ()
"Default tweaks for `toml-mode'."
Expand Down

0 comments on commit 9ba69c8

Please sign in to comment.