2016-04-14 21:48:33 +00:00
|
|
|
;;; packages.el --- cfengine layer packages file for Spacemacs.
|
|
|
|
;;
|
2018-01-04 07:00:25 +00:00
|
|
|
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
2016-04-14 21:48:33 +00:00
|
|
|
;;
|
|
|
|
;; Author: Nick Anderson <nick@cmdln.org>
|
|
|
|
;; URL: https://github.com/syl20bnr/spacemacs
|
|
|
|
;;
|
|
|
|
;; This file is not part of GNU Emacs.
|
|
|
|
;;
|
|
|
|
;;; License: GPLv3
|
|
|
|
|
2016-04-22 02:22:02 +00:00
|
|
|
(defconst cfengine-packages
|
|
|
|
'(
|
|
|
|
(cfengine3-mode :location built-in)
|
|
|
|
company
|
|
|
|
eldoc
|
|
|
|
flycheck
|
2017-10-15 13:50:49 +00:00
|
|
|
(ob-cfengine3 :requires org)
|
|
|
|
org
|
2020-05-22 17:40:01 +00:00
|
|
|
mustache-mode
|
2016-04-22 02:22:02 +00:00
|
|
|
))
|
2016-04-14 21:48:33 +00:00
|
|
|
|
2016-04-22 02:22:02 +00:00
|
|
|
(defun cfengine/init-cfengine3-mode ()
|
2016-04-14 21:48:33 +00:00
|
|
|
(use-package cfengine3-mode
|
2018-03-04 04:37:53 +00:00
|
|
|
:defer t
|
2016-04-22 02:22:02 +00:00
|
|
|
:mode ("\\.cf\\'" . cfengine3-mode)
|
|
|
|
:init (spacemacs/set-leader-keys-for-major-mode 'cfengine3-mode
|
|
|
|
"j" 'cfengine3-reformat-json-string)))
|
2016-04-14 21:48:33 +00:00
|
|
|
|
|
|
|
(defun cfengine/post-init-company ()
|
2017-01-02 05:39:04 +00:00
|
|
|
(spacemacs|add-company-backends :modes cfengine3-mode))
|
2016-04-14 21:48:33 +00:00
|
|
|
|
2016-04-22 02:22:02 +00:00
|
|
|
(defun cfengine/post-init-eldoc ()
|
|
|
|
(add-hook 'cfengine3-mode-hook 'eldoc-mode))
|
|
|
|
|
2016-04-14 21:48:33 +00:00
|
|
|
(defun cfengine/post-init-flycheck ()
|
2017-07-30 20:13:20 +00:00
|
|
|
(spacemacs/enable-flycheck 'cfengine3-mode))
|
2017-10-05 03:32:32 +00:00
|
|
|
|
|
|
|
(defun cfengine/init-ob-cfengine3 ()
|
|
|
|
(use-package ob-cfengine3
|
2018-03-04 04:37:53 +00:00
|
|
|
:defer t))
|
2017-10-15 13:50:49 +00:00
|
|
|
|
|
|
|
(defun cfengine/pre-init-org ()
|
2018-10-29 18:14:32 +00:00
|
|
|
(when (configuration-layer/layer-used-p 'org)
|
2017-10-15 13:50:49 +00:00
|
|
|
(spacemacs|use-package-add-hook org
|
2018-10-29 18:11:58 +00:00
|
|
|
:post-config (add-to-list 'org-babel-load-languages '(cfengine3 . t)))))
|
2020-05-22 17:40:01 +00:00
|
|
|
|
|
|
|
(defun cfengine/init-mustache-mode ()
|
|
|
|
(use-package mustache-mode
|
2020-06-07 17:32:15 +00:00
|
|
|
:init (add-to-list 'auto-mode-alist '("\\.mustache\\'" . mustache-mode))
|
2020-05-22 17:40:01 +00:00
|
|
|
:defer t))
|