{"id":13862660,"url":"https://github.com/glynnforrest/salt-mode","last_synced_at":"2025-10-25T11:31:26.775Z","repository":{"id":143268481,"uuid":"80295073","full_name":"glynnforrest/salt-mode","owner":"glynnforrest","description":"Emacs major mode for Salt States","archived":false,"fork":false,"pushed_at":"2024-07-24T21:09:29.000Z","size":62,"stargazers_count":22,"open_issues_count":2,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-31T07:04:06.264Z","etag":null,"topics":["emacs","salt","saltstack"],"latest_commit_sha":null,"homepage":null,"language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/glynnforrest.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-28T16:26:17.000Z","updated_at":"2023-07-20T05:58:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"d7446e0a-9709-47bf-adf2-13e20a09c4f8","html_url":"https://github.com/glynnforrest/salt-mode","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glynnforrest%2Fsalt-mode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glynnforrest%2Fsalt-mode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glynnforrest%2Fsalt-mode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glynnforrest%2Fsalt-mode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/glynnforrest","download_url":"https://codeload.github.com/glynnforrest/salt-mode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238128553,"owners_count":19421053,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["emacs","salt","saltstack"],"created_at":"2024-08-05T06:01:49.556Z","updated_at":"2025-10-25T11:31:21.487Z","avatar_url":"https://github.com/glynnforrest.png","language":"Emacs Lisp","funding_links":[],"categories":["Emacs Lisp"],"sub_categories":[],"readme":"# Salt-mode\n\n[![License GPL 3][badge-license]][copying]\n[![Build Status][badge-travis]][travis]\n[![MELPA Badge][badge-melpa]][melpa]\n[![MELPA Stable Badge][badge-melpa-stable]][melpa-stable]\n\nSalt-mode is a [GNU Emacs][] major mode for editing [SaltStack][] state files.\n\n[Salt] is a Python-based configuration management and orchestration\nsystem built on top of a high-speed remote execution engine.\nConfiguration management is most commonly managed by writing state files ending with `.sls`;\nthis mode adds emacs support for these files.\n\nSalt-mode requires a minimum emacs version of 24.4.\n\nThis uses [mmm-mode][] and [mmm-jinja2][] to hook up Jinja2 templates into YAML (essentially what SaltStack files are).\n\n## Features\n\n* Syntax highlighting\n* Indentation and alignment of expressions and statements\n* Jinja Templating Support\n* Spell checking of comments with flyspell\n* Open documentation for state functions\n* Navigation by state function\n\n## Installation\n\nFrom [MELPA][] or [MELPA Stable][] with \u003ckbd\u003eM-x package-install RET\nsalt-mode\u003c/kbd\u003e.\n\n## Usage\n\nJust visit Salt state files. The major mode is enabled automatically for Salt\nstates with the extension `.sls`.\n\n### Flyspell\n\nTo enable flyspell for comments when using the mode:\n\n```elisp\n(add-hook 'salt-mode-hook\n        (lambda ()\n            (flyspell-mode 1)))\n```\n\n### State documentation\n\nUse `salt-mode-browse-doc` to browse the documentation of the state module at point.\n\nWhen run with a prefix argument, prompt for the state module to use.\n\nIf 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.\nYou don't need a Salt minion running for these to work.\n\n### Function jumping\n\nUse `salt-mode-forward-state-function` and `salt-mode-backward-state-function`, bound by default to \u003ckbd\u003eC-M-b\u003c/kbd\u003e and \u003ckbd\u003eC-M-f\u003c/kbd\u003e, to navigate by salt function.\n\n### Font locking\n\nDifferent font lock keywords are used depending on the value of `salt-mode--file-type`, a variable which represents the 'type' of the SLS file. This either be `'top` for top files or `'salt` for everything else.\n\nThe value of `salt-mode--file-type` is detected automatically when a file is opened. You can override this by calling the function `salt-mode-set-file-type`.\n\nFuture types are planned for other keywords, e.g. orchestrate and reactor files.\n\n## Troubleshooting\n\n`salt-mode-describe-state` and ElDoc will only work when your system has Python and the Salt Python modules installed.\n\nIf you have the dependencies installed and these features aren't working, try running `salt-mode-refresh-data` without arguments.\nYou may need to set `salt-mode-python-program` to `python2` or `python3` depending on your system's configuration.\n\nThe mode should work without error if you don't have these dependencies installed.\nVisible error messages are a bug (e.g. https://github.com/glynnforrest/salt-mode/issues/18), please report them.\n\n## Support\n\nFeel free to ask questions or make suggestions in the [issue tracker][] on [github][].\n\nThis package was originally authored by Ben Hayden; the current maintainer is Glynn Forrest.\n\n## Development\n\n`test/init.el` defines a minimal emacs configuration with the local salt-mode file loaded.\n\nRun `make dev` to load it in a new emacs.\n\nYou can also use the .sls files in `test/` to test various mode functions.\n\n## Example configuration\n\nWith [`use-package`][use-package]:\n\n```elisp\n(use-package salt-mode\n  :ensure t\n  :config\n  (add-hook 'salt-mode-hook\n            (lambda ()\n              (flyspell-mode 1))))\n```\n\n## Contributors\n\n- [Ben Hayden](https://github.com/deybhayden)\n- [Glynn Forrest](https://github.com/glynnforrest)\n- [Joe Wreschnig](https://github.com/joewreschnig)\n- [Thibault Polge](https://github.com/thblt)\n- [Max Arnold](https://github.com/max-arnold)\n\n## License\n\nSalt-mode is free software: you can redistribute it and/or modify it under the\nterms of the GNU General Public License as published by the Free Software\nFoundation, either version 3 of the License, or (at your option) any later\nversion.\n\nSalt-mode is distributed in the hope that it will be useful, but WITHOUT ANY\nWARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A\nPARTICULAR PURPOSE. See the GNU General Public License for more details.\n\nSee [`COPYING`][copying] for the complete license.\n\n[badge-license]: https://img.shields.io/badge/license-GPL_3-green.svg\n[COPYING]: https://github.com/glynnforrest/salt-mode/blob/master/COPYING\n[badge-travis]: https://travis-ci.org/glynnforrest/salt-mode.svg?branch=master\n[travis]: https://travis-ci.org/glynnforrest/salt-mode\n[badge-melpa]: https://melpa.org/packages/salt-mode-badge.svg\n[melpa]: https://melpa.org/#/salt-mode\n[badge-melpa-stable]: https://stable.melpa.org/packages/salt-mode-badge.svg\n[melpa-stable]: https://stable.melpa.org/#/salt-mode\n\n[Salt]: https://docs.saltstack.com/en/latest/\n[SaltStack]: https://saltstack.com/\n[GNU Emacs]: https://www.gnu.org/software/emacs/\n[MELPA]: https://melpa.org/\n[MELPA Stable]: https://stable.melpa.org/\n[Issue tracker]: https://github.com/glynnforrest/salt-mode/issues\n[Github]: https://github.com/glynnforrest/salt-mode\n[mmm-mode]: https://github.com/purcell/mmm-mode\n[mmm-jinja2]: https://github.com/glynnforrest/mmm-jinja2\n[use-package]: https://github.com/jwiegley/use-package\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglynnforrest%2Fsalt-mode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglynnforrest%2Fsalt-mode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglynnforrest%2Fsalt-mode/lists"}