2015-12-02 14:23:39 +00:00
|
|
|
|
#+TITLE: Puppet layer
|
2015-06-10 16:44:30 +00:00
|
|
|
|
|
2019-05-02 21:49:30 +00:00
|
|
|
|
#+TAGS: layer|tool
|
|
|
|
|
|
2015-06-10 16:44:30 +00:00
|
|
|
|
[[file:img/puppet.png]]
|
|
|
|
|
|
2019-05-07 20:05:06 +00:00
|
|
|
|
* Table of Contents :TOC_5_gh:noexport:
|
2017-05-22 14:16:12 +00:00
|
|
|
|
- [[#description][Description]]
|
2018-01-28 19:58:25 +00:00
|
|
|
|
- [[#features][Features:]]
|
2017-05-22 14:16:12 +00:00
|
|
|
|
- [[#install][Install]]
|
|
|
|
|
- [[#key-bindings][Key bindings]]
|
2015-06-10 16:44:30 +00:00
|
|
|
|
|
|
|
|
|
* Description
|
2018-01-28 19:58:25 +00:00
|
|
|
|
This layer provides support for the Puppet DSL to Spacemacs.
|
|
|
|
|
|
|
|
|
|
** Features:
|
|
|
|
|
- Syntax highlighting via [[https://github.com/voxpupuli/puppet-mode][puppet-mode]]
|
|
|
|
|
- Syntax-checking via [[http://puppet-lint.com/][puppet-lint]]
|
|
|
|
|
- Navigation commands to jump between blocks
|
2019-06-01 17:13:30 +00:00
|
|
|
|
- Applying the content of the current manifest directly from Emacs
|
2015-06-10 16:44:30 +00:00
|
|
|
|
|
|
|
|
|
* Install
|
2016-01-06 05:21:55 +00:00
|
|
|
|
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
|
|
|
|
|
add =puppet= to the existing =dotspacemacs-configuration-layers= list in this
|
|
|
|
|
file.
|
2015-06-10 16:44:30 +00:00
|
|
|
|
|
2018-01-28 19:58:25 +00:00
|
|
|
|
To get syntax checking to work you will also need to install =puppet-lint= by executing:
|
|
|
|
|
|
|
|
|
|
#+BEGIN_SRC sh
|
|
|
|
|
$ gem install puppet-lint
|
|
|
|
|
#+END_SRC
|
|
|
|
|
|
2015-06-10 16:44:30 +00:00
|
|
|
|
* Key bindings
|
|
|
|
|
The following key bindings are available in Puppet Mode:
|
|
|
|
|
|
2018-12-05 03:03:03 +00:00
|
|
|
|
| Key binding | Description |
|
2015-06-10 16:44:30 +00:00
|
|
|
|
|-------------+---------------------------------------------------|
|
|
|
|
|
| ~SPC m {~ | Move to the beginning of the current block |
|
|
|
|
|
| ~SPC m }~ | Move to the end of the current block |
|
|
|
|
|
| ~SPC m a~ | Align parameters in the current block |
|
2016-02-29 09:23:14 +00:00
|
|
|
|
| ~SPC m '~ | Toggle string quoting between single and double |
|
2015-06-10 16:44:30 +00:00
|
|
|
|
| ~SPC m ;~ | Blank the string at point |
|
|
|
|
|
| ~SPC m j~ | Jump to a =class=, =define=, variable or resource |
|
|
|
|
|
| ~SPC m c~ | Apply the current manifest in dry-run mode |
|
|
|
|
|
| ~SPC m v~ | Validate the syntax of the current manifest |
|
|
|
|
|
| ~SPC m l~ | Check the current manifest for semantic issues |
|
|
|
|
|
| ~SPC m $~ | Interpolate with ${} in double quoted strings |
|
|
|
|
|
|
|
|
|
|
Use =M-x customize-group RET puppet= to customize Puppet Mode.
|