Skip to content

Commit

Permalink
Merge #181: Some color scheme fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
FichteFoll committed Feb 11, 2018
2 parents 65c3949 + 032d7e0 commit fa94b3a
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
{ "trigger": "accent\tglobals key", "contents": "accent" },
{ "trigger": "active_guide\tglobals key", "contents": "active_guide" },
{ "trigger": "background\tglobals key", "contents": "background" },
{ "trigger": "bracket_contents_foreground\tglobals key", "contents": "bracket_contents_foreground" },
{ "trigger": "bracket_contents_options\tglobals key", "contents": "bracket_contents_options" },
{ "trigger": "bracket_options\tglobals key", "contents": "bracket_options" },
{ "trigger": "brackets_options\tglobals key", "contents": "brackets_options" },
{ "trigger": "brackets_foreground\tglobals key", "contents": "brackets_foreground" },
{ "trigger": "caret\tglobals key", "contents": "caret" },
{ "trigger": "find_highlight\tglobals key", "contents": "find_highlight" },
Expand All @@ -30,7 +31,7 @@
{ "trigger": "shadow\tglobals key", "contents": "shadow" },
{ "trigger": "shadow_width\tglobals key", "contents": "shadow_width" },
{ "trigger": "stack_guide\tglobals key", "contents": "stack_guide" },
{ "trigger": "tag_options\tglobals key", "contents": "tag_options" },
{ "trigger": "tags_options\tglobals key", "contents": "tags_options" },
{ "trigger": "tags_foreground\tglobals key", "contents": "tags_foreground" },
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
{ "trigger": "accent\tglobals key", "contents": "\"accent\": \"$1\"," },
{ "trigger": "active_guide\tglobals key", "contents": "\"active_guide\": \"$1\"," },
{ "trigger": "background\tglobals key", "contents": "\"background\": \"$1\"," },
{ "trigger": "bracket_contents_foreground\tglobals key", "contents": "\"bracket_contents_foreground\": \"$1\"," },
{ "trigger": "bracket_contents_options\tglobals key", "contents": "\"bracket_contents_options\": \"$1\"," },
{ "trigger": "bracket_options\tglobals key", "contents": "\"bracket_options\": \"$1\"," },
{ "trigger": "brackets_options\tglobals key", "contents": "\"brackets_options\": \"$1\"," },
{ "trigger": "brackets_foreground\tglobals key", "contents": "\"brackets_foreground\": \"$1\"," },
{ "trigger": "caret\tglobals key", "contents": "\"caret\": \"$1\"," },
{ "trigger": "find_highlight\tglobals key", "contents": "\"find_highlight\": \"$1\"," },
Expand All @@ -30,7 +31,7 @@
{ "trigger": "shadow\tglobals key", "contents": "\"shadow\": \"$1\"," },
{ "trigger": "shadow_width\tglobals key", "contents": "\"shadow_width\": \"$1\"," },
{ "trigger": "stack_guide\tglobals key", "contents": "\"stack_guide\": \"$1\"," },
{ "trigger": "tag_options\tglobals key", "contents": "\"tag_options\": \"$1\"," },
{ "trigger": "tags_options\tglobals key", "contents": "\"tags_options\": \"$1\"," },
{ "trigger": "tags_foreground\tglobals key", "contents": "\"tags_foreground\": \"$1\"," },
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ contexts:
2: keyword.other.main.sublime-color-scheme
3: punctuation.definition.string.end.json
set: [expect-globals-mapping-value, expect-colon]
- match: (")(name|author)(")
scope: meta.mapping.key.json meta.main-key.sublime-color-scheme string.quoted.double.json
captures:
1: punctuation.definition.string.begin.json
2: keyword.other.main.sublime-color-scheme
3: punctuation.definition.string.end.json
set: [expect-string-value, expect-colon]
- include: in-dictionary-main-key

in-dictionary-main-key:
Expand Down Expand Up @@ -121,6 +128,13 @@ contexts:
2: keyword.other.rule.sublime-color-scheme
3: punctuation.definition.string.end.json
set: [expect-fontstyle-string-value, expect-colon]
- match: (")(name)(")
scope: meta.mapping.key.json meta.rule-key.name.sublime-color-scheme string.quoted.double.json
captures:
1: punctuation.definition.string.begin.json
2: keyword.other.rule.sublime-color-scheme
3: punctuation.definition.string.end.json
set: [expect-string-value, expect-colon]
- include: in-dictionary-rule-key
- include: expect-mapping-rest

