{ "information_for_contributors": [ "This file has been converted from https://github.com/atom/language-clojure/blob/master/grammars/clojure.cson", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/atom/language-clojure/commit/45bdb881501d0b8f8b707ca1d3fcc8b4b99fca03", "name": "Clojure", "scopeName": "source.clojure", "patterns": [ { "include": "#comment" }, { "include": "#shebang-comment" }, { "include": "#quoted-sexp" }, { "include": "#sexp" }, { "include": "#keyfn" }, { "include": "#string" }, { "include": "#vector" }, { "include": "#set" }, { "include": "#map" }, { "include": "#regexp" }, { "include": "#var" }, { "include": "#constants" }, { "include": "#dynamic-variables" }, { "include": "#metadata" }, { "include": "#namespace-symbol" }, { "include": "#symbol" } ], "repository": { "comment": { "begin": "(?\\<\\/\\!\\?\\*]+(?=(\\s|\\)|\\]|\\}|\\,))", "name": "constant.keyword.clojure" }, "keyfn": { "patterns": [ { "match": "(?<=(\\s|\\(|\\[|\\{))(if(-[-\\p{Ll}\\?]*)?|when(-[-\\p{Ll}]*)?|for(-[-\\p{Ll}]*)?|cond|do|let(-[-\\p{Ll}\\?]*)?|binding|loop|recur|fn|throw[\\p{Ll}\\-]*|try|catch|finally|([\\p{Ll}]*case))(?=(\\s|\\)|\\]|\\}))", "name": "storage.control.clojure" }, { "match": "(?<=(\\s|\\(|\\[|\\{))(declare-?|(in-)?ns|import|use|require|load|compile|(def[\\p{Ll}\\-]*))(?=(\\s|\\)|\\]|\\}))", "name": "keyword.control.clojure" } ] }, "dynamic-variables": { "match": "\\*[\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\d]+\\*", "name": "meta.symbol.dynamic.clojure" }, "map": { "begin": "(\\{)", "beginCaptures": { "1": { "name": "punctuation.section.map.begin.clojure" } }, "end": "(\\}(?=[\\}\\]\\)\\s]*(?:;|$)))|(\\})", "endCaptures": { "1": { "name": "punctuation.section.map.end.trailing.clojure" }, "2": { "name": "punctuation.section.map.end.clojure" } }, "name": "meta.map.clojure", "patterns": [ { "include": "$self" } ] }, "metadata": { "patterns": [ { "begin": "(\\^\\{)", "beginCaptures": { "1": { "name": "punctuation.section.metadata.map.begin.clojure" } }, "end": "(\\}(?=[\\}\\]\\)\\s]*(?:;|$)))|(\\})", "endCaptures": { "1": { "name": "punctuation.section.metadata.map.end.trailing.clojure" }, "2": { "name": "punctuation.section.metadata.map.end.clojure" } }, "name": "meta.metadata.map.clojure", "patterns": [ { "include": "$self" } ] }, { "begin": "(\\^)", "end": "(\\s)", "name": "meta.metadata.simple.clojure", "patterns": [ { "include": "#keyword" }, { "include": "$self" } ] } ] }, "quoted-sexp": { "begin": "(['``]\\()", "beginCaptures": { "1": { "name": "punctuation.section.expression.begin.clojure" } }, "end": "(\\))$|(\\)(?=[\\}\\]\\)\\s]*(?:;|$)))|(\\))", "endCaptures": { "1": { "name": "punctuation.section.expression.end.trailing.clojure" }, "2": { "name": "punctuation.section.expression.end.trailing.clojure" }, "3": { "name": "punctuation.section.expression.end.clojure" } }, "name": "meta.quoted-expression.clojure", "patterns": [ { "include": "$self" } ] }, "regexp": { "begin": "#\"", "beginCaptures": { "0": { "name": "punctuation.definition.regexp.begin.clojure" } }, "end": "\"", "endCaptures": { "0": { "name": "punctuation.definition.regexp.end.clojure" } }, "name": "string.regexp.clojure", "patterns": [ { "include": "#regexp_escaped_char" } ] }, "regexp_escaped_char": { "match": "\\\\.", "name": "constant.character.escape.clojure" }, "set": { "begin": "(\\#\\{)", "beginCaptures": { "1": { "name": "punctuation.section.set.begin.clojure" } }, "end": "(\\}(?=[\\}\\]\\)\\s]*(?:;|$)))|(\\})", "endCaptures": { "1": { "name": "punctuation.section.set.end.trailing.clojure" }, "2": { "name": "punctuation.section.set.end.clojure" } }, "name": "meta.set.clojure", "patterns": [ { "include": "$self" } ] }, "sexp": { "begin": "(\\()", "beginCaptures": { "1": { "name": "punctuation.section.expression.begin.clojure" } }, "end": "(\\))$|(\\)(?=[\\}\\]\\)\\s]*(?:;|$)))|(\\))", "endCaptures": { "1": { "name": "punctuation.section.expression.end.trailing.clojure" }, "2": { "name": "punctuation.section.expression.end.trailing.clojure" }, "3": { "name": "punctuation.section.expression.end.clojure" } }, "name": "meta.expression.clojure", "patterns": [ { "begin": "(?<=\\()(ns|declare|def[\\w\\d._:+=>\\<\\!\\?\\*][\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\*\\d]*)", "name": "entity.global.clojure" }, { "include": "$self" } ] }, { "include": "#keyfn" }, { "include": "#constants" }, { "include": "#vector" }, { "include": "#map" }, { "include": "#set" }, { "include": "#sexp" }, { "match": "(?<=\\()(.+?)(?=\\s|\\))", "captures": { "1": { "name": "entity.name.function.clojure" } }, "patterns": [ { "include": "$self" } ] }, { "include": "$self" } ] }, "shebang-comment": { "begin": "^(#!)", "beginCaptures": { "1": { "name": "punctuation.definition.comment.shebang.clojure" } }, "end": "$", "name": "comment.line.shebang.clojure" }, "string": { "begin": "(?\\<\\!\\?\\*][\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\*\\d]*)/", "captures": { "1": { "name": "meta.symbol.namespace.clojure" } } } ] }, "symbol": { "patterns": [ { "match": "([\\p{L}\\.\\-\\_\\+\\=\\>\\<\\!\\?\\*][\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\*\\d]*)", "name": "meta.symbol.clojure" } ] }, "var": { "match": "(?<=(\\s|\\(|\\[|\\{)\\#)'[\\w\\.\\-\\_\\:\\+\\=\\>\\<\\/\\!\\?\\*]+(?=(\\s|\\)|\\]|\\}))", "name": "meta.var.clojure" }, "vector": { "begin": "(\\[)", "beginCaptures": { "1": { "name": "punctuation.section.vector.begin.clojure" } }, "end": "(\\](?=[\\}\\]\\)\\s]*(?:;|$)))|(\\])", "endCaptures": { "1": { "name": "punctuation.section.vector.end.trailing.clojure" }, "2": { "name": "punctuation.section.vector.end.clojure" } }, "name": "meta.vector.clojure", "patterns": [ { "include": "$self" } ] } } }