Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yaml layer: enable flycheck #7153

Merged
merged 1 commit into from
Oct 14, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion layers/+lang/yaml/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@
* Table of Contents :TOC_4_gh:noexport:
- [[#description][Description]]
- [[#install][Install]]
- [[#syntax-checking-with-flycheck][Syntax checking with flycheck]]

* Description
This layer provides syntax highlighting for YAML files.
This layer provides syntax highlighting and syntax checking via [[http://www.flycheck.org/en/latest/languages.html#yaml][flycheck]] for YAML files.

* Install
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
add =yaml= to the existing =dotspacemacs-configuration-layers= list in this
file.

* Syntax checking with flycheck
Flycheck checks YAML with yaml-jsyaml or yaml-ruby. The flycheck YAML
documentation can be found at the [[http://www.flycheck.org/en/latest/languages.html#yaml][flycheck website]].
2 changes: 1 addition & 1 deletion layers/+lang/yaml/config.el
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;;; config.el --- YAML Layer packages File for Spacemacs
;;; config.el --- YAML Layer configuration File for Spacemacs
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this line. But it should be config 😸

Copy link
Contributor Author

@rski rski Oct 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can fix it, but I just looked it up from other layers :-)

~/Code/spacemacs/spacemacs on yaml_flycheck ⌚ 20:34:53
$ ag "config file"| wc -l
11

~/Code/spacemacs/spacemacs on  yaml_flycheck ⌚ 20:35:00
$ ag "configuration file"| wc -l
67

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm... indeed 😸

;;
;; Copyright (c) 2012-2016 Sylvain Benner & Contributors
;;
Expand Down
4 changes: 4 additions & 0 deletions layers/+lang/yaml/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@
;;
;;; License: GPLv3
(setq yaml-packages '(company
flycheck
yaml-mode))

(defun yaml/post-init-company ()
(spacemacs|add-company-hook yaml-mode))

(defun yaml/post-init-flycheck ()
(spacemacs/add-flycheck-hook 'yaml-mode))

(defun yaml/init-yaml-mode ()
"Initialize YAML mode"
(use-package yaml-mode
Expand Down