f45ce1a88e
spacemacs/add-flycheck-hook was not really hooking anything, change the name to better reflect what it does. Also changed the push for a add-to-list to avoid duplicates.
34 lines
907 B
EmacsLisp
34 lines
907 B
EmacsLisp
;;; packages.el --- cfengine layer packages file for Spacemacs.
|
|
;;
|
|
;; Copyright (c) 2012-2017 Sylvain Benner & Contributors
|
|
;;
|
|
;; Author: Nick Anderson <nick@cmdln.org>
|
|
;; URL: https://github.com/syl20bnr/spacemacs
|
|
;;
|
|
;; This file is not part of GNU Emacs.
|
|
;;
|
|
;;; License: GPLv3
|
|
|
|
(defconst cfengine-packages
|
|
'(
|
|
(cfengine3-mode :location built-in)
|
|
company
|
|
eldoc
|
|
flycheck
|
|
))
|
|
|
|
(defun cfengine/init-cfengine3-mode ()
|
|
(use-package cfengine3-mode
|
|
:defer t
|
|
:mode ("\\.cf\\'" . cfengine3-mode)
|
|
:init (spacemacs/set-leader-keys-for-major-mode 'cfengine3-mode
|
|
"j" 'cfengine3-reformat-json-string)))
|
|
|
|
(defun cfengine/post-init-company ()
|
|
(spacemacs|add-company-backends :modes cfengine3-mode))
|
|
|
|
(defun cfengine/post-init-eldoc ()
|
|
(add-hook 'cfengine3-mode-hook 'eldoc-mode))
|
|
|
|
(defun cfengine/post-init-flycheck ()
|
|
(spacemacs/enable-flycheck 'cfengine3-mode-hook))
|