diff --git a/.gitmodules b/.gitmodules index 5c0588bc..fe68f3d7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -531,3 +531,6 @@ [submodule "vendor/grammars/sass-textmate-bundle"] path = vendor/grammars/sass-textmate-bundle url = https://github.com/nathos/sass-textmate-bundle +[submodule "vendor/grammars/carto-atom"] + path = vendor/grammars/carto-atom + url = https://github.com/yohanboniface/carto-atom diff --git a/grammars.yml b/grammars.yml index 8bfbf4dc..222859f1 100644 --- a/grammars.yml +++ b/grammars.yml @@ -136,6 +136,8 @@ vendor/grammars/c.tmbundle: - source.c.platform vendor/grammars/capnproto.tmbundle: - source.capnp +vendor/grammars/carto-atom: +- source.css.mss vendor/grammars/ceylon-sublimetext: - module.ceylon - source.ceylon diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 9005eabb..d8cd6824 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -450,12 +450,13 @@ Cap'n Proto: ace_mode: text CartoCSS: + type: programming aliases: - Carto extensions: - .mss ace_mode: text - tm_scope: none + tm_scope: source.css.mss Ceylon: type: programming diff --git a/script/convert-grammars b/script/convert-grammars index 7f3a0ee9..4b16dff4 100755 --- a/script/convert-grammars +++ b/script/convert-grammars @@ -44,7 +44,7 @@ class DirectoryPackage path.split('/')[-2] == 'Syntaxes' when '.tmlanguage' true - when '.cson' + when '.cson', '.json' path.split('/')[-2] == 'grammars' else false @@ -152,6 +152,8 @@ def load_grammar(path) cson = `"#{CSONC}" "#{path}"` raise "Failed to convert CSON grammar '#{path}': #{$?.to_s}" unless $?.success? JSON.parse(cson) + when '.json' + JSON.parse(File.read(path)) else raise "Invalid document type #{path}" end diff --git a/vendor/grammars/carto-atom b/vendor/grammars/carto-atom new file mode 160000 index 00000000..8086625a --- /dev/null +++ b/vendor/grammars/carto-atom @@ -0,0 +1 @@ +Subproject commit 8086625aa5deac4ccd7374644b89e715deec2f7f