From fc39713c557cdaa9457c90af214c6a624cc30b99 Mon Sep 17 00:00:00 2001 From: FichteFoll Date: Wed, 29 Mar 2017 16:41:41 +0200 Subject: [PATCH] Rename JSON meta scopes Refer to https://github.com/sublimehq/Packages/issues/421 and https://github.com/sublimehq/Packages/issues/862. --- .../Sublime Keymap.sublime-syntax | 159 ++++++++------- .../syntax_test_keymap.json | 184 +++++++++--------- 2 files changed, 171 insertions(+), 172 deletions(-) diff --git a/Package/Sublime Text Keymap/Sublime Keymap.sublime-syntax b/Package/Sublime Text Keymap/Sublime Keymap.sublime-syntax index 3fa9c209..e8693d86 100644 --- a/Package/Sublime Text Keymap/Sublime Keymap.sublime-syntax +++ b/Package/Sublime Text Keymap/Sublime Keymap.sublime-syntax @@ -10,58 +10,58 @@ contexts: main: - include: comments - match: \[ - scope: meta.structure.array.json punctuation.definition.array.begin.json + scope: meta.sequence.json punctuation.section.sequence.begin.json push: - - meta_content_scope: meta.structure.array.json meta.keybinding.collection.sublime-keymap + - meta_content_scope: meta.sequence.json meta.keybinding.collection.sublime-keymap - match: \] - scope: meta.structure.array.json punctuation.definition.array.end.json + scope: meta.sequence.json punctuation.section.sequence.end.json set: only-comments - match: \{ - scope: punctuation.definition.dictionary.begin.json punctuation.definition.keybinding.begin.sublime-keymap + scope: punctuation.section.mapping.begin.json punctuation.section.keybinding.begin.sublime-keymap push: [in-array-expect-comma, main-keys] - include: comments - match: '[^,\s]' - scope: invalid.illegal.expect-dictionary.sublime-keymap + scope: invalid.illegal.expected-mapping.sublime-keymap - match: \S - scope: invalid.illegal.expected-array.sublime-keymap + scope: invalid.illegal.expected-sequence.sublime-keymap in-array-expect-comma: - match: (?=\]) pop: true - include: comments - match: ',' - scope: punctuation.separator.array.json + scope: punctuation.separator.sequence.json pop: true - match: \s*(?=[{"\d\[]|true|false|null) - scope: invalid.illegal.expected-comma.inside-array.json + scope: invalid.illegal.expected-comma.inside-sequence.json pop: true - match: \S - scope: invalid.illegal.expected-comma.inside-array.json + scope: invalid.illegal.expected-comma.inside-sequence.json in-dictionary-expect-comma: - match: (?=\}) pop: true - include: comments - match: ',' - scope: punctuation.separator.dictionary.pair.json + scope: punctuation.separator.mapping.pair.json pop: true - match: \s*(?=") - scope: invalid.illegal.expected-comma.inside-dictionary.json + scope: invalid.illegal.expected-comma.inside-mapping.json pop: true - match: \S - scope: invalid.illegal.expected-comma.inside-dictionary.json + scope: invalid.illegal.expected-comma.inside-mapping.json main-keys: - - meta_scope: meta.structure.dictionary.json + - meta_scope: meta.mapping.json - match: (")(keys)(") - scope: meta.structure.dictionary.key.json meta.main-key.sublime-keymap string.quoted.double.json + scope: meta.key.json meta.main-key.sublime-keymap string.quoted.double.json captures: 1: punctuation.definition.string.begin.json 2: keyword.other.main.sublime-keymap 3: punctuation.definition.string.end.json push: [in-dictionary-expect-comma, expect-keys-array, expect-colon] - match: (")(command)(") - scope: meta.structure.dictionary.key.json meta.main-key.sublime-keymap string.quoted.double.json + scope: meta.key.json meta.main-key.sublime-keymap string.quoted.double.json captures: 1: punctuation.definition.string.begin.json 2: keyword.other.main.sublime-keymap @@ -72,49 +72,49 @@ contexts: push: [expect-command-name, expect-colon] # push: [in-dictionary-expect-comma, expect-command-name, expect-colon-value] - match: (")(args)(") - scope: meta.structure.dictionary.key.json meta.main-key.sublime-keymap string.quoted.double.json + scope: meta.key.json meta.main-key.sublime-keymap string.quoted.double.json captures: 1: punctuation.definition.string.begin.json 2: keyword.other.main.sublime-keymap 3: punctuation.definition.string.end.json push: [in-dictionary-expect-comma, expect-dictionary-value, expect-colon] - match: (")(context)(") - scope: meta.structure.dictionary.key.json meta.main-key.sublime-keymap string.quoted.double.json + scope: meta.key.json meta.main-key.sublime-keymap string.quoted.double.json captures: 1: punctuation.definition.string.begin.json 2: keyword.other.main.sublime-keymap 3: punctuation.definition.string.end.json push: [in-dictionary-expect-comma, expect-context-array, expect-colon] - match: \} - scope: punctuation.definition.dictionary.end.json punctuation.definition.keybinding.end.sublime-keymap + scope: punctuation.section.mapping.end.json punctuation.section.keybinding.end.sublime-keymap pop: true - include: support-keys - include: comments - match: '[^\s\w]' # \S - scope: invalid.illegal.expected-dictionary-key.sublime-keymap + scope: invalid.illegal.expected-key.sublime-keymap expect-keys-array: - match: \[ - scope: punctuation.definition.array.begin.json + scope: punctuation.section.sequence.begin.json set: - - meta_scope: meta.structure.dictionary.value.json meta.structure.array.json + - meta_scope: meta.value.json meta.sequence.json - match: \] - scope: punctuation.definition.array.end.json + scope: punctuation.section.sequence.end.json pop: true - match: (")(<)(character)(>)(") scope: string.quoted.double.json captures: - 1: punctuation.keybinding.definition.key.sequence.start.sublime-keymap + 1: punctuation.definition.string.start.json 3: entity.other.attribute-name.key.captured.sublime-keymap - 5: punctuation.keybinding.definition.key.sequence.end.sublime-keymap + 5: punctuation.definition.string.end.json push: in-array-expect-comma - match: \" - scope: punctuation.definition.string.begin.json punctuation.keybinding.definition.key.sequence.start.sublime-keymap + scope: punctuation.definition.string.begin.json push: - meta_scope: string.quoted.double.json - - meta_content_scope: meta.key.sequence.sublime-keymap + - meta_content_scope: meta.key-chord.sublime-keymap - match: \" - scope: punctuation.definition.string.end.json punctuation.keybinding.definition.key.sequence.end.sublime-keymap + scope: punctuation.definition.string.end.json set: in-array-expect-comma - match: '' push: # match modifier keys first @@ -152,7 +152,7 @@ contexts: scope: invalid.depcreated.key.sublime-keymap - include: comments - match: \S - scope: invalid.illegal.expected-string-or-end-of-array.sublime-keymap + scope: invalid.illegal.expected-string-or-end-of-sequence.sublime-keymap - match: (?=\S) pop: true @@ -162,7 +162,7 @@ contexts: - match: (?="command") pop: true - match: (")(args)(") - scope: meta.structure.dictionary.key.json string.quoted.double.json meta.main-key.sublime-keymap + scope: meta.key.json string.quoted.double.json meta.main-key.sublime-keymap captures: 1: punctuation.definition.string.begin.json 2: keyword.other.main.sublime-keymap meta.main-key.sublime-keymap @@ -174,30 +174,29 @@ contexts: expect-snippet-args-dictionary: - match: \{ - scope: punctuation.definition.dictionary.begin.json + scope: punctuation.section.mapping.begin.json set: - - meta_scope: meta.structure.dictionary.value.json meta.structure.dictionary.json + - meta_scope: meta.value.json meta.mapping.json - match: \} - scope: punctuation.definition.dictionary.end.json + scope: punctuation.section.mapping.end.json pop: true - match: (")(contents)(") - scope: meta.structure.dictionary.key.json string.quoted.double.json + scope: meta.key.json string.quoted.double.json captures: 1: punctuation.definition.string.begin.json 2: support.function.sublime-keymap 3: punctuation.definition.string.end.json - 4: punctuation.separator.dictionary.key-value.json push: [in-dictionary-expect-comma, expect-snippet-string, expect-colon] - include: support-keys - match: \S - scope: invalid.illegal.expected-dictionary-key.sublime-keymap + scope: invalid.illegal.expected-key.sublime-keymap - include: expect-dictionary expect-snippet-string: - match: \" scope: punctuation.definition.string.begin.json punctuation.definition.snippet.begin.sublime-keymap set: - - meta_scope: meta.structure.dictionary.value.json string.quoted.double.json + - meta_scope: meta.value.json string.quoted.double.json - match: '"' scope: punctuation.definition.string.end.json punctuation.definition.snippet.end.sublime-keymap pop: true @@ -232,14 +231,14 @@ contexts: expect-command-name: - match: (")(insert_snippet)(") - scope: meta.structure.dictionary.value.json string.quoted.double.json meta.command-name.sublime-keymap + scope: meta.value.json string.quoted.double.json meta.command-name.sublime-keymap captures: 1: punctuation.definition.string.begin.json 2: support.constant.command-name.sublime-keymap 3: punctuation.definition.string.end.json set: [support-keys-or-snippet-args, in-dictionary-expect-comma] - match: (\")([a-z_\d]+)(\") - scope: meta.structure.dictionary.value.json string.quoted.double.json meta.command-name.sublime-keymap + scope: meta.value.json string.quoted.double.json meta.command-name.sublime-keymap captures: 1: punctuation.definition.string.begin.json 2: support.constant.command-name.sublime-keymap @@ -248,7 +247,7 @@ contexts: - match: \" # probably illegal command name scope: punctuation.definition.string.begin.json set: - - meta_scope: meta.structure.dictionary.value.json string.quoted.double.json meta.command-name.sublime-keymap + - meta_scope: meta.value.json string.quoted.double.json meta.command-name.sublime-keymap - meta_content_scope: invalid.illegal.invalid-command.sublime-keymap - match: \" scope: punctuation.definition.string.end.json @@ -261,48 +260,48 @@ contexts: context-array: - match: \[ - scope: punctuation.definition.array.begin.json + scope: punctuation.section.sequence.begin.json set: - - meta_scope: meta.structure.dictionary.value.json meta.structure.array.json meta.keybinding-context-collection.sublime-keymap + - meta_scope: meta.value.json meta.sequence.json meta.keybinding-context-collection.sublime-keymap - match: \] - scope: punctuation.definition.array.end.json + scope: punctuation.section.sequence.end.json pop: true - include: comments - match: \{ - scope: punctuation.definition.dictionary.begin.json + scope: punctuation.section.mapping.begin.json push: [in-array-expect-comma, context-entry-contents] - match: '\S' - scope: invalid.illegal.expected-dictionary-or-end-of-array.sublime-keymap + scope: invalid.illegal.expected-mapping-or-end-of-sequence.sublime-keymap context-entry-contents: - - meta_scope: meta.structure.dictionary.json meta.keybinding-context.sublime-keymap + - meta_scope: meta.mapping.json meta.keybinding-context.sublime-keymap - match: \} - scope: punctuation.definition.dictionary.end.json + scope: punctuation.section.mapping.end.json pop: true - include: comments - match: (")(key)(") - scope: meta.structure.dictionary.key.json meta.context-key.sublime-keymap string.quoted.double.json + scope: meta.key.json meta.context-key.sublime-keymap string.quoted.double.json captures: 1: punctuation.definition.string.begin.json 2: support.function.context.sublime-keymap 3: punctuation.definition.string.end.json push: [in-dictionary-expect-comma, expect-context-key, expect-colon] - match: (")(operator)(") - scope: meta.structure.dictionary.key.json meta.context-key.sublime-keymap string.quoted.double.json + scope: meta.key.json meta.context-key.sublime-keymap string.quoted.double.json captures: 1: punctuation.definition.string.begin.json 2: support.function.context.sublime-keymap 3: punctuation.definition.string.end.json push: [in-dictionary-expect-comma, expect-context-operator, expect-colon] - match: (")(operand)(") - scope: meta.structure.dictionary.key.json meta.context-key.sublime-keymap string.quoted.double.json + scope: meta.key.json meta.context-key.sublime-keymap string.quoted.double.json captures: 1: punctuation.definition.string.begin.json 2: support.function.context.sublime-keymap 3: punctuation.definition.string.end.json push: [in-dictionary-expect-comma, expect-context-operand, expect-colon] - match: (")(match_all)(") - scope: meta.structure.dictionary.key.json meta.context-key.sublime-keymap string.quoted.double.json + scope: meta.key.json meta.context-key.sublime-keymap string.quoted.double.json captures: 1: punctuation.definition.string.begin.json 2: support.function.context.sublime-keymap @@ -312,7 +311,7 @@ contexts: - match: \" scope: punctuation.definition.string.begin.json push: - - meta_scope: meta.structure.dictionary.key.json meta.unknown-context-key.sublime-keymap string.quoted.double.json + - meta_scope: meta.key.json meta.unknown-context-key.sublime-keymap string.quoted.double.json - match: \" scope: punctuation.definition.string.end.json set: [in-dictionary-expect-comma, expect-colon-value] @@ -321,14 +320,14 @@ contexts: scope: invalid.illegal.unclosed-string.json set: [in-dictionary-expect-comma, expect-colon-value] - match: \S - scope: invalid.illegal.expected-dictionary-key.json + scope: invalid.illegal.expected-key.json context-entry-contents-regex: - meta_scope: meta.keybinding-context.regex.sublime-keymap - match: (?=}) pop: true - match: (")(operand)(") - scope: meta.structure.dictionary.key.json meta.context-key.sublime-keymap string.quoted.double.json + scope: meta.key.json meta.context-key.sublime-keymap string.quoted.double.json captures: 1: punctuation.definition.string.begin.json 2: support.function.context.sublime-keymap @@ -341,7 +340,7 @@ contexts: - match: (?=}) pop: true - match: (")(operand)(") - scope: meta.structure.dictionary.key.json meta.context-key.sublime-keymap string.quoted.double.json + scope: meta.key.json meta.context-key.sublime-keymap string.quoted.double.json captures: 1: punctuation.definition.string.begin.json 2: support.function.context.sublime-keymap @@ -351,7 +350,7 @@ contexts: expect-context-key: - match: (")(selector|eol_selector)(") - scope: meta.structure.dictionary.value.json meta.context.key-value.key.selector.sublime-keymap string.quoted.double.json + scope: meta.value.json meta.context.key-value.key.selector.sublime-keymap string.quoted.double.json captures: 1: punctuation.definition.string.begin.json 2: storage.type.context.key-value.sublime-keymap @@ -363,7 +362,7 @@ contexts: |(?:panel|overlay|auto_complete|popup)_visible|panel|panel_has_focus |last_command|indented_block )(") - scope: meta.structure.dictionary.value.json meta.context.key-value.key.other.sublime-keymap string.quoted.double.json + scope: meta.value.json meta.context.key-value.key.other.sublime-keymap string.quoted.double.json captures: 1: punctuation.definition.string.begin.json 2: storage.type.context.key-value.sublime-keymap @@ -375,7 +374,7 @@ contexts: 2: storage.type.context.key-value.sublime-keymap 3: punctuation.separator.setting-value.sublime-keymap set: - - meta_scope: meta.structure.dictionary.value.json meta.context.key-value.key.setting.sublime-keymap string.quoted.double.json + - meta_scope: meta.value.json meta.context.key-value.key.setting.sublime-keymap string.quoted.double.json - meta_content_scope: variable.other.setting.sublime-keymap - match: '"' scope: punctuation.definition.string.end.json @@ -388,7 +387,7 @@ contexts: - match: '"' scope: punctuation.definition.string.begin.json set: - - meta_scope: meta.structure.dictionary.value.json meta.context.key-value.key.unknown.sublime-keymap string.quoted.double.json + - meta_scope: meta.value.json meta.context.key-value.key.unknown.sublime-keymap string.quoted.double.json - match: '"' scope: punctuation.definition.string.end.json pop: true @@ -399,16 +398,16 @@ contexts: - include: expect-string expect-context-operator: - - meta_content_scope: meta.structure.dictionary.value.json + - meta_content_scope: meta.value.json - match: (")(regex_contains|not_regex_contains|regex_match|not_regex_match)(") - scope: meta.structure.dictionary.value.json meta.context.key-value.operator.regex.sublime-keymap string.quoted.double.json + scope: meta.value.json meta.context.key-value.operator.regex.sublime-keymap string.quoted.double.json captures: 1: punctuation.definition.string.begin.json 2: keyword.operator.context.key-value.sublime-keymap 3: punctuation.definition.string.end.json set: [context-entry-contents-regex, in-dictionary-expect-comma] - match: (")(equal|not_equal)(") - scope: meta.structure.dictionary.value.json meta.context.key-value.operator.equality.sublime-keymap string.quoted.double.json + scope: meta.value.json meta.context.key-value.operator.equality.sublime-keymap string.quoted.double.json captures: 1: punctuation.definition.string.begin.json 2: keyword.operator.context.key-value.sublime-keymap @@ -417,7 +416,7 @@ contexts: - match: '"' scope: punctuation.definition.string.begin.json set: - - meta_scope: meta.structure.dictionary.value.json meta.context.key-value.operator.unknown.sublime-keymap string.quoted.double.json + - meta_scope: meta.value.json meta.context.key-value.operator.unknown.sublime-keymap string.quoted.double.json - match: '"' scope: punctuation.definition.string.end.json pop: true @@ -430,7 +429,7 @@ contexts: expect-context-operand: - match: '' set: - - meta_scope: meta.structure.dictionary.value.json meta.context.key-value.operand.sublime-keymap + - meta_scope: meta.value.json meta.context.key-value.operand.sublime-keymap - match: (?=[},]) pop: true - include: value @@ -441,7 +440,7 @@ contexts: - match: '"' scope: punctuation.definition.string.begin.json set: - - meta_scope: meta.structure.dictionary.value.json meta.context.key-value.operand.selector.sublime-keymap string.quoted.double.json + - meta_scope: meta.value.json meta.context.key-value.operand.selector.sublime-keymap string.quoted.double.json - meta_content_scope: source.scope-selector.embedded.json-string - match: '"' scope: punctuation.definition.string.end.json @@ -462,7 +461,7 @@ contexts: - match: '"' scope: punctuation.definition.string.begin.json set: - - meta_scope: meta.structure.dictionary.value.json meta.context.key-value.operand.regex.sublime-keymap string.quoted.double.json + - meta_scope: meta.value.json meta.context.key-value.operand.regex.sublime-keymap string.quoted.double.json - meta_content_scope: source.regexp.embedded.json-string - match: \" scope: punctuation.definition.regex.end.sublime-keymap @@ -496,23 +495,23 @@ contexts: dictionary: - match: \{ - scope: punctuation.definition.dictionary.begin.json + scope: punctuation.section.mapping.begin.json set: - - meta_scope: meta.structure.dictionary.json + - meta_scope: meta.mapping.json - match: \} - scope: punctuation.definition.dictionary.end.json + scope: punctuation.section.mapping.end.json pop: true - include: support-keys - match: \S - scope: invalid.illegal.expected-dictionary-key.json + scope: invalid.illegal.expected-key.json array: - match: \[ - scope: punctuation.definition.array.begin.json + scope: punctuation.section.sequence.begin.json set: - - meta_scope: meta.structure.array.json + - meta_scope: meta.sequence.json - match: \] - scope: punctuation.definition.array.end.json + scope: punctuation.section.sequence.end.json pop: true - match: (?=\S) push: @@ -522,7 +521,7 @@ contexts: - include: in-array-expect-comma dictionary-value-meta-scope: - - meta_scope: meta.structure.dictionary.value.json + - meta_scope: meta.value.json - match: '' pop: true @@ -532,7 +531,7 @@ contexts: - match: (?=[},\]]) pop: true - match: \S - scope: invalid.illegal.expected-dictionary.sublime-keymap + scope: invalid.illegal.expected-mapping.sublime-keymap expect-dictionary-value: - match: '(?=\{)' @@ -541,7 +540,7 @@ contexts: - match: (?=[},\]]) pop: true - match: \S - scope: invalid.illegal.expected-dictionary.sublime-keymap + scope: invalid.illegal.expected-mapping.sublime-keymap expect-context-array: - include: context-array @@ -549,7 +548,7 @@ contexts: - match: (?=[},\]]) pop: true - match: \S - scope: invalid.illegal.expected-array.sublime-keymap + scope: invalid.illegal.expected-sequence.sublime-keymap expect-boolean: - match: \b(?:true|false|null)\b @@ -576,7 +575,7 @@ contexts: - include: comments inside-support-key: - - meta_scope: meta.structure.dictionary.key.json string.quoted.double.json + - meta_scope: meta.key.json string.quoted.double.json - meta_content_scope: support.function.sublime-keymap - match: \" scope: punctuation.definition.string.end.json @@ -597,7 +596,7 @@ contexts: expect-colon: - include: comments - match: ':' - scope: punctuation.separator.dictionary.key-value.json + scope: punctuation.separator.mapping.key-value.json pop: true - match: '(?=[,}])' pop: true @@ -606,7 +605,7 @@ contexts: expect-colon-value: - match: ':' - scope: punctuation.separator.dictionary.key-value.json + scope: punctuation.separator.mapping.key-value.json set: - match: (?=\[) set: [in-dictionary-expect-comma, dictionary-value-meta-scope, array] @@ -614,7 +613,7 @@ contexts: set: [in-dictionary-expect-comma, dictionary-value-meta-scope, dictionary] - match: (?=\S) set: - - meta_content_scope: meta.structure.dictionary.value.json + - meta_content_scope: meta.value.json - include: value - include: in-dictionary-expect-comma - include: comments diff --git a/Package/Sublime Text Keymap/syntax_test_keymap.json b/Package/Sublime Text Keymap/syntax_test_keymap.json index df2dfda8..1c04d0c8 100644 --- a/Package/Sublime Text Keymap/syntax_test_keymap.json +++ b/Package/Sublime Text Keymap/syntax_test_keymap.json @@ -3,34 +3,34 @@ // <- source.json.sublime.keymap // comment -// ^^^^^^^^ comment.line.double-slash - meta.keybinding.collection.sublime-keymap - meta.structure.array.json +// ^^^^^^^^ comment.line.double-slash - meta.keybinding.collection.sublime-keymap - meta.sequence.json [ -// <- meta.structure.array.json punctuation.definition.array.begin.json +// <- meta.sequence.json punctuation.section.sequence.begin.json { "keys": ["f5"], "command": "build" }, -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.structure.array.json meta.keybinding.collection.sublime-keymap meta.structure.dictionary.json -// ^ punctuation.definition.dictionary.begin.json punctuation.definition.keybinding.begin.sublime-keymap -// ^^^^^^ meta.structure.dictionary.key.json meta.main-key.sublime-keymap string.quoted.double.json +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.sequence.json meta.keybinding.collection.sublime-keymap meta.mapping.json +// ^ punctuation.section.mapping.begin.json punctuation.section.keybinding.begin.sublime-keymap +// ^^^^^^ meta.key.json meta.main-key.sublime-keymap string.quoted.double.json // ^^^^ keyword.other.main.sublime-keymap -// ^ - string.quoted.double.json - meta.structure.dictionary.key.json - meta.structure.dictionary.value.json -// ^^^^^^ meta.structure.dictionary.value.json meta.structure.array.json - meta.structure.dictionary.value.json meta.structure.dictionary.value.json +// ^ - string.quoted.double.json - meta.key - meta.value.json +// ^^^^^^ meta.value.json meta.sequence.json - meta.value.json meta.value.json // ^^^^ string.quoted.double.json // ^ punctuation.definition.string.begin.json // ^^ entity.other.attribute-name.key.named.sublime-keymap // ^ punctuation.definition.string.end.json -// ^ punctuation.separator.dictionary.pair.json - meta.structure.dictionary.value.json -// ^^^^^^^^^ meta.structure.dictionary.key.json meta.main-key.sublime-keymap string.quoted.double.json +// ^ punctuation.separator.mapping.pair.json - meta.value.json +// ^^^^^^^^^ meta.key.json meta.main-key.sublime-keymap string.quoted.double.json // ^ punctuation.definition.string.begin.json // ^^^^^^^ keyword.other.main.sublime-keymap // ^ punctuation.definition.string.end.json -// ^^^^^^^ meta.structure.dictionary.value.json string.quoted.double.json meta.command-name.sublime-keymap - meta.structure.dictionary.key.json - meta.structure.dictionary.value.json meta.structure.dictionary.value.json +// ^^^^^^^ meta.value.json string.quoted.double.json meta.command-name.sublime-keymap - meta.key - meta.value.json meta.value.json // ^ punctuation.definition.string.begin.json // ^^^^^ support.constant.command-name.sublime-keymap // ^ punctuation.definition.string.end.json // ^ - meta.command-name.sublime-keymap -// ^ punctuation.definition.dictionary.end.json punctuation.definition.keybinding.end.sublime-keymap -// ^^^ - meta.structure.dictionary.value.json -// ^ punctuation.separator.array.json - meta.structure.dictionary +// ^ punctuation.section.mapping.end.json punctuation.section.keybinding.end.sublime-keymap +// ^^^ - meta.value.json +// ^ punctuation.separator.sequence.json - meta.mapping { "keys" @@ -43,27 +43,27 @@ // context entries with a 'selector' key have their operand highlighted, // as long as the key comes before the operand { "key": "selector", "operand": "source.json.sublime" } -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.keybinding-context-collection.sublime-keymap meta.structure.dictionary.json meta.keybinding-context.sublime-keymap +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.keybinding-context-collection.sublime-keymap meta.mapping.json meta.keybinding-context.sublime-keymap // ^ - meta.keybinding-context.sublime-keymap // ^^^ support.function.context.sublime-keymap -// ^^^^^ meta.structure.dictionary.key.json string.quoted.double.json -// ^ - string.quoted.double.json - meta.structure.dictionary.key.json - meta.structure.dictionary.value.json meta.structure.dictionary.value.json +// ^^^^^ meta.key.json string.quoted.double.json +// ^ - string.quoted.double.json - meta.key - meta.value.json meta.value.json // ^^^^^^^^ storage.type.context.key-value.sublime-keymap -// ^^^^^^^^^^ meta.structure.dictionary.value.json string.quoted.double.json +// ^^^^^^^^^^ meta.value.json string.quoted.double.json // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.keybinding-context.selector.sublime-keymap -// ^^^^^^^^^ meta.structure.dictionary.key.json string.quoted.double.json +// ^^^^^^^^^ meta.key.json string.quoted.double.json // ^^^^^^^ support.function.context.sublime-keymap -// ^ - string.quoted.double.json - meta.structure.dictionary.key.json -// ^^^^^^^^^^^^^^^^^^^^^ meta.structure.dictionary.value.json meta.context.key-value.operand.selector.sublime-keymap string.quoted.double.json - string.quoted.double.json string.quoted.double.json +// ^ - string.quoted.double.json - meta.key +// ^^^^^^^^^^^^^^^^^^^^^ meta.value.json meta.context.key-value.operand.selector.sublime-keymap string.quoted.double.json - string.quoted.double.json string.quoted.double.json // ^^^^^^^^^^^^^^^^^^^ source.scope-selector.embedded.json-string // ^ punctuation.definition.string.begin.json // ^ punctuation.separator.scope-segments.scope-selector // ^ punctuation.separator.scope-segments.scope-selector // ^ punctuation.definition.string.end.json // ^ - meta.scope-selector.sublime-keymap -// ^ punctuation.definition.dictionary.end.json +// ^ punctuation.section.mapping.end.json ] -// ^ punctuation.definition.array.end.json +// ^ punctuation.section.sequence.end.json }, { @@ -76,9 +76,9 @@ // ^ - string.quoted.double.json // ^^^^^^^^ storage.type.context.key-value.sublime-keymap // ^^^^^^^^^^ string.quoted.double.json -// ^ punctuation.separator.dictionary.pair.json +// ^ punctuation.separator.mapping.pair.json // ^^^^^^^^ support.function.context.sublime-keymap -// ^^^^^^^^^^ meta.structure.dictionary.key.json string.quoted.double.json +// ^^^^^^^^^^ meta.key.json string.quoted.double.json // ^^^^^ keyword.operator.context.key-value.sublime-keymap // ^^^^^^^ support.function.context.sublime-keymap // ^^^^^^^^^ string.quoted.double.json @@ -92,15 +92,15 @@ // Complain about missing commas but don't be too obsessed with it {}, -//^^^^^^^^^^ invalid.illegal.expected-comma.inside-array.json +//^^^^^^^^^^ invalid.illegal.expected-comma.inside-sequence.json // ^^ - invalid -// ^ punctuation.separator.array.json +// ^ punctuation.separator.sequence.json // can also be in a different order and split over multiple lines { "operator" // ^^^^^^^^^^ meta.context-key.sublime-keymap : -// ^ punctuation.separator.dictionary.key-value.json +// ^ punctuation.separator.mapping.key-value.json "equal", // ^^^^^ keyword.operator.context.key-value.sublime-keymap "key": "selector", @@ -113,7 +113,7 @@ } { -//^^ invalid.illegal.expected-comma.inside-array.json +//^^ invalid.illegal.expected-comma.inside-sequence.json // ^ - invalid ,{ // the "contents" arg for the 'insert_snippet' command will have snippet syntax applied, @@ -121,53 +121,53 @@ "keys": ["ctrl+i"], "command": "insert_snippet", // ^^^^^^^^^^^^^^^^ meta.command-name.sublime-keymap -// ^^^^^^^^^^^^^^ string.quoted.double.json support.constant.command-name.sublime-keymap - meta.structure.dictionary.key.json +// ^^^^^^^^^^^^^^ string.quoted.double.json support.constant.command-name.sublime-keymap - meta.key "args": { "name": "Packages/XML/Snippets/long-tag.sublime-snippet" -// ^^^^ meta.structure.dictionary.key.json string.quoted.double.json support.function.sublime-keymap -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.structure.dictionary.value.json string.quoted.double.json +// ^^^^ meta.key.json string.quoted.double.json support.function.sublime-keymap +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.value.json string.quoted.double.json }, "args": { "contents": "$1" } -// ^ meta.structure.dictionary.value.json punctuation.definition.dictionary.end.json -// ^ punctuation.separator.dictionary.pair.json - meta.structure.dictionary.value.json +// ^ meta.value.json punctuation.section.mapping.end.json +// ^ punctuation.separator.mapping.pair.json - meta.value.json // ^^^^ string.quoted.double.json keyword.other.main.sublime-keymap -// ^^^^^^^^^^^^^^^^^^^^ meta.structure.dictionary.value.json -// ^ - meta.structure.dictionary.value.json -// ^^^^^^^^^^ meta.structure.dictionary.key.json string.quoted.double.json +// ^^^^^^^^^^^^^^^^^^^^ meta.value.json +// ^ - meta.value.json +// ^^^^^^^^^^ meta.key.json string.quoted.double.json // ^^^^^^^^ support.function.sublime-keymap // ^ keyword.other.block.start.snippet -// ^^^^ string.quoted.double.json - meta.structure.dictionary.key.json +// ^^^^ string.quoted.double.json - meta.key // ^ punctuation.definition.snippet.end.sublime-keymap ,"context": [ -// ^ punctuation.separator.dictionary.pair.json +// ^ punctuation.separator.mapping.pair.json // ^^^^^^^ meta.main-key.sublime-keymap { "key": "", "operator": "", "operand": "" }, // ^^ meta.context.key-value.key.unknown.sublime-keymap ], "command": "test", "args": { "contents": "$1" } -// ^ punctuation.separator.dictionary.pair.json +// ^ punctuation.separator.mapping.pair.json // ^^^^^^^ meta.main-key.sublime-keymap - meta.snippet-args // ^^ string - meta.snippet } -// ^ punctuation.definition.dictionary.end.json - meta.structure.dictionary.value.json +// ^ punctuation.section.mapping.end.json - meta.value.json , {"keyz": ["test"], "command": "blah", "keys": ["a", "b"], "keys": [a, "f20", "f21", "F"]} -// ^^^^^^ meta.structure.dictionary.key.json string.quoted.double.json - meta.main-key.sublime-keymap - keyword +// ^^^^^^ meta.key.json string.quoted.double.json - meta.main-key.sublime-keymap - keyword // ^^^^ support.function.sublime-keymap // ^ punctuation.definition.string.begin.json // ^ punctuation.definition.string.end.json // ^^^^ string.quoted.double.json -// ^ punctuation.definition.array.end.json -// ^ punctuation.separator.dictionary.pair.json +// ^ punctuation.section.sequence.end.json +// ^ punctuation.separator.mapping.pair.json // ^^^^^^^ string.quoted.double.json keyword.other.main.sublime-keymap // ^^^^ string.quoted.double.json keyword.other.main.sublime-keymap // ^^^ string.quoted.double.json -// ^ punctuation.separator.array.json +// ^ punctuation.separator.sequence.json // ^^^ string.quoted.double.json -// ^^ invalid.illegal.expected-string-or-end-of-array.sublime-keymap +// ^^ invalid.illegal.expected-string-or-end-of-sequence.sublime-keymap // ^^^ string.quoted.double.json entity.other.attribute-name.key.named.sublime-keymap -// ^ punctuation.separator.array.json +// ^ punctuation.separator.sequence.json // ^^^ string.quoted.double.json invalid.deprecated.key.sublime-keymap // ^ invalid.deprecated.key.upper-case.sublime-keymap -// ^ punctuation.definition.array.end.json +// ^ punctuation.section.sequence.end.json , { "keys": ["shift+alt+\\"] }, // ^^constant.character.escape.json @@ -178,9 +178,9 @@ // ^ constant.character.escape.json // ^ string.quoted.double.json string.key.literal.sublime-keymap - invalid.illegal.key.sublime-keymap // ^^^^^ string.quoted.double.json entity.other.attribute-name.key.named.sublime-keymap -// ^^^^^^ meta.structure.dictionary.key.json string.quoted.double.json meta.main-key.sublime-keymap +// ^^^^^^ meta.key.json string.quoted.double.json meta.main-key.sublime-keymap // ^ - string -// ^^^^^^^^ meta.structure.dictionary.value string.quoted.double.json +// ^^^^^^^^ meta.value string.quoted.double.json // ^ punctuation.definition.string.begin.json punctuation.definition.snippet.begin.sublime-keymap // ^ constant.character.escape.json // ^ - punctuation @@ -191,51 +191,51 @@ { "keys": ["alt+o", " "], "command": "switch_file", "args": {"extensions": ["cpp", "cxx", "cc", "c", "hpp", "hxx", "hh", "h", "ipp", "inl", "m", "mm"]} }, // ^^ string.quoted.double.json invalid.deprecated.key.sublime-keymap // ^ punctuation.definition.string.end.json - support.function.sublime-keymap -// ^ punctuation.definition.array.begin.json -// ^^^^^ string.quoted.double.json - support.function - meta.structure.dictionary.key.json - keyword -// ^ punctuation.separator.array.json -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.structure.dictionary.value.json meta.structure.array.json -// ^ punctuation.definition.dictionary.end.json +// ^ punctuation.section.sequence.begin.json +// ^^^^^ string.quoted.double.json - support.function - meta.key - keyword +// ^ punctuation.separator.sequence.json +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.value.json meta.sequence.json +// ^ punctuation.section.mapping.end.json { "keys": ["tab"], "command": "insert_best_completion", "args": {"default": "\t", "exact": false,, }, // trailing commas before closing dictionary punctuation / between dictionary keys are allowed -// ^ punctuation.definition.dictionary.begin.json punctuation.definition.keybinding.begin.sublime-keymap +// ^ punctuation.section.mapping.begin.json punctuation.section.keybinding.begin.sublime-keymap // ^^^^^^^ string.quoted.double.json support.function.sublime-keymap // ^^ string.quoted.double.json constant.character.escape.json -// ^ punctuation.separator.dictionary.pair.json +// ^ punctuation.separator.mapping.pair.json // ^^^^^ string.quoted.double.json support.function.sublime-keymap // ^^^^^ constant.language.json -// ^ punctuation.separator.dictionary.pair.json -// ^ invalid.illegal.expected-dictionary-key.json -// ^ punctuation.definition.dictionary.end.json +// ^ punctuation.separator.mapping.pair.json +// ^ invalid.illegal.expected-key.json +// ^ punctuation.section.mapping.end.json , context // but only one; and just don't match bare characters -// ^ invalid.illegal.expected-dictionary-key.sublime-keymap +// ^ invalid.illegal.expected-key.sublime-keymap // ^^^^^^^ - invalid "context": -// ^^^^^^^^^ meta.structure.dictionary.key.json meta.main-key.sublime-keymap string.quoted.double.json - meta.structure.dictionary.value.json +// ^^^^^^^^^ meta.key.json meta.main-key.sublime-keymap string.quoted.double.json - meta.value.json [ { "key": "setting.tab_completion", "operator": "equal", "operand": true }, -// ^^^^^ meta.structure.dictionary.key.json meta.context-key.sublime-keymap string.quoted.double.json +// ^^^^^ meta.key.json meta.context-key.sublime-keymap string.quoted.double.json // ^^^^^^^ storage.type.context.key-value.sublime-keymap // ^ punctuation.separator.setting-value.sublime-keymap - storage // ^^^^^^^^^^^^^^ variable.other.setting.sublime-keymap -// ^^^^^^^^^^ meta.structure.dictionary.key.json meta.context-key.sublime-keymap string.quoted.double.json -// ^^^^^ string.quoted.double.json keyword.operator.context.key-value.sublime-keymap - meta.structure.dictionary.key.json +// ^^^^^^^^^^ meta.key.json meta.context-key.sublime-keymap string.quoted.double.json +// ^^^^^ string.quoted.double.json keyword.operator.context.key-value.sublime-keymap - meta.key // ^^^^^^^ meta.context.key-value.operator.equality.sublime-keymap { "key": "preceding_text", "operator": "not_regex_match", "operand": ".*\\b[0-9]+$", "match_all": true }, // ^^^^^^^^^^^^^^ string.quoted.double.json storage.type.context.key-value.sublime-keymap -// ^^^^^^^^^^^^^^^^^ meta.structure.dictionary.value.json meta.context.key-value.operator.regex.sublime-keymap string.quoted.double.json - meta.structure.dictionary.key.json +// ^^^^^^^^^^^^^^^^^ meta.value.json meta.context.key-value.operator.regex.sublime-keymap string.quoted.double.json - meta.key // ^^^^^^^^^^^^^^^ keyword.operator.context.key-value.sublime-keymap -// ^^^^^^^^^^^^^^ meta.structure.dictionary.value.json meta.context.key-value.operand.regex.sublime-keymap string.quoted.double.json +// ^^^^^^^^^^^^^^ meta.value.json meta.context.key-value.operand.regex.sublime-keymap string.quoted.double.json // ^^^^^^^^^^^^ source.regexp.embedded.json-string // ^ keyword // ^^^ entity.other.attribute-name.anchor { "key": "preceding_text", "operator": "equal" }, // trailing commas before closing array punctuation are allowed ,] // but only one -// ^ invalid.illegal.expected-dictionary-or-end-of-array.sublime-keymap - punctuation.separator.array.json -// ^ punctuation.definition.array.end.json +// ^ invalid.illegal.expected-mapping-or-end-of-sequence.sublime-keymap - punctuation.separator.sequence.json +// ^ punctuation.section.sequence.end.json }, -// ^ punctuation.definition.dictionary.end.json punctuation.definition.keybinding.end.sublime-keymap +// ^ punctuation.section.mapping.end.json punctuation.section.keybinding.end.sublime-keymap { "keys": [""], "command": "text_and_align_table", "context": // ^^^^^^^^^ string.quoted.double.json entity.other.attribute-name.key.captured.sublime-keymap @@ -243,11 +243,11 @@ // this is a comment // ^^^^^^^^^^^^^^^^^^ comment.line.double-slash [, -// ^ punctuation.definition.array.begin.json -// ^ invalid.illegal.expected-dictionary-or-end-of-array.sublime-keymap +// ^ punctuation.section.sequence.begin.json +// ^ invalid.illegal.expected-mapping-or-end-of-sequence.sublime-keymap { "key": "setting.enable_table_editor", "operator": "equal", "operand": true, "match_all": true }/*test*/, // ^^^^^^^^ comment.block -// ^ punctuation.separator.array.json +// ^ punctuation.separator.sequence.json { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*\\|\t\\\b\\b\s\\s", "match_all": true }, // ^^ entity.other.attribute-name.escape.sequence.json.escapedregexp // ^^ constant.character.escape.sequence.regexp.escapedregexp @@ -257,31 +257,31 @@ // ^^^ keyword.other.character-class.escapedregexp { "key": "following_text", "operator": "regex_match", "operand": "\\s*\\|.*$" /*test*/, /*test*/ "match_all":/*false*/ true }, // ^ - string -// ^^^^^^^^^^^^ meta.structure.dictionary.value.json meta.context.key-value.operand.regex.sublime-keymap string.quoted.double.json +// ^^^^^^^^^^^^ meta.value.json meta.context.key-value.operand.regex.sublime-keymap string.quoted.double.json // ^^^^^^^^^^^^^^^^^^^^ - meta.context-key.sublime-keymap // ^^^^^^^^ comment.block -// ^ punctuation.separator.dictionary.pair.json +// ^ punctuation.separator.mapping.pair.json // ^^^^^^^^ comment.block // ^^^^^^^^^^^ meta.context-key.sublime-keymap -// ^ punctuation.separator.dictionary.key-value.json - meta.context.key-value.match-all.sublime-keymap +// ^ punctuation.separator.mapping.key-value.json - meta.context.key-value.match-all.sublime-keymap // ^^^^^^^^^ comment.block // ^^^^^^^^^^^^^^ meta.keybinding-context.sublime-keymap meta.context.key-value.match-all.sublime-keymap -// ^^^^ meta.structure.dictionary.value.json constant.language.json -// ^ punctuation.definition.dictionary.end.json - meta.context.key-value.match-all.sublime-keymap +// ^^^^ meta.value.json constant.language.json +// ^ punctuation.section.mapping.end.json - meta.context.key-value.match-all.sublime-keymap { "key": "settingabc" }, { "key": "", "operator": " " }, // ^^^^^ meta.context-key.sublime-keymap string.quoted.double.json -// ^^^^^^^^^^^^ meta.structure.dictionary.value.json meta.context.key-value.key.unknown.sublime-keymap string.quoted.double.json - storage.type.context.key-value.sublime-keymap +// ^^^^^^^^^^^^ meta.value.json meta.context.key-value.key.unknown.sublime-keymap string.quoted.double.json - storage.type.context.key-value.sublime-keymap // ^ punctuation.definition.string.begin.json // ^ punctuation.definition.string.end.json -// ^ - meta.punctuation.separator.dictionary.key-value.json +// ^ - meta.punctuation.separator.mapping.key-value.json // ^ - meta.context.key-value.key.unknown.sublime-keymap -// ^^ meta.structure.dictionary.value.json meta.context.key-value.key.unknown.sublime-keymap string.quoted.double.json +// ^^ meta.value.json meta.context.key-value.key.unknown.sublime-keymap string.quoted.double.json // ^ punctuation.definition.string.begin.json // ^ punctuation.definition.string.end.json // ^ - meta.context.key-value.key.unknown.sublime-keymap // ^^^^^^^^ meta.context-key.sublime-keymap string.quoted.double.json support.function.context.sublime-keymap -// ^ - punctuation.separator.dictionary.key-value.json -// ^^^ meta.structure.dictionary.value.json meta.context.key-value.operator.unknown.sublime-keymap string.quoted.double.json +// ^ - punctuation.separator.mapping.key-value.json +// ^^^ meta.value.json meta.context.key-value.operator.unknown.sublime-keymap string.quoted.double.json // ^ punctuation.definition.string.begin.json // ^ punctuation.definition.string.end.json { "key": "setting.abc.def_ghi" }, @@ -293,21 +293,21 @@ // ^^^^^^ meta.unknown-context-key.sublime-keymap string.quoted.double.json // ^ punctuation.definition.string.begin.json // ^ punctuation.definition.string.end.json -// ^^^^^^^^^ meta.structure.dictionary.value.json string.quoted.double.json - meta.context.key-value -// ^^^ meta.structure.dictionary.value.json invalid.illegal.expected-comma.inside-dictionary.json -// ^^^^^^^^ invalid.illegal.expected-dictionary-or-end-of-array.sublime-keymap -// ^^^^^^^^^^ invalid.illegal.expected-dictionary-or-end-of-array.sublime-keymap -// ^^^ invalid.illegal.expected-dictionary-or-end-of-array.sublime-keymap +// ^^^^^^^^^ meta.value.json string.quoted.double.json - meta.context.key-value +// ^^^ meta.value.json invalid.illegal.expected-comma.inside-mapping.json +// ^^^^^^^^ invalid.illegal.expected-mapping-or-end-of-sequence.sublime-keymap +// ^^^^^^^^^^ invalid.illegal.expected-mapping-or-end-of-sequence.sublime-keymap +// ^^^ invalid.illegal.expected-mapping-or-end-of-sequence.sublime-keymap // ] -// ^ punctuation.definition.array.end.json +// ^ punctuation.section.sequence.end.json }, { "key": "abc", "args": { "key": "abc" } }, -// ^^^^^ meta.structure.dictionary.key.json string.quoted.double.json - meta.context-key.sublime-keymap -// ^^^^^^ meta.structure.dictionary.key.json meta.main-key.sublime-keymap string.quoted.double.json - meta.structure.dictionary.value.json -// ^^^^^^^^^^^^^^^^ meta.structure.dictionary.value.json -// ^^^^^ meta.structure.dictionary.key.json string.quoted.double.json - meta.context-key.sublime-keymap +// ^^^^^ meta.key.json string.quoted.double.json - meta.context-key.sublime-keymap +// ^^^^^^ meta.key.json meta.main-key.sublime-keymap string.quoted.double.json - meta.value.json +// ^^^^^^^^^^^^^^^^ meta.value.json +// ^^^^^ meta.key.json string.quoted.double.json - meta.context-key.sublime-keymap { "keys": ["alt+;"],