diff --git a/.gitmodules b/.gitmodules index d9d11dee..a0d875c8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -244,9 +244,6 @@ [submodule "vendor/grammars/abap.tmbundle"] path = vendor/grammars/abap.tmbundle url = https://github.com/pvl/abap.tmbundle -[submodule "vendor/grammars/Scalate.tmbundle"] - path = vendor/grammars/Scalate.tmbundle - url = https://github.com/scalate/Scalate.tmbundle [submodule "vendor/grammars/mercury-tmlanguage"] path = vendor/grammars/mercury-tmlanguage url = https://github.com/sebgod/mercury-tmlanguage @@ -523,3 +520,9 @@ [submodule "vendor/grammars/sas.tmbundle"] path = vendor/grammars/sas.tmbundle url = https://github.com/rpardee/sas.tmbundle +[submodule "vendor/grammars/atom-salt"] + path = vendor/grammars/atom-salt + url = https://github.com/saltstack/atom-salt +[submodule "vendor/grammars/Scalate.tmbundle"] + path = vendor/grammars/Scalate.tmbundle + url = https://github.com/scalate/Scalate.tmbundle diff --git a/grammars.yml b/grammars.yml index 5946966a..d0671c53 100644 --- a/grammars.yml +++ b/grammars.yml @@ -115,6 +115,9 @@ vendor/grammars/asp.tmbundle: vendor/grammars/assembly.tmbundle: - objdump.x86asm - source.x86asm +vendor/grammars/atom-salt: +- source.python.salt +- source.yaml.salt vendor/grammars/autoitv3-tmbundle: - source.autoit.3 vendor/grammars/awk-sublime: diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index bc7345fc..7130bc6d 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -2632,6 +2632,17 @@ Sage: tm_scope: source.python ace_mode: python +SaltStack: + type: data + group: YAML + aliases: + - saltstate + - salt + extensions: + - .sls + tm_scope: source.yaml.salt + ace_mode: yaml + Sass: type: markup tm_scope: source.sass diff --git a/samples/SaltStack/eval.sls b/samples/SaltStack/eval.sls new file mode 100644 index 00000000..f954c8cf --- /dev/null +++ b/samples/SaltStack/eval.sls @@ -0,0 +1,48 @@ +ceph: + pkg.installed: + - refresh: True + service: + - dead + - enable: False + - require: + - file: /etc/eval.conf + {% if grains['os'] == 'Ubuntu'%} + - file: /etc/apt/sources.list.d/ceph.list + {% endif %} + +ceph-mds: + pkg.installed: + - require: + - pkg: ceph + +include: + - ceph.extras + +{% if grains['os'] == 'Ubuntu'%} +/etc/apt/sources.list.d/ceph.list: + file.managed: + - source: salt://ceph/apt.list + - template: jinja + - require: + - cmd: repo-key + +repo-key: + cmd.run: + - name: 'wget -q -O - https://raw.github.com/release.asc | sudo apt-key add -' + - unless: 'apt-key list | grep -q -i ceph' +{% endif %} + +/etc/ceph/ceph.conf: + file.managed: + - source: salt://ceph/eval.conf + - template: jinja + - makedirs: true + +/var/lib/ceph: + file.directory: + - names: + {% for dir in 'mon.a','osd.0','osd.1','mds.a' %} + - /var/lib/ceph/{{ dir.split('.')[0] }}/ceph-{{ dir.split('.')[1] }} + {% endfor %} + - require: + - pkg: ceph diff --git a/samples/SaltStack/top.sls b/samples/SaltStack/top.sls new file mode 100644 index 00000000..12810e8e --- /dev/null +++ b/samples/SaltStack/top.sls @@ -0,0 +1,4 @@ +base: + '*': + - packages + - coffeestats diff --git a/samples/Scheme/lambdastar.sls b/samples/Scheme/lambdastar.sls new file mode 100644 index 00000000..7388b07f --- /dev/null +++ b/samples/Scheme/lambdastar.sls @@ -0,0 +1,46 @@ +(library (lambdastar) + (export (rename (lambda* lambda))) + (import (rnrs)) + +(define-syntax lambda* + (syntax-rules () + ((_ a* e* ...) + ( lambda*-h a* (let () e* ...))))) + +(define-syntax lambda*-h + (syntax-rules () + ((_ () e) + (lambda a* (if (null? a*) e (apply (e) a*)))) + ((_ (a a* ...) e) (posary-h (a a* ...) e)) + ((_ (a a* ... . rest) e) + (polyvariadic-h (a a* ... . rest) e)) + ((_ a* e) (lambda a* e)))) + +(define-syntax posary-h + (syntax-rules () + ((_ (a a* ...) e) + (letrec + ((rec + (case-lambda + (() rec) + ((a a* ...) e) + ((a a* ... . rest) + (apply (rec a a* ...) rest)) + (some (get-more rec some))))) + rec)))) + +(define-syntax polyvariadic-h + (syntax-rules () + ((_ (a a* ... . rest) e) + (letrec + ((rec + (case-lambda + (() rec) + ((a a* ... . rest) e) + (some (get-more rec some))))) + rec)))) + +(define get-more + (lambda (rec some) + (lambda more + (apply rec (append some more)))))) \ No newline at end of file diff --git a/vendor/grammars/atom-salt b/vendor/grammars/atom-salt new file mode 160000 index 00000000..6d6bdc1b --- /dev/null +++ b/vendor/grammars/atom-salt @@ -0,0 +1 @@ +Subproject commit 6d6bdc1be1a43201b5f78a4f89ea9bfc7416df11