local colors = require("cyberdream.colors") local util = require("cyberdream.util") local M = {} --- Generate cyberdream theme for textmate. --- @param variant string: Variation of the colorscheme to use. function M.generate(variant) local template = [==[ name Cyberdream settings settings background ${bg} caret ${fg} block_caret ${grey} foreground ${fg} invisibles ${bg} lineHighlight ${bg_highlight} selection ${bg_highlight} findHighlight ${cyan} findHighlightForeground ${bg_alt} selectionBorder ${bg} activeGuide ${orange} bracketsForeground ${pink} bracketsOptions underline bracketContentsForeground ${fg} bracketContentsOptions underline tagsOptions stippled_underline name Comment scope comment settings foreground ${grey} fontStyle name String scope string settings foreground ${green} name Number scope constant.numeric settings foreground ${fg} name Built-in constant scope constant.language settings foreground ${fg} name User-defined constant scope constant.character, constant.other settings foreground ${fg} name Variable scope variable settings fontStyle name Ruby's @variable scope variable.other.readwrite.instance settings fontStyle foreground ${orange} name String interpolation scope constant.character.escaped, constant.character.escape, string source, string source.ruby settings fontStyle foreground #ff5ef1 name Ruby Regexp scope source.ruby string.regexp.classic.ruby,source.ruby string.regexp.mod-r.ruby settings fontStyle foreground #ff6e5e name Keyword scope keyword settings foreground ${orange} name Keyword Operator scope keyword.operator settings foreground ${purple} name Storage scope storage settings fontStyle foreground ${pink} name Storage type scope storage.type settings fontStyle italic foreground ${cyan} name Storage Type Namespace scope storage.type.namespace settings fontStyle italic foreground ${purple} name Storage Type Class scope storage.type.class settings fontStyle italic foreground ${purple} name Class name scope entity.name.class settings fontStyle underline foreground ${purple} name Meta Path scope meta.path settings fontStyle underline foreground ${cyan} name Inherited class scope entity.other.inherited-class settings fontStyle italic underline foreground ${purple} name Function name scope entity.name.function settings fontStyle foreground ${blue} name Function argument scope variable.parameter settings fontStyle italic foreground ${purple} name Tag name scope entity.name.tag settings fontStyle foreground ${cyan} name Tag attribute scope entity.other.attribute-name settings fontStyle foreground ${cyan} name Library function scope support.function settings fontStyle foreground ${blue} name Library constant scope support.constant settings fontStyle foreground ${fg} name Library class/type scope support.type, support.class settings fontStyle italic foreground ${purple} name Library variable scope support.other.variable settings fontStyle name Support Other Namespace scope support.other.namespace settings fontStyle italic foreground ${purple} name Invalid scope invalid settings background ${pink} fontStyle foreground ${fg} name Invalid deprecated scope invalid.deprecated settings background ${purple} foreground ${fg} name JSON String scope meta.structure.dictionary.json string.quoted.double.json settings foreground ${fg} name diff.header scope meta.diff, meta.diff.header settings foreground ${grey} name diff.deleted scope markup.deleted settings foreground #ff6e5e name diff.inserted scope markup.inserted settings foreground ${green} name diff.changed scope markup.changed settings foreground ${cyan} scope constant.numeric.line-number.find-in-files - match settings foreground #ff5ef1 scope entity.name.filename settings foreground ${green} scope message.error settings foreground #ff6e5e name JSON Punctuation scope punctuation.definition.string.begin.json - meta.structure.dictionary.value.json, punctuation.definition.string.end.json - meta.structure.dictionary.value.json settings foreground ${fg} name JSON Structure scope meta.structure.dictionary.json string.quoted.double.json settings foreground ${fg} name JSON String scope meta.structure.dictionary.value.json string.quoted.double.json settings foreground ${fg} name JSON: 6 deep scope meta meta meta meta meta meta meta.structure.dictionary.value string settings foreground ${pink} name JSON: 5 deep scope meta meta meta meta meta meta.structure.dictionary.value string settings foreground #ff5ef1 name JSON: 4 deep scope meta meta meta meta meta.structure.dictionary.value string settings foreground ${purple} name JSON: 3 deep scope meta meta meta meta.structure.dictionary.value string settings foreground ${blue} name JSON: 2 deep scope meta meta meta.structure.dictionary.value string settings foreground ${cyan} name JSON: 1 deep scope meta meta.structure.dictionary.value string settings foreground ${orange} name Markup: strike scope markup.strike settings fontStyle italic foreground ${orange} name Markup: bold scope markup.bold settings fontStyle bold foreground ${orange} name Markup: italic scope markup.italic settings fontStyle italic foreground ${orange} name Markdown: heading scope markup.heading settings foreground ${orange} name Markdown: List Items Punctuation scope punctuation.definition.list_item.markdown settings foreground ${pink} name Markdown: Blockquote scope markup.quote settings fontStyle italic foreground ${fg} name Markdown: Blockquote Punctuation scope punctuation.definition.blockquote.markdown settings fontStyle italic foreground ${fg} name Markdown: Separator scope meta.separator settings foreground ${grey} name Markup: raw inline scope text.html.markdown markup.raw.inline settings foreground ${green} name Markup: underline scope markup.underline settings fontStyle underline foreground ${purple} name Markup: Raw block scope markup.raw.block settings foreground ${fg} name Markdown: Raw Block fenced source scope markup.raw.block.fenced.markdown source settings foreground ${fg} name Markdown: Fenced Bode Block scope punctuation.definition.fenced.markdown, variable.language.fenced.markdown settings fontStyle italic foreground ${grey} name Markdown: Fenced Language scope variable.language.fenced.markdown settings fontStyle italic foreground ${grey} name Punctuation Accessor scope punctuation.accessor settings foreground ${pink} name Meta Function Return Type scope meta.function.return-type settings foreground ${purple} name Punctuation Section Block Begin scope punctuation.section.block.begin settings foreground ${fg} name Punctuation Section Block End scope punctuation.section.block.end settings foreground ${fg} name Punctuation Section Embedded Begin scope punctuation.section.embedded.begin settings foreground ${pink} name Punctuation Section Embedded End scope punctuation.section.embedded.end settings foreground ${pink} name Punctuation Separator Namespace scope punctuation.separator.namespace settings foreground ${pink} name Variable Function scope variable.function settings foreground ${blue} name Variable Other scope variable.other settings foreground ${fg} name Variable Language scope variable.language settings foreground ${purple} name Entity Name Module Ruby scope entity.name.module.ruby settings foreground ${cyan} name Entity Name Constant Ruby scope entity.name.constant.ruby settings foreground ${blue} name Support Function Builtin Ruby scope support.function.builtin.ruby settings foreground ${fg} name Storage Type Namespace CS scope storage.type.namespace.cs settings foreground ${pink} name Entity Name Namespace CS scope entity.name.namespace.cs settings foreground ${cyan} uuid 68394a4e-1404-4971-bdfc-81dd7f9d29f6 colorSpaceName sRGB semanticClass theme.cyberdream author Scott McKendry ]==] return util.parse_extra_template(template, colors[variant]) end return M