Expand Down Expand Up @@ -187,7 +201,7 @@ contexts:
- include: expect-key-rest

globals-mapping-key:
- match: (")(accent|shadow|invisibles|caret|line_highlight|foreground|background|selection|selection_border|inactive_selection|inactive_selection_foreground|highlight|find_highlight|find_highlight_foreground|stack_guide|active_guide|guide|misspelling|brackets_foreground|tags_foreground|minimap_border|gutter|gutter_foreground|rulers)(")
- match: (")(accent|shadow|invisibles|caret|line_highlight|foreground|background|selection|selection_border|inactive_selection|inactive_selection_foreground|highlight|find_highlight|find_highlight_foreground|stack_guide|active_guide|guide|misspelling|brackets_foreground|bracket_contents_foreground|tags_foreground|minimap_border|gutter|gutter_foreground|rulers)(")
scope: meta.mapping.key.json meta.globals-key.sublime-color-scheme string.quoted.double.json
captures:
1: punctuation.definition.string.begin.json
Expand All @@ -208,7 +222,7 @@ contexts:
2: entity.name.globals.sublime-color-scheme
3: punctuation.definition.string.end.json
set: [expect-string-boolean-value, expect-colon]
- match: (")(bracket_options|bracket_contents_options|tag_options)(")
- match: (")(brackets_options|bracket_contents_options|tags_options)(")
scope: meta.mapping.key.json meta.globals-key.sublime-color-scheme string.quoted.double.json
captures:
1: punctuation.definition.string.begin.json
Expand Down
20 changes: 16 additions & 4 deletions Package/Sublime Text Color Scheme/syntax_test_colorscheme.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@
// comment
// ^^^^^^^ comment.line.double-slash - meta.color-scheme.collection
{
"author": "PackageDev contributors",
// ^^^^^^ meta.color-scheme.collection.sublime-color-scheme meta.mapping.key.json meta.main-key.sublime-color-scheme string.quoted.double.json keyword.other.main.sublime-color-scheme
// ^ punctuation.separator.mapping.key-value.json
// ^^^^^^^^^^^^^^^^^^^^^^^^^ string.quoted.double.json
// ^ punctuation.separator.mapping.pair.json
"name": "Just a syntax test, nothing to see here",
// ^^^^^^ meta.main-key
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.mapping.value.json string.quoted.double.json
"variables":
// ^ punctuation.definition.string.begin.json
// ^^^^^^^^^^^ meta.mapping.key.json meta.main-key.sublime-color-scheme string.quoted.double.json
Expand Down Expand Up @@ -53,10 +61,10 @@
// ^^^^^^^^^^^^ variable.other.color-scheme
// ^ punctuation.definition.string.end.json
"invisibles": "#F8F8F239",
"bracket_options": "squiggly_underline stippled_underline",
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.mapping.value.json meta.underline-style.sublime-color-scheme string.quoted.double.json
// ^^^^^^^^^^^^^^^^^^ support.constant.underline-style.color-scheme
// ^^^^^^^^^^^^^^^^^^ support.constant.underline-style.color-scheme
"brackets_options": "squiggly_underline stippled_underline",
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.mapping.value.json meta.underline-style.sublime-color-scheme string.quoted.double.json
// ^^^^^^^^^^^^^^^^^^ support.constant.underline-style.color-scheme
// ^^^^^^^^^^^^^^^^^^ support.constant.underline-style.color-scheme
"bracket_contents_options": "squiggly_underline bold italic",
// ^^^^^^^^^^^^^^^^^^ support.constant.underline-style.color-scheme
// ^^^^ support.constant.font-style.color-scheme
Expand Down Expand Up @@ -122,6 +130,10 @@
// ^^^^^^ support.constant.font-style.color-scheme
},
{
"name": "I have a name",
// ^^^^^^ meta.rule-key.name.sublime-color-scheme string.quoted.double.json
// ^ punctuation.separator.mapping.key-value.json
// ^^^^^^^^^^^^^^^ string.quoted.double.json
"scope": "text.html.markdown & (punctuation.definition.list_item, punctuation.definition.blockquote, punctuation.definition.italic, punctuation.definition.bold, punctuation.definition.image, punctuation.definition.link)",
"foreground": "#F83333",
},
Expand Down

0 comments on commit fa94b3a

Please sign in to comment.