From 6449392985fcb23361b858e23f41d10cba576104 Mon Sep 17 00:00:00 2001 From: Anton Date: Mon, 1 Nov 2021 11:40:29 +0300 Subject: [PATCH] Capture object keys to reveal it in the "Jump to Symbol" list --- Preferences/Symbol List.tmPreferences | 17 ++++++++++++++++ Syntaxes/JSON.tmLanguage | 28 +++++++++++++++++++++++++-- 2 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 Preferences/Symbol List.tmPreferences diff --git a/Preferences/Symbol List.tmPreferences b/Preferences/Symbol List.tmPreferences new file mode 100644 index 0000000..cdf52bd --- /dev/null +++ b/Preferences/Symbol List.tmPreferences @@ -0,0 +1,17 @@ + + + + + name + Symbol List + scope + source.json meta.structure.dictionary.key.json + settings + + showInSymbolList + + + uuid + 20FB3328-4D91-4FEE-996E-21B5F5B40A9F + + diff --git a/Syntaxes/JSON.tmLanguage b/Syntaxes/JSON.tmLanguage index 1d2caf9..2d1cb1e 100644 --- a/Syntaxes/JSON.tmLanguage +++ b/Syntaxes/JSON.tmLanguage @@ -129,8 +129,32 @@ comment the JSON object key - include - #string + name + meta.structure.dictionary.key.json + begin + (?<=\{\n)|(\{)|(?<=,\s)|(,) + beginCaptures + + 1 + + name + punctuation.definition.dictionary.begin.json + + 2 + + name + punctuation.separator.dictionary.pair.json + + + end + (?=:) + patterns + + + include + #string + + begin