Skip to content

Commit

Permalink
chore(language/toml): don't install conf-toml-mode if toml-ts-mode is…
Browse files Browse the repository at this point in the history
… available
  • Loading branch information
jimeh committed May 26, 2024
1 parent eec29b6 commit fe47210
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions modules/languages/siren-toml.el
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@

(require 'siren-prog-mode)

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

;; Requires Emacs 29.x or later for built-in treesit support.
(when (fboundp 'toml-ts-mode)
(require 'siren-treesit)
(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)))
(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 fe47210

Please sign in to comment.