{ "scopeName": "source.clojure", "fileTypes": [ "boot", "clj", "cljc", "cljs", "cljx", "clojure", "edn" ], "foldingStartMarker": "\\(\\s*$", "foldingStopMarker": "^\\s*\\)", "name": "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" }, { "include": "#whitespace" } ], "repository": { "comment": { "captures": { "1": { "name": "punctuation.definition.comment.clojure" } }, "match": "(;).*$\\n?", "name": "comment.line.semicolon.clojure" }, "constants": { "patterns": [ { "match": "(nil)(?=(\\s|\\)|\\]|\\}))", "name": "constant.language.nil.clojure" }, { "match": "(true|false)", "name": "constant.language.boolean.clojure" }, { "match": "(-?\\d+/\\d+)", "name": "constant.numeric.ratio.clojure" }, { "match": "(-?\\d+[rR][0-9a-zA-Z]+)", "name": "constant.numeric.arbitrary-radix.clojure" }, { "match": "(-?0[xX][0-9a-fA-F]+)", "name": "constant.numeric.hexadecimal.clojure" }, { "match": "(-?0\\d+)", "name": "constant.numeric.octal.clojure" }, { "match": "(-?\\d+\\.\\d+([eE][+-]?\\d+)?M)", "name": "constant.numeric.bigdecimal.clojure" }, { "match": "(-?\\d+\\.\\d+([eE][+-]?\\d+)?)", "name": "constant.numeric.double.clojure" }, { "match": "(-?\\d+N)", "name": "constant.numeric.bigint.clojure" }, { "match": "(-?\\d+)", "name": "constant.numeric.long.clojure" }, { "include": "#keyword" } ] }, "keyword": { "match": "(?<=(\\s|\\(|\\[|\\{)):[a-zA-Z0-9\\#\\.\\-\\_\\:\\+\\=\\>\\<\\/\\!\\?\\*]+(?=(\\s|\\)|\\]|\\}|\\,))", "name": "constant.keyword.clojure" }, "keyfn": { "patterns": [ { "match": "(?<=(\\s|\\(|\\[|\\{))(if(-[-a-z\\?]*)?|when(-[-a-z]*)?|for(-[-a-z]*)?|cond|do|let(-[-a-z\\?]*)?|binding|loop|recur|fn|throw[a-z\\-]*|try|catch|finally|([a-z]*case))(?=(\\s|\\)|\\]|\\}))", "name": "storage.control.clojure" }, { "match": "(?<=(\\s|\\(|\\[|\\{))(declare-?|(in-)?ns|import|use|require|load|compile|(def[a-z\\-]*))(?=(\\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": "(\\))(\\n)|(\\)(?=[\\}\\]\\)\\s]*(?:;|$)))|(\\))", "endCaptures": { "1": { "name": "punctuation.section.expression.end.trailing.clojure" }, "2": { "name": "meta.after-expression.clojure" }, "3": { "name": "punctuation.section.expression.end.trailing.clojure" }, "4": { "name": "punctuation.section.expression.end.clojure" } }, "name": "meta.quoted-expression.clojure", "patterns": [ { "include": "$self" } ] }, "regexp": { "begin": "#\\\"", "end": "\\\"", "name": "string.regexp.clojure", "patterns": [ { "include": "#regexp_escaped_char" } ] }, "regexp_escaped_char": { "match": "\\\\(\\\")", "name": "string.regexp.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": "(\\))(\\n)|(\\)(?=[\\}\\]\\)\\s]*(?:;|$)))|(\\))", "endCaptures": { "1": { "name": "punctuation.section.expression.end.trailing.clojure" }, "2": { "name": "meta.after-expression.clojure" }, "3": { "name": "punctuation.section.expression.end.trailing.clojure" }, "4": { "name": "punctuation.section.expression.end.clojure" } }, "name": "meta.expression.clojure", "patterns": [ { "begin": "(?<=\\()(ns|def|def-|defn|defn-|defvar|defvar-|defmacro|defmacro-|deftest)\\s+", "beginCaptures": { "1": { "name": "keyword.control.clojure" } }, "end": "(?=\\))", "name": "meta.definition.global.clojure", "patterns": [ { "include": "#metadata" }, { "include": "#dynamic-variables" }, { "match": "([\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\*][\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\*\\d]+)", "name": "entity.global.clojure" }, { "include": "$self" } ] }, { "include": "#keyfn" }, { "include": "#constants" }, { "include": "#vector" }, { "include": "#map" }, { "include": "#sexp" }, { "match": "(?<=\\()(.+?)(?=\\s|\\))", "captures": { "1": { "name": "entity.name.function.clojure" } }, "patterns": [ { "include": "$self" } ] }, { "include": "$self" } ] }, "shebang-comment": { "captures": { "1": { "name": "punctuation.definition.comment.shebang.clojure" } }, "match": "^(\\#!).*$\\n?", "name": "comment.line.semicolon.clojure" }, "string": { "begin": "(?\\<\\!\\?\\*][\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\*\\d]+)/", "captures": { "1": { "name": "meta.symbol.namespace.clojure" } } } ] }, "symbol": { "patterns": [ { "match": "([\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\*][\\w\\.\\-\\_\\:\\+\\=\\>\\<\\!\\?\\*\\d]+)", "name": "meta.symbol.clojure" } ] }, "var": { "match": "(?<=(\\s|\\(|\\[|\\{)\\#)'[a-zA-Z0-9\\.\\-\\_\\:\\+\\=\\>\\<\\/\\!\\?\\*]+(?=(\\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" } ] }, "whitespace": { "match": "\\s+$", "name": "invalid.trailing-whitespace" } } }