Skip to content

Commit

Permalink
tweak: prefer built-in cmake-ts-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Jun 23, 2023
1 parent da579e7 commit 3839539
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 5 deletions.
13 changes: 8 additions & 5 deletions modules/me-prog.el
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,14 @@ the children of class at point."
:straight t
:mode "\\.vim\\(rc\\)?\\'")

(when (+emacs-features-p 'tree-sitter)
(use-package cmake-ts-mode
:straight (:type built-in)
:mode "CMakeLists\\.txt\\'"
:mode "\\.cmake\\'"))
(unless (+emacs-features-p 'tree-sitter)
(+load minemacs-modules-dir "obsolete/me-cmake.el"))

(use-package cmake-ts-mode
:straight (:type built-in)
:when (+emacs-features-p 'tree-sitter)
:mode "CMakeLists\\.txt\\'"
:mode "\\.cmake\\'")

(use-package rust-mode
:straight t
Expand Down
23 changes: 23 additions & 0 deletions modules/obsolete/me-cmake.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
;;; me-cmake.el --- Edit CMake files -*- lexical-binding: t; -*-

;; Copyright (C) 2022-2023 Abdelhak Bougouffa

;; Author: Abdelhak Bougouffa (concat "abougouffa" "@" "fedora" "project" "." "org")

;;; Commentary:

;;; Code:

(use-package cmake-mode
:straight (:host github :repo "emacsmirror/cmake-mode" :files (:defaults "*"))
:mode "CMakeLists\\.txt\\'"
:mode "\\.cmake\\'")

(use-package cmake-font-lock
:straight (:host github :repo "Lindydancer/cmake-font-lock" :files (:defaults "*"))
:hook (cmake-mode . cmake-font-lock-activate))


(provide 'obsolete/me-cmake)

;;; me-cmake.el ends here

0 comments on commit 3839539

Please sign in to comment.