Salt is a Python-based configuration management and orchestration
system built on top of a high-speed remote execution engine.
Configuration management is most commonly managed by writing state files ending with
this mode adds emacs support for these files.
Salt-mode requires a minimum emacs version of 24.4.
- Syntax highlighting
- Indentation and alignment of expressions and statements
- Jinja Templating Support
- Spell checking of comments with flyspell
- Open documentation for state functions
- Navigation by state function
Just visit Salt state files. The major mode is enabled automatically for Salt
states with the extension
To enable flyspell for comments when using the mode:
(add-hook 'salt-mode-hook (lambda () (flyspell-mode 1)))
salt-mode-browse-doc to browse the documentation of the state module at point.
When run with a prefix argument, prompt for the state module to use.
If you have Python and the Salt Python modules installed, documentation may be viewed within Emacs via
C-c C-d (
salt-mode-describe-state) or ElDoc.
salt-mode-backward-state-function, bound by default to C-M-b and C-M-f, to navigate by salt function.
This package was originally authored by Ben Hayden; the current maintainer is Glynn Forrest.
test/init.el defines a minimal emacs configuration with the local salt-mode file loaded.
make dev to load it in a new emacs.
You can also use the .sls files in
test/ to test various mode functions.
(use-package salt-mode :ensure t :config (add-hook 'salt-mode-hook (lambda () (flyspell-mode 1))))
Salt-mode is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Salt-mode is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
COPYING for the complete license.