Sublime Forum

Creating several scopes that can all override one another in a syntax definition [SOLVED!]

#1

(Click here to skip to the solution below, including a screenshot of an example file, and the complete syntax definition and color scheme files I created, or continue reading to get more background on this issue.)

I’ve created my own txt file editing syntax to allow me to use various symbol strings to color code my text files in Sublime Text 3. However, I can’t seem to figure out how to set up the scopes to have them properly able to pop in and out within the context of one another.

For example, if I’m using scope A, which is triggered/escaped by typing “==”, I want to be able to add a few words in scope B (which is triggered/escaped using “++”) while scope A is on the stack, yet I also want to be able to do the opposite, and have the ability to add a few words using scope A while scope B is on the stack. And I have 6 scopes in total that I want to be able to pop in and out of within the context of any of the others. How do I need to set up the scope definitions in the sublime-syntax file in order to achieve this?

Here are some examples to illustrate this concept and what I hope to achieve a bit more clearly:

==teal-colored text from use of double equal sign --red text from double hyphen-- back to the teal text, ++green text scope from use of double plus sign --red text scope again-- back to green text++ back to teal.==

++green text ==teal text== green text --red text yellow text “orange text” yellow text red text-- green text++

(and this last one might be a stretch to accomplish, or may not even be possible)

yellow text --red text ++green text yellow text green text++ red text-- yellow text no scope applied, default/plain white text.

Basically, the last example shows a second instance of the yellow text scope being pushed onto the stack on top of the --red— and ++green++ which are pushed on top of the first instance of the yellow scope, and the exiting of the second instance of the yellow scope still leaves the first instance on the stack under the --red-- and ++green++ scope.

Hopefully there is some way to achieve this. Really grateful for any help anyone can give me on how to set up the scopes to make it work.

Also, if necessary, I could change my scope triggering/escaping to not use the same symbol strings for both entry/on and exit/off - to use something like == and /==, ++ and /++, – and /–, etc. so they all have an exit/escape that is different from the entry. But ideally, it would look best being able to use the same symbol strings for both on and off.

Thank you!

0 Likes

#2

Something like this ? There wasn’t a ish scope that is teal in color, so I used pink instead.

1 Like

#3

Yes! How did you do that? Can you please share the syntax files so i can see how the scopes are defined?

0 Likes

#4

This is what I came up with (that gives the above kind of highlighting)

%YAML 1.2
---
file_extensions:
  - example

scope: text.example

contexts:
  main:
    - match: (?=\={2})
      push: pink_color
    - match: (?=\-{2})
      push: red_color
    - match: (?=\+{2})
      push: green_color

  pink_color:
    - match: \={2}
      scope: punctuation.definition.pink.begin.example
      set: pink_color_body

  pink_color_body:
    - clear_scopes: 1
    - meta_scope: region.pinkish
    - match: \={2}
      scope: punctuation.definition.teal.end.example
      pop: 1
    - include: main

  red_color:
    - match: \-{2}
      scope: punctuation.definition.red.begin.example
      set: red_color_body

  red_color_body:
    - clear_scopes: 1
    - meta_scope: region.redish
    - match: \-{2}
      scope: punctuation.definition.red.end.example
      pop: 1
    - include: main

  green_color:
    - match: \+{2}
      scope: punctuation.definition.green.begin.example
      set: green_color_body

  green_color_body:
    - clear_scopes: 1
    - meta_scope: region.greenish
    - match: \+{2}
      scope: punctuation.definition.green.end.example
      pop: 1
    - include: main
2 Likes

#5

Cool! Looks like it was the meta scope stuff, clear scopes, and including main that i was missing from my setup. was this all in st3, or are you on st4? and thanks again!

0 Likes

#6

Yeah, the clear_scopes is important otherwise it won’t work properly. The only ST4 specific in this is pop: 1 (In ST4, you can pop multiple contexts off the context stack) but you can just replace those by pop: true and it will work the same in ST3.

1 Like

#7

Awesome. Thanks again!

0 Likes

#8

Ok I updated to ST4 and am trying this now. It works as you have it written. But I am trying to include some other matching options for my scopes, and am also using a custom color scheme to highlight the font of the text only. I’d prefer to do that and not have the background highlight like your example. Is that possible?

Here’s how I have my scopes/syntax definition set up now:

%YAML 1.2
---
# See http://www.sublimetext.com/docs/3/syntax.html
name: mytext
file_extensions:
  - txt
scope: text.txtfile
variables:
  keyword_start: (?:^\*|\*\*|^\+|\+\+|^-|--|^=|==)
  keyword_break: (?:\*\*|\+\+|--|==|\ \(|\n)
  keyword_char: (?!{{keyword_break}})
  keyword: (?:{{keyword_start}}{{keyword_char}}*)

contexts:
  prototype:
    - include: comments
  main:
    # The main context is the initial starting point of our syntax.
    # Include other contexts from here (or specify them directly).
    - include: keywords
    # - include: numbers
    - include: strings

- match: (^=|^\t+=|==)(?:(?!(?:\*\*|\+\+|--|\ \(|\n)).)+(==|\n|(?=(?:\*\*|\+\+|--|==|\ \(|\n)))
  scope: keyword.section.txt  # headings, delineated with ^= or ==
- match: (^-|--|^\t+-|^[0-9]+\.|^\t+[a-z]{1,2}\.|^\t+[0-9]+\.)(?:(?!(?:\*\*|\+\+|--|==|\ \(|\n)).)+(--|\n|(?=(?:\*\*|\+\+|--|==|\ \(|\n)))
  scope: keyword.todo.txt     # todo items, delineated with ^- or --, or ^line numbering, or ^tabs then line numbering
- match: ^(x|X|\t+(x|X))(?:(?!(?:\*\*|\+\+|--|==|\ \(|\n)).)+(\sxx|\n|(?=(?:\*\*|\+\+|--|==|\ \(|\n)))
  scope: keyword.done.txt     # done items, delineated with x or X
- match: (^\+|^\t+\+|\+\+)(?:(?!(?:\*\*|--|==|\+\+\ \(|\n)).)+?(\+\+|\n|(?=(?:\*\*|--|==|\ \()))
  scope: keyword.new.txt     # new items, delineated with ^+ or ++
- match: (^\*|^\t+\*|\*\*)(?:(?!(?:\+\+|--|==|\ \(|\n)).)+(\*\*|\n|(?=(?:\*\*|\+\+|--|==|\ \(|\n)))
  scope: keyword.hivis.txt # high visibility, delineated with ^* or **

  strings:
	- match: '"'
	  scope: punctuation.definition.string.begin.txt
	  push: inside_string

  inside_string:
	- meta_include_prototype: false
	- meta_scope: string.quoted.double.txt
	- match: '\.'
	  scope: constant.character.escape.txt
	- match: '"'
	  scope: punctuation.definition.string.end.txt
	  pop: true

  comments:
	# Comments begin with a '//' and finish at the end of the line.
	- match: '(?<!\S)\/\/'
	  scope: punctuation.definition.comment.txt
	  push:
		# This is an anonymous context push for brevity.
		- meta_scope: comment.line.double-slash.txt
		- match: $\n?
		  pop: true
	- match: '/\*'
	  scope: punctuation.definition.comment.begin.txt
	  push:
		- meta_scope: comment.block.txt
		- match: '\*/'
		  scope: punctuation.definition.comment.end.txt
		  pop: true
		- include: comments_in

BTW, this also worked for lines starting with a single occurrence of each symbol, and various other things for the “todo” scope, and allowed me to switch from one scope to another, and the delineators would also have the scope/font color. But escaping/ending any scope would just go back to unformatted/no scope text instead of the previous scope.

And here’s what I have in my color scheme:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>name</key>
	<string>MyColorScheme</string>
	<key>settings</key>
	<array>
		<dict>
			<key>settings</key>
			<dict>
				<key>activeGuide</key>
				<string>#A800FF</string>
				<key>background</key>
				<string>#272822</string>
				<key>bracketContentsForeground</key>
				<string>#F8F8F2A5</string>
				<key>bracketContentsOptions</key>
				<string>underline</string>
				<key>bracketsForeground</key>
				<string>#F8F8F2A5</string>
				<key>bracketsOptions</key>
				<string>underline</string>
				<key>caret</key>
				<string>#FF0000</string>
				<key>findHighlight</key>
				<string>#00ff00</string>
				<key>findHighlightForeground</key>
				<string>#000000</string>
				<key>foreground</key>
				<string>#F8F8F2</string>
				<key>inactiveSelection</key>
				<string>#bbbbbb</string>
				<key>inactiveSelectionForeground</key>
				<string>#222222</string>
				<key>invisibles</key>
				<string>#3B3A32</string>
				<key>lineHighlight</key>
				<string>#3E3D32</string>
				<key>selection</key>
				<string>#00C0C0</string>
				<key>selectionForeground</key>
				<string>#000000</string>
				<key>tagsOptions</key>
				<string>stippled_underline</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Comment</string>
			<key>scope</key>
			<string>comment</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#FF00FF</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>String</string>
			<key>scope</key>
			<string>string</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#FF8300</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Number</string>
			<key>scope</key>
			<string>constant.numeric</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#AE81FF</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Built-in constant</string>
			<key>scope</key>
			<string>constant.language</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#AE81FF</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>User-defined constant</string>
			<key>scope</key>
			<string>constant.character, constant.other</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#AE81FF</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Variable</string>
			<key>scope</key>
			<string>variable</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string></string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Keyword</string>
			<key>scope</key>
			<string>keyword</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#F92672</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Storage</string>
			<key>scope</key>
			<string>storage</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string></string>
				<key>foreground</key>
				<string>#F92672</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Storage type</string>
			<key>scope</key>
			<string>storage.type</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string>italic</string>
				<key>foreground</key>
				<string>#66D9EF</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Class name</string>
			<key>scope</key>
			<string>entity.name.class</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string>underline</string>
				<key>foreground</key>
				<string>#A6E22E</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Inherited class</string>
			<key>scope</key>
			<string>entity.other.inherited-class</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string>italic underline</string>
				<key>foreground</key>
				<string>#A6E22E</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Function name</string>
			<key>scope</key>
			<string>entity.name.function</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string></string>
				<key>foreground</key>
				<string>#A6E22E</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Function argument</string>
			<key>scope</key>
			<string>variable.parameter</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string>italic</string>
				<key>foreground</key>
				<string>#FD971F</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Tag name</string>
			<key>scope</key>
			<string>entity.name.tag</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string></string>
				<key>foreground</key>
				<string>#F92672</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Tag attribute</string>
			<key>scope</key>
			<string>entity.other.attribute-name</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string></string>
				<key>foreground</key>
				<string>#A6E22E</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Library function</string>
			<key>scope</key>
			<string>support.function</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string></string>
				<key>foreground</key>
				<string>#66D9EF</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Library constant</string>
			<key>scope</key>
			<string>support.constant</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string></string>
				<key>foreground</key>
				<string>#66D9EF</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Library class/type</string>
			<key>scope</key>
			<string>support.type, support.class</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string>italic</string>
				<key>foreground</key>
				<string>#66D9EF</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Library variable</string>
			<key>scope</key>
			<string>support.other.variable</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string></string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Invalid</string>
			<key>scope</key>
			<string>invalid</string>
			<key>settings</key>
			<dict>
				<key>background</key>
				<string>#F92672</string>
				<key>fontStyle</key>
				<string></string>
				<key>foreground</key>
				<string>#F8F8F0</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Invalid deprecated</string>
			<key>scope</key>
			<string>invalid.deprecated</string>
			<key>settings</key>
			<dict>
				<key>background</key>
				<string>#AE81FF</string>
				<key>foreground</key>
				<string>#F8F8F0</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>JSON String</string>
			<key>scope</key>
			<string>meta.structure.dictionary.json string.quoted.double.json</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#CFCFC2</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>diff.header</string>
			<key>scope</key>
			<string>meta.diff, meta.diff.header</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#75715E</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>diff.deleted</string>
			<key>scope</key>
			<string>markup.deleted</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#F92672</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>diff.inserted</string>
			<key>scope</key>
			<string>markup.inserted</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#A6E22E</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>diff.changed</string>
			<key>scope</key>
			<string>markup.changed</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#E6DB74</string>
			</dict>
		</dict>
		<dict>
			<key>scope</key>
			<string>constant.numeric.line-number.find-in-files - match</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#AE81FFA0</string>
			</dict>
		</dict>
		<dict>
			<key>scope</key>
			<string>entity.name.filename.find-in-files</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#E6DB74</string>
			</dict>
		</dict>
		<dict>
			<key>scope</key>
			<string>keyword.todo.txt</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#FF0000</string>
			</dict>
		</dict>
		<dict>
			<key>scope</key>
			<string>keyword.done.txt</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#888888</string>
			</dict>
		</dict>
		<dict>
			<key>scope</key>
			<string>keyword.section.txt</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#00FFFF</string>
			</dict>
		</dict>
		<dict>
			<key>scope</key>
			<string>keyword.new.txt</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#00ff00</string>
			</dict>
		</dict>
		<dict>
			<key>scope</key>
			<string>keyword.hivis.txt</string>
			<key>settings</key>
			<dict>
				<key>background</key>
				<string>#000000</string>
				<key>fontStyle</key>
				<string>italic bold</string>
				<key>foreground</key>
				<string>#ffff00</string>
			</dict>
		</dict>
	</array>
	<key>uuid</key>
	<string>D8D5E82E-3D5B-46B5-B38E-8C841C21347E</string>
</dict>
</plist>

Hopefully it’s somehow possible to get this working with all the scopes and font colors I want to use. Please help if you can.

Thanks again!

0 Likes

#9

Well, it took me a while and a lot of trial and error, but I figured it out!

(NOTE: Part of what you’ll see in the example here only works in Sublime Text 4, thanks to the added ability to pop a number of scopes off the stack at once. If anyone reading this wants it modified to work with an earlier version, just comment and let me know.)

Here’s how I have the syntax and color scheme files configured to accomplish this:

sublime-syntax file:

%YAML 1.2
---
# See http://www.sublimetext.com/docs/3/syntax.html
name: mmaksimtext
file_extensions:
  - txt
scope: text.txtfile

contexts:
  prototype:
    - include: comments
  main:
    - match: (?=(^=|^\t+=|={2}))
      push: heading
    - match: (?=(^-|-{2}|^\t+-|^[0-9]+\.|^\t+[a-z]{1,2}\.|^\t+[0-9]+\.))
      push: todo
    - match: (?=(^[xX]|\t+[xX]|\s[xX]{2}\s))
      push: done
    - match: (?=(^\+|^\t+\+|\+{2}))
      push: new
    - match: (?=(^\*|^\t+\*|\*{2}))
      push: hivis
    - match: (?=")
      push: strings
    - match: (\n)
      pop: 100

  heading:
    - match: (^=|^\t+=|={2})
      scope: punctuation.heading.begin.txt
      push: heading_body

  heading_body:
    - clear_scopes: 2
    - meta_scope: region.heading
    - match: (\={2})
      scope: punctuation.definition.heading.end.txt
      pop: 2
    - include: main

  todo:
    - match: (^-|-{2}|^\t+-|^[0-9]+\.|^\t+[a-z]{1,2}\.|^\t+[0-9]+\.)
      scope: punctuation.definition.todo.begin.txt
      push: todo_body

  todo_body:
    - clear_scopes: 2
    - meta_scope: region.todo
    - match: (\-{2})
      scope: punctuation.definition.todo.end.txt
      pop: 2
    - include: main

  done:
    - match: (^[xX]|\t+[xX]|\s[xX]{2}\s)
      scope: punctuation.definition.done.begin.txt
      push: done_body

  done_body:
    - clear_scopes: 2
    - meta_scope: region.done
    - match: (\s+[xX]{2})
      scope: punctuation.definition.done.end.txt
      pop: 2
    - include: main

  new:
    - match: (^\+|^\t+\+|\+{2})
      scope: punctuation.definition.new.begin.txt
      push: new_body

  new_body:
    - clear_scopes: 2
    - meta_scope: region.new
    - match: (\+{2})
      scope: punctuation.definition.new.end.txt
      pop: 2
    - include: main

  hivis:
    - match: (^\*|^\t+\*|\*{2})
      scope: punctuation.definition.hivis.begin.txt
      push: hivis_body

  hivis_body:
    - clear_scopes: 2
    - meta_scope: region.hivis
    - match: (\*{2})
      scope: punctuation.definition.hivis.end.txt
      pop: 2
    - include: main

  strings:
    - match: '"'
      scope: punctuation.definition.string.begin.txt
      push: string_body

  string_body:
    - clear_scopes: 2
    - meta_include_prototype: false
    - meta_scope: region.string
    - match: '\.'
      scope: constant.character.escape.txt
    - match: (")
      scope: punctuation.definition.string.end.txt
      pop: 2
    - include: main

  comments:
    - match: '(?<!\S)\/\/'
      scope: punctuation.definition.comment.txt
      push:
        - meta_scope: comment.line.double-slash.txt
        - match: $\n?
          pop: true
    - match: '/\*'
      scope: punctuation.definition.comment.begin.txt
      push:
        - meta_scope: comment.block.txt
        - match: '\*/'
          scope: punctuation.definition.comment.end.txt
          pop: 2
        - include: comments_in

tmTheme file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>name</key>
	<string>PowerColors ExPlainText</string>
	<key>settings</key>
	<array>
		<dict>
			<key>settings</key>
			<dict>
				<key>activeGuide</key>
				<string>#A800FF</string>
				<key>background</key>
				<string>#272822</string>
				<key>bracketContentsForeground</key>
				<string>#F8F8F2A5</string>
				<key>bracketContentsOptions</key>
				<string>underline</string>
				<key>bracketsForeground</key>
				<string>#F8F8F2A5</string>
				<key>bracketsOptions</key>
				<string>underline</string>
				<key>caret</key>
				<string>#FF0000</string>
				<key>findHighlight</key>
				<string>#00ff00</string>
				<key>findHighlightForeground</key>
				<string>#000000</string>
				<key>foreground</key>
				<string>#F8F8F2</string>
				<key>inactiveSelection</key>
				<string>#bbbbbb</string>
				<key>inactiveSelectionForeground</key>
				<string>#222222</string>
				<key>invisibles</key>
				<string>#3B3A32</string>
				<key>lineHighlight</key>
				<string>#3E3D32</string>
				<key>selection</key>
				<string>#00C0C0</string>
				<key>selectionForeground</key>
				<string>#000000</string>
				<key>tagsOptions</key>
				<string>stippled_underline</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Comment</string>
			<key>scope</key>
			<string>comment</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#FF00FF</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>String</string>
			<key>scope</key>
			<string>string</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#FF8300</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Number</string>
			<key>scope</key>
			<string>constant.numeric</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#AE81FF</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Built-in constant</string>
			<key>scope</key>
			<string>constant.language</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#AE81FF</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>User-defined constant</string>
			<key>scope</key>
			<string>constant.character, constant.other</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#AE81FF</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Variable</string>
			<key>scope</key>
			<string>variable</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string></string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Keyword</string>
			<key>scope</key>
			<string>keyword</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#F92672</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Storage</string>
			<key>scope</key>
			<string>storage</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string></string>
				<key>foreground</key>
				<string>#F92672</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Storage type</string>
			<key>scope</key>
			<string>storage.type</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string>italic</string>
				<key>foreground</key>
				<string>#66D9EF</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Class name</string>
			<key>scope</key>
			<string>entity.name.class</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string>underline</string>
				<key>foreground</key>
				<string>#A6E22E</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Inherited class</string>
			<key>scope</key>
			<string>entity.other.inherited-class</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string>italic underline</string>
				<key>foreground</key>
				<string>#A6E22E</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Function name</string>
			<key>scope</key>
			<string>entity.name.function</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string></string>
				<key>foreground</key>
				<string>#A6E22E</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Function argument</string>
			<key>scope</key>
			<string>variable.parameter</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string>italic</string>
				<key>foreground</key>
				<string>#FD971F</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Tag name</string>
			<key>scope</key>
			<string>entity.name.tag</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string></string>
				<key>foreground</key>
				<string>#F92672</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Tag attribute</string>
			<key>scope</key>
			<string>entity.other.attribute-name</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string></string>
				<key>foreground</key>
				<string>#A6E22E</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Library function</string>
			<key>scope</key>
			<string>support.function</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string></string>
				<key>foreground</key>
				<string>#66D9EF</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Library constant</string>
			<key>scope</key>
			<string>support.constant</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string></string>
				<key>foreground</key>
				<string>#66D9EF</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Library class/type</string>
			<key>scope</key>
			<string>support.type, support.class</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string>italic</string>
				<key>foreground</key>
				<string>#66D9EF</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Library variable</string>
			<key>scope</key>
			<string>support.other.variable</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string></string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Invalid</string>
			<key>scope</key>
			<string>invalid</string>
			<key>settings</key>
			<dict>
				<key>background</key>
				<string>#F92672</string>
				<key>fontStyle</key>
				<string></string>
				<key>foreground</key>
				<string>#F8F8F0</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>Invalid deprecated</string>
			<key>scope</key>
			<string>invalid.deprecated</string>
			<key>settings</key>
			<dict>
				<key>background</key>
				<string>#AE81FF</string>
				<key>foreground</key>
				<string>#F8F8F0</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>JSON String</string>
			<key>scope</key>
			<string>meta.structure.dictionary.json string.quoted.double.json</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#CFCFC2</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>diff.header</string>
			<key>scope</key>
			<string>meta.diff, meta.diff.header</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#75715E</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>diff.deleted</string>
			<key>scope</key>
			<string>markup.deleted</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#F92672</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>diff.inserted</string>
			<key>scope</key>
			<string>markup.inserted</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#A6E22E</string>
			</dict>
		</dict>
		<dict>
			<key>name</key>
			<string>diff.changed</string>
			<key>scope</key>
			<string>markup.changed</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#E6DB74</string>
			</dict>
		</dict>
		<dict>
			<key>scope</key>
			<string>constant.numeric.line-number.find-in-files - match</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#AE81FFA0</string>
			</dict>
		</dict>
		<dict>
			<key>scope</key>
			<string>entity.name.filename.find-in-files</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#E6DB74</string>
			</dict>
		</dict>
		<dict>
			<key>scope</key>
			<string>punctuation.done, region.done</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#888888</string>
			</dict>
		</dict>
		<dict>
			<key>scope</key>
			<string>punctuation.heading, region.heading</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#00FFFF</string>
			</dict>
		</dict>
		<dict>
			<key>scope</key>
			<string>punctuation.todo, region.todo</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#FF0000</string>
			</dict>
		</dict>
		<dict>
			<key>scope</key>
			<string>punctuation.new, region.new</string>
			<key>settings</key>
			<dict>
				<key>foreground</key>
				<string>#00ff00</string>
			</dict>
		</dict>
		<dict>
			<key>scope</key>
			<string>punctuation.hivis, region.hivis</string>
			<key>settings</key>
			<dict>
				<key>background</key>
				<string>#000000</string>
				<key>fontStyle</key>
				<string>italic bold</string>
				<key>foreground</key>
				<string>#ffff00</string>
			</dict>
		</dict>
		<dict>
			<key>scope</key>
			<string>punctuation.string, region.string</string>
			<key>settings</key>
			<dict>
				<key>fontStyle</key>
				<string>italic</string>
				<key>foreground</key>
				<string>#FF8300</string>
			</dict>
		</dict>
	</array>
	<key>uuid</key>
	<string>D8D5E82E-3D5B-46B5-B38E-8C841C21347E</string>
</dict>
</plist>

If enough people seem to like this and use it, I’ll get it into package control (eventually :wink:).

0 Likes