spacemacs/layers/+lang/yaml/packages.el
syl20bnr f45ce1a88e syntax-checking: rename function add-flycheck-hook to enable-flycheck
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.
2017-03-19 12:40:36 -04:00

29 lines
870 B
EmacsLisp

;;; packages.el --- YAML Layer packages File for Spacemacs
;;
;; Copyright (c) 2012-2017 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
(setq yaml-packages '(company
flycheck
yaml-mode))
(defun yaml/post-init-company ()
(spacemacs|add-company-backends :modes yaml-mode))
(defun yaml/post-init-flycheck ()
(spacemacs/enable-flycheck 'yaml-mode))
(defun yaml/init-yaml-mode ()
"Initialize YAML mode"
(use-package yaml-mode
:mode (("\\.\\(yml\\|yaml\\)\\'" . yaml-mode)
("Procfile\\'" . yaml-mode))
:config (add-hook 'yaml-mode-hook
'(lambda ()
(define-key yaml-mode-map "\C-m" 'newline-and-indent)))))