vmware-archive / sublime-text

Salt-related syntax highlighting and snippets for Sublime Text
Other
54 stars 10 forks source link

Import/sync snippets from vscode #19

Open mchugh19 opened 4 years ago

mchugh19 commented 4 years ago

In https://github.com/korekontrol/vscode-saltstack/pull/6 and a few subsequent PRs, snippets were added to the saltstack VSCode extension.

The json snippets were generated from salt, so they include all potential state names. These json snippets could be converted to sublime's format, or the generator scripts could be used to do the same task for sublime.

The vast majority of the snippets do not contain any state specific handling and just autocomplete the potential state function names. But the generator script only ensures that state names are added, so any customizations there in are retained. Thus, the workflow is that the generation script can be run for any new saltstack release to capture any state additions. If there are any customizations desired, they can be manually edited into the json snippets (see file.manage)