ADDED misc/grammalecte.sublime-color-scheme Index: misc/grammalecte.sublime-color-scheme ================================================================== --- /dev/null +++ misc/grammalecte.sublime-color-scheme @@ -0,0 +1,110 @@ +{ + "name": "Grammalecte Color Scheme", + "globals": + { + "background": "hsl(210, 20%, 14%)", + "foreground": "hsl(210, 20%, 95%)", + + "caret": "hsl(210, 20%, 80%)", + "block_caret": "red", + "line_highlight": "hsl(210, 60%, 30%)", + "bracket_options": "underline bold", + + "selection": "hsl(210, 50%, 20%)", + "selection_border": "hsl(210, 80%, 40%)", + "selection_border_width": "1", + "selection_corner_style": "cut", + "selection_corner_radius": "4", + + "invisibles": "hsl(210, 20%, 40%)", + + "highlight": "hsl(210, 100%, 60%)" + }, + "rules": + [ + { "name": "Options command", "scope": "options.command", "foreground": "#50F0A0", "font_style": "bold", }, + { "name": "Options parameter", "scope": "options.parameter", "foreground": "#70B0F0", "font_style": "bold", }, + + { "name": "Comment", "scope": "comment", "foreground": "hsl(210, 10%, 50%)" }, + { "name": "Bookmark", "scope": "bookmark", "foreground": "#A0F0FF", "background": "#0050A0", }, + { "name": "Graphline", "scope": "graphline", "foreground": "hsl(0, 100%, 80%)", "background": "hsl(0, 100%, 20%)", "font_style": "bold", }, + { "name": "Error message", "scope": "string.message", "foreground": "hsl(0, 50%, 65%)", }, + { "name": "Error message", "scope": "string.escape", "foreground": "hsl(0, 50%, 85%)", }, + { "name": "Test header", "scope": "test.header", "foreground": "hsl(150, 100%, 60%)", "font_style": "bold" }, + { "name": "Test option", "scope": "test.error", "foreground": "hsl(0, 90%, 67%)", }, + { "name": "Todo", "scope": "todo", "foreground": "hsl(20, 90%, 60%)", "font_style": "bold", }, + + { "name": "Entity brackets", "scope": "entity.brackets", "foreground": "#90A0A0", "background": "#203030", }, + { "name": "Entity parenthesis", "scope": "entity.parenthesis", "foreground": "#A0A0C0", "background": "#303035", }, + + { "name": "Entity Action", "scope": "entity.action", "foreground": "#20F0F0", "background": "#204040", "font_style": "bold", }, + { "name": "Entity Condi Green", "scope": "entity.cond.green", "foreground": "#20F020", "background": "#204020", "font_style": "bold", }, + { "name": "Entity Condi Red", "scope": "entity.cond.red", "foreground": "#F02020", "background": "#402020", "font_style": "bold", }, + { "name": "Entity error", "scope": "entity.error", "foreground": "#FF7070", "background": "#602020", "font_style": "bold", }, + { "name": "Entity error group", "scope": "entity.error.group", "foreground": "#F0F060", "background": "#602020", "font_style": "bold", }, + { "name": "Entity tag", "scope": "entity.tag", "foreground": "#FF70FF", "background": "#602060", "font_style": "bold", }, + { "name": "Entity tag group", "scope": "entity.tag.group", "foreground": "#F0B0F0", "background": "#602060", "font_style": "bold", }, + { "name": "Entity tproc", "scope": "entity.tproc", "foreground": "#30FF30", "background": "#204020", "font_style": "bold", }, + { "name": "Entity tproc group", "scope": "entity.tproc.group", "foreground": "#F0F0A0", "background": "#204020", "font_style": "bold", }, + { "name": "Entity disambiguator", "scope": "entity.disambiguator","foreground": "#FF9020", "background": "#704010", "font_style": "bold", }, + + { "name": "Rule options", "scope": "rule.options", "foreground": "#F0A020", "font_style": "bold", }, + { "name": "Rule casing", "scope": "rule.casing", "foreground": "#30C0F0", "font_style": "bold", }, + { "name": "Rule action option", "scope": "rule.actionoption", "foreground": "hsl(0, 50%, 50%)", "background": "hsl(330, 50%, 20%)", "font_style": "bold", }, + { "name": "Rule option name", "scope": "rule.optionname", "foreground": "hsl(330, 80%, 80%)", "background": "hsl(330, 60%, 20%)", "font_style": "bold", }, + { "name": "Rule name (regex)", "scope": "rule.rulename_regex", "foreground": "#A0A0A0", "font_style": "italic", }, + { "name": "Rule name (graph)", "scope": "rule.rulename_graph", "foreground": "#F0D080", }, + { "name": "Rule priority", "scope": "rule.priority", "foreground": "#F06060", }, + + { "name": "Entity Valid", "scope": "entity.valid", "foreground": "hsl(150, 100%, 80%)", "background": "hsl(150, 100%, 20%)", "font_style": "bold", }, + { "name": "Entity Invalid", "scope": "entity.invalid", "foreground": "hsl(0, 100%, 80%)", "background": "hsl(0, 100%, 20%)", "font_style": "bold", }, + { "name": "String meta", "scope": "string.meta", "foreground": "hsl(270, 100%, 90%)", "background": "hsl(270, 100%, 40%)", }, + { "name": "String token", "scope": "string.token", "foreground": "hsl(240, 50%, 90%)", "background": "hsl(240, 50%, 40%)", }, + { "name": "String Jumptoken", "scope": "string.jumptoken", "foreground": "hsl(0, 50%, 90%)", "background": "hsl(10, 50%, 40%)", }, + { "name": "String lemma", "scope": "string.lemma", "foreground": "hsl(210, 100%, 80%)", "background": "hsl(210, 100%, 15%)", }, + { "name": "String tag", "scope": "string.tag", "foreground": "hsl(30, 100%, 90%)", "background": "hsl(30, 100%, 20%)", }, + { "name": "String regex", "scope": "string.regex", "foreground": "hsl(60, 100%, 80%)", "background": "hsl(60, 100%, 10%)", }, + { "name": "String morph regex", "scope": "string.morph.regex", "foreground": "hsl(150, 80%, 90%)", "background": "hsl(150, 80%, 10%)", }, + { "name": "String morph negregex","scope": "string.morph.negregex","foreground": "hsl(0, 80%, 90%)", "background": "hsl(0, 80%, 10%)", }, + + + { "name": "Keyword Python", "scope": "keyword.python", "foreground": "#A0A0A0", }, + + { "name": "Keyword", "scope": "keyword - (source.c keyword.operator | source.c++ keyword.operator | source.objc keyword.operator | source.objc++ keyword.operator), keyword.operator.word", "foreground": "#F06070", }, + { "name": "String", "scope": "string", "foreground": "hsl(60, 80%, 75%)", }, + { "name": "Number", "scope": "constant.numeric", "foreground": "hsl(270, 100%, 70%)", "font_style": "bold", }, + + + { "name": "Built-in constant", "scope": "constant.language", "foreground": "#AE81FF", "font_style": "italic", }, + { "name": "User-defined constant", "scope": "constant.character, constant.other", "foreground": "#AE81FF", }, + + { "name": "Storage", "scope": "storage", "foreground": "#F92672", "font_style": "bold", }, + { "name": "Storage type", "scope": "storage.type", "foreground": "#66D9EF", "font_style": "italic", }, + { "name": "Entity name", "scope": "entity.name - (entity.name.filename | entity.name.section | entity.name.tag | entity.name.label)", "foreground": "#A0E030", "font_style": "", }, + { "name": "Inherited inherited-class", "scope": "entity.other.inherited-class", "foreground": "#A6E22E", "font_style": "italic underline", }, + { "name": "Function argument", "scope": "variable.parameter - (source.c | source.c++ | source.objc | source.objc++)", "foreground": "#FD971F", "font_style": "italic", }, + { "name": "Language variable", "scope": "variable.language", "foreground": "#FD971F", "font_style": "italic", }, + { "name": "Tag name", "scope": "entity.name.tag", "foreground": "#F92672", "font_style": "", }, + { "name": "Tag attribute", "scope": "entity.other.attribute-name", "foreground": "#A6E22E", "font_style": "", }, + { "name": "Function call", "scope": "variable.function", "foreground": "#66D9EF", "font_style": "", }, + { "name": "Library function", "scope": "support.function", "foreground": "#66D9EF", "font_style": "", }, + { "name": "Library function debug", "scope": "support.function.debug", "foreground": "#F0F060", "background": "#A05000", "font_style": "", }, + { "name": "Library constant", "scope": "support.constant", "foreground": "#66D9EF", "font_style": "", }, + { "name": "Library class/type", "scope": "support.type, support.class", "foreground": "#66D9EF", "font_style": "italic", }, + { "name": "Library variable", "scope": "support.other.variable", "font_style": "", }, + + { "name": "JavaScript Dollar", "scope": "variable.other.dollar.only.js", "foreground": "#F92672", }, + { "name": "Definition", "scope": "definition", "foreground": "#70B0F0", "font_style": "bold", }, + { "name": "Variable", "scope": "variable", "font_style": "", }, + { "name": "Invalid", "scope": "invalid", "foreground": "#F8F8F0", "background": "#F92672", "font_style": "", }, + { "name": "Invalid deprecated", "scope": "invalid.deprecated", "foreground": "#F8F8F0", "background": "#AE81FF", }, + { "name": "JSON String", "scope": "meta.structure.dictionary.json string.quoted.double.json", "foreground": "#CFCFC2", }, + { "name": "YAML String", "scope": "string.unquoted.yaml", "foreground": "#F8F8F2", }, + { "name": "diff.header", "scope": "meta.diff, meta.diff.header", "foreground": "#75715E", }, + { "name": "diff.deleted", "scope": "markup.deleted", "foreground": "#FF5050", "font_style": "underline", }, + { "name": "diff.inserted", "scope": "markup.inserted", "foreground": "#A6E22E", }, + { "name": "diff.changed", "scope": "markup.changed", "foreground": "#E6DB74", }, + { "scope": "constant.numeric.line-number.find-in-files - match", "foreground": "#AE81FFA0", }, + { "scope": "entity.name.filename", "foreground": "#E6DB74", }, + ] +} Index: misc/grammalecte.sublime-syntax ================================================================== --- misc/grammalecte.sublime-syntax +++ misc/grammalecte.sublime-syntax @@ -12,26 +12,32 @@ - match: '"[^"]*"' scope: string.quoted.double #push: double_quoted_string # Comments begin with a '#' and finish at the end of the line - - match: '#' - scope: punctuation.definition.comment - push: line_comment + - match: '^#.*' + scope: comment + + # Error message + - match: '(?<= )#[^|]+' + scope: string.message + push: + - match: '\\-?[0-9]+' + scope: string.message.escape + - match: '\| ?https?://[\w./%?&=#+-]+' + scope: string.other + - match: $ + pop: true # Numbers - match: '\b(-)?[0-9.]+\b' scope: constant.numeric # Bookmarks - match: '^!!.*|^\[\+\+\].*' scope: bookmark - # Bookmarks - - match: '^GRAPH_NAME:.*' - scope: bookmark - # Graph - match: '^@@@@GRAPH: *(\w+) .*$' scope: graphline captures: 1: string.graphname @@ -66,18 +72,18 @@ - match: '^__[\[<]([isu])[\]>](/\w+|)(\(\w+\)|)(![0-9]|)__|' scope: rule.options captures: 1: rule.casing 2: rule.optionname - 3: rule.rulename + 3: rule.rulename_regex 4: rule.priority # Graph rules option - match: '^__(\w+)(![0-9]|)__' scope: rule.options captures: - 1: rule.rulename2 + 1: rule.rulename_graph 2: rule.priority - match: '/(\w+)/' scope: rule.actionoption captures: @@ -93,11 +99,14 @@ - match: '^DEF: ' scope: definition # Tests & TODO - match: '^TEST: (?:__[a-zA-Z0-9]+__ |)' - scope: test + scope: test.header + + - match: '{{.+?}}' + scope: test.error - match: '^TODO: ' scope: todo # JS groups positioning codes @@ -104,67 +113,67 @@ - match: ' @@[0-9w,$*>:]+' scope: comment.line.percentage # rule delimiters - match: '<<-|>>>' - scope: keyword.action + scope: entity.action - match: '__also__' - scope: keyword.condition.green + scope: entity.cond.green - match: '__else__' - scope: keyword.condition.red + scope: entity.cond.red - match: '-(-?\d*\.?(?::\.?-?\d+|))(?::|)>>' - scope: keyword.error + scope: entity.error captures: - 1: keyword.error.group + 1: entity.error.group - match: '~(-?\d*(?::-?\d+|))>>' - scope: keyword.textprocessor + scope: entity.tproc captures: - 1: keyword.textprocessor.group + 1: entity.tproc.group - match: '=>>' - scope: keyword.disambiguator + scope: entity.disambiguator - match: '/(-?\d*(?::-?\d+|))>>' - scope: keyword.tag + scope: entity.tag captures: - 1: keyword.tag.group + 1: entity.tag.group - match: '!(-?\d*(?::-?\d+|))>>' - scope: keyword.tag + scope: entity.tag captures: - 1: keyword.tag.group + 1: entity.tag.group # Tokens - match: '(>)[\w-]+' scope: string.lemma captures: - 1: keyword.valid + 1: entity.valid - match: '(~)(?!(?:\d+(?::\d+|)|)>>)[^\s¬]*' scope: string.regex captures: - 1: keyword.valid + 1: entity.valid - match: '(@)([^@\s¬]*)' scope: string.morph captures: - 1: keyword.valid - 2: string.morph.pattern + 1: entity.valid + 2: string.morph.regex - match: '(/)[\w-]+' scope: string.tag captures: - 1: keyword.valid + 1: entity.valid - match: '(?<=[^\w])([*][a-zA-Z0-9_]+)' scope: string.morph captures: - 1: keyword.valid + 1: entity.valid 2: string.meta - match: '(¬)(\S+)' scope: string.morph captures: - 1: keyword.invalid - 2: string.morph.antipattern + 1: entity.invalid + 2: string.morph.negregex - match: '<(?:start|end)>' scope: string.token - match: '<>' @@ -176,35 +185,14 @@ # URL - match: '\| ?https?://[\w./%?&=#+-]+' scope: string.other - # Example errors - - match: '{{.+?}}' - scope: message.error - # special chars - match: '[@=*^?¿!:+<>~]' scope: keyword.other - match: '\(\?(?:[:=!]| - - - - name - Monokai for Grammalecte - settings - - - settings - - background - #202025 - caret - #BFFFFF - foreground - #F8F8F2 - invisibles - #3B3A32 - lineHighlight - #004060 - selection - #003050 - findHighlight - #FFFF00 - findHighlightForeground - #000000 - selectionBorder - #006080 - activeGuide - #9D550FB0 - - bracketsForeground - #F8F8F2A5 - bracketsOptions - underline - - bracketContentsForeground - #F8F8F2A5 - bracketContentsOptions - underline - - tagsOptions - stippled_underline - - - - name - Comment - scope - comment - settings - - foreground - #607080 - - - - name - Bookmark - scope - bookmark - settings - - foreground - #A0F0FF - background - #0050A0 - - - - name - Graphline - scope - graphline - settings - - foreground - hsl(0, 100%, 80%) - background - hsl(0, 100%, 20% - fontStyle - bold - - - - name - String - scope - string - settings - - foreground - #E6DB74 - - - - - name - Number - scope - constant.numeric - settings - - foreground - #AE81FF - - - - - name - Built-in constant - scope - constant.language - settings - - foreground - #AE81FF - fontStyle - italic - - - - name - User-defined constant - scope - constant.character, constant.other - settings - - foreground - #AE81FF - - - - name - Variable - scope - variable - settings - - fontStyle - - - - - name - Keyword - scope - keyword - (source.c keyword.operator | source.c++ keyword.operator | source.objc keyword.operator | source.objc++ keyword.operator), keyword.operator.word - settings - - foreground - #F06070 - - - - name - Keyword brackets - scope - keyword.brackets - settings - - foreground - #90A0A0 - background - #203030 - - - - name - Keyword parenthesis - scope - keyword.parenthesis - settings - - foreground - #A0A0C0 - background - #303035 - - - - name - Keyword Action - scope - keyword.action - settings - - foreground - #20F0F0 - background - #204040 - fontStyle - bold - - - - name - Keyword Condition Green - scope - keyword.condition.green - settings - - foreground - #20F020 - background - #204020 - - - - name - Keyword Condition Red - scope - keyword.condition.red - settings - - foreground - #F02020 - background - #402020 - - - - name - Keyword error - scope - keyword.error - settings - - foreground - #FF7070 - background - #602020 - fontStyle - bold - - - - name - Keyword error group - scope - keyword.error.group - settings - - foreground - #F0F060 - background - #602020 - fontStyle - bold - - - - name - Keyword tag - scope - keyword.tag - settings - - foreground - #FF70FF - background - #602060 - fontStyle - bold - - - - name - Keyword tag group - scope - keyword.tag.group - settings - - foreground - #F0B0F0 - background - #602060 - fontStyle - bold - - - - name - Keyword textprocessor - scope - keyword.textprocessor - settings - - foreground - #30FF30 - background - #204020 - fontStyle - bold - - - - name - Keyword textprocessor group - scope - keyword.textprocessor.group - settings - - foreground - #F0F0A0 - background - #204020 - fontStyle - bold - - - - name - Keyword disambiguator - scope - keyword.disambiguator - settings - - foreground - #FF9020 - background - #704010 - fontStyle - bold - - - - - name - Keyword Python - scope - keyword.python - settings - - foreground - #A0A0A0 - - - - - name - Keyword Valid - scope - keyword.valid - settings - - fontStyle - bold - foreground - hsl(150, 100%, 80%) - background - hsl(150, 100%, 20%) - - - - name - Keyword Invalid - scope - keyword.invalid - settings - - fontStyle - bold - foreground - hsl(0, 100%, 80%) - background - hsl(0, 100%, 20%) - - - - - name - Rule options - scope - rule.options - settings - - fontStyle - bold - foreground - #F0A020 - - - - - name - Rule casing - scope - rule.casing - settings - - fontStyle - bold - foreground - #30C0F0 - - - - name - Rule action option - scope - rule.actionoption - settings - - fontStyle - bold - foreground - hsl(0, 50%, 50%) - background - hsl(330, 50%, 20%) - - - - name - Rule option name - scope - rule.optionname - settings - - fontStyle - bold - foreground - hsl(330, 80%, 80%) - background - hsl(330, 60%, 20%) - - - - name - Rule name - scope - rule.rulename - settings - - fontStyle - italic - foreground - #A0A0A0 - - - - name - Rule name - scope - rule.rulename2 - settings - - foreground - #F0D080 - - - - name - Rule priority - scope - rule.priority - settings - - foreground - #F06060 - - - - - name - String meta - scope - string.meta - settings - - foreground - hsl(270, 100%, 90%) - background - hsl(270, 100%, 40%) - - - - name - String token - scope - string.token - settings - - foreground - hsl(240, 50%, 90%) - background - hsl(240, 50%, 40%) - - - - name - String Jumptoken - scope - string.jumptoken - settings - - foreground - hsl(0, 50%, 90%) - background - hsl(10, 50%, 40%) - - - - name - String lemma - scope - string.lemma - settings - - foreground - hsl(210, 100%, 80%) - background - hsl(210, 100%, 15%) - - - - name - String tag - scope - string.tag - settings - - foreground - hsl(30, 100%, 90%) - background - hsl(30, 100%, 20%) - - - - name - String regex - scope - string.regex - settings - - foreground - hsl(60, 100%, 80%) - background - hsl(60, 100%, 10%) - - - - name - String morph pattern - scope - string.morph.pattern - settings - - foreground - hsl(150, 80%, 90%) - background - hsl(150, 80%, 10%) - - - - name - String morph antipattern - scope - string.morph.antipattern - settings - - foreground - hsl(0, 80%, 90%) - background - hsl(0, 80%, 10%) - - - - - - name - JavaScript Dollar - scope - variable.other.dollar.only.js - settings - - foreground - #F92672 - - - - - name - Definition - scope - definition - settings - - fontStyle - bold - foreground - #70B0F0 - - - - name - Test - scope - test - settings - - fontStyle - bold - foreground - #30F070 - - - - name - Todo - scope - todo - settings - - fontStyle - bold - foreground - #F05010 - - - - - name - Options command - scope - options.command - settings - - fontStyle - bold - foreground - #50F0A0 - - - - name - Options parameter - scope - options.parameter - settings - - fontStyle - bold - foreground - #70B0F0 - - - - - name - Storage - scope - storage - settings - - fontStyle - bold - foreground - #F92672 - - - - name - Storage type - scope - storage.type - settings - - fontStyle - italic - foreground - #66D9EF - - - - name - Entity name - scope - entity.name - (entity.name.filename | entity.name.section | entity.name.tag | entity.name.label) - settings - - fontStyle - - foreground - #A0E030 - - - - name - Inherited inherited-class - scope - entity.other.inherited-class - settings - - fontStyle - italic underline - foreground - #A6E22E - - - - name - Function argument - scope - variable.parameter - (source.c | source.c++ | source.objc | source.objc++) - settings - - fontStyle - italic - foreground - #FD971F - - - - name - Language variable - scope - variable.language - settings - - fontStyle - italic - foreground - #FD971F - - - - name - Tag name - scope - entity.name.tag - settings - - fontStyle - - foreground - #F92672 - - - - name - Tag attribute - scope - entity.other.attribute-name - settings - - fontStyle - - foreground - #A6E22E - - - - name - Function call - scope - variable.function - settings - - fontStyle - - foreground - #66D9EF - - - - name - Library function - scope - support.function - settings - - fontStyle - - foreground - #66D9EF - - - - name - Library function debug - scope - support.function.debug - settings - - fontStyle - - foreground - #F0F060 - background - #A05000 - - - - name - Library constant - scope - support.constant - settings - - fontStyle - - foreground - #66D9EF - - - - name - Library class/type - scope - support.type, support.class - settings - - fontStyle - italic - foreground - #66D9EF - - - - name - Library variable - scope - support.other.variable - settings - - fontStyle - - - - - name - Invalid - scope - invalid - settings - - background - #F92672 - fontStyle - - foreground - #F8F8F0 - - - - name - Invalid deprecated - scope - invalid.deprecated - settings - - background - #AE81FF - foreground - #F8F8F0 - - - - name - JSON String - scope - meta.structure.dictionary.json string.quoted.double.json - settings - - foreground - #CFCFC2 - - - - name - YAML String - scope - string.unquoted.yaml - settings - - foreground - #F8F8F2 - - - - - name - diff.header - scope - meta.diff, meta.diff.header - settings - - foreground - #75715E - - - - name - diff.deleted - scope - markup.deleted - settings - - fontStyle - underline - foreground - #FF5050 - - - - name - diff.inserted - scope - markup.inserted - settings - - foreground - #A6E22E - - - - name - diff.changed - scope - markup.changed - settings - - foreground - #E6DB74 - - - - - scope - constant.numeric.line-number.find-in-files - match - settings - - foreground - #AE81FFA0 - - - - scope - entity.name.filename - settings - - foreground - #E6DB74 - - - - - scope - message.error - settings - - foreground - #F85050 - - - - - uuid - D8D5E82E-3D5B-46B5-B38E-8C841C21347D - -