From ac80cf7d9d681677b023d21d146143ef68f2c0c8 Mon Sep 17 00:00:00 2001 From: Ashwin Shenoy Date: Tue, 1 Dec 2020 22:44:46 +0530 Subject: [PATCH 1/4] Add completions for various `block_caret_` globals. This commit adds completions for various `block_caret_` globals introduced in Build 4086. --- .../Globals Keys.sublime-completions | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Package/Sublime Text Color Scheme/Completions/Globals Keys.sublime-completions b/Package/Sublime Text Color Scheme/Completions/Globals Keys.sublime-completions index a7036871..93e13e91 100644 --- a/Package/Sublime Text Color Scheme/Completions/Globals Keys.sublime-completions +++ b/Package/Sublime Text Color Scheme/Completions/Globals Keys.sublime-completions @@ -25,6 +25,24 @@ "contents": "\"block_caret\": \"$1\",", "kind": ["keyword", "k", "globals"], }, + { + "trigger": "block_caret_corner_style", + "details": "Block caret corner style", + "contents": "\"block_caret_corner_style\": \"$1\",", + "kind": ["keyword", "k", "globals"], + }, + { + "trigger": "block_caret_border", + "details": "Block caret border color", + "contents": "\"block_caret_border\": \"$1\",", + "kind": ["keyword", "k", "globals"], + }, + { + "trigger": "block_caret_underline", + "details": "Color of the block caret in selection", + "contents": "\"block_caret_underline\": \"$1\",", + "kind": ["keyword", "k", "globals"], + }, { "trigger": "bracket_contents_foreground", "details": "Foreground color of highlighted brackets (inside)", From 6e2bbb77e1c5ec7f32257144a02cc3dd7b529a98 Mon Sep 17 00:00:00 2001 From: Ashwin Shenoy Date: Tue, 1 Dec 2020 22:48:55 +0530 Subject: [PATCH 2/4] Add appropriate highlighting for `block_caret_` globals. This commit adds appropriate highlighting for `block_caret_` globals in color schemes. --- .../Sublime Text Color Scheme.sublime-syntax | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package/Sublime Text Color Scheme/Sublime Text Color Scheme.sublime-syntax b/Package/Sublime Text Color Scheme/Sublime Text Color Scheme.sublime-syntax index 4bef6450..f12fd880 100644 --- a/Package/Sublime Text Color Scheme/Sublime Text Color Scheme.sublime-syntax +++ b/Package/Sublime Text Color Scheme/Sublime Text Color Scheme.sublime-syntax @@ -233,7 +233,7 @@ contexts: |brackets_foreground|bracket_contents_foreground|tags_foreground |minimap_border|gutter|gutter_foreground|rulers|fold_marker |line_diff_(?:modified|added|deleted) # added in 3186 & 3189 - |block_caret # added in 3190 + |block_caret(?:_(?:corner_style|border|underline)) # block_caret added in 3190, others in 4086. )(") captures: 1: punctuation.definition.string.begin.json From 2e643a53d043e94df7edfaa9631e291d5b7a8fac Mon Sep 17 00:00:00 2001 From: Ashwin Shenoy Date: Wed, 2 Dec 2020 09:18:50 +0530 Subject: [PATCH 3/4] Add a new setting and a fix. This commit 1. Adds the `block_caret_corner_radius`. 2. Fixes an issue where `block_caret` wasn't being highlighted. --- .../Completions/Globals Keys.sublime-completions | 6 ++++++ .../Sublime Text Color Scheme.sublime-syntax | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Package/Sublime Text Color Scheme/Completions/Globals Keys.sublime-completions b/Package/Sublime Text Color Scheme/Completions/Globals Keys.sublime-completions index 93e13e91..9e96cda6 100644 --- a/Package/Sublime Text Color Scheme/Completions/Globals Keys.sublime-completions +++ b/Package/Sublime Text Color Scheme/Completions/Globals Keys.sublime-completions @@ -43,6 +43,12 @@ "contents": "\"block_caret_underline\": \"$1\",", "kind": ["keyword", "k", "globals"], }, + { + "trigger": "block_caret_corner_radius", + "details": "Block caret corner radius", + "contents": "\"block_caret_corner_radius\": \"$1\",", + "kind": ["keyword", "k", "globals"], + }, { "trigger": "bracket_contents_foreground", "details": "Foreground color of highlighted brackets (inside)", diff --git a/Package/Sublime Text Color Scheme/Sublime Text Color Scheme.sublime-syntax b/Package/Sublime Text Color Scheme/Sublime Text Color Scheme.sublime-syntax index f12fd880..cdee86c1 100644 --- a/Package/Sublime Text Color Scheme/Sublime Text Color Scheme.sublime-syntax +++ b/Package/Sublime Text Color Scheme/Sublime Text Color Scheme.sublime-syntax @@ -233,7 +233,7 @@ contexts: |brackets_foreground|bracket_contents_foreground|tags_foreground |minimap_border|gutter|gutter_foreground|rulers|fold_marker |line_diff_(?:modified|added|deleted) # added in 3186 & 3189 - |block_caret(?:_(?:corner_style|border|underline)) # block_caret added in 3190, others in 4086. + |block_caret(?:_(?:corner_style|border|underline|corner_radius))? # block_caret added in 3190, others in 4086. )(") captures: 1: punctuation.definition.string.begin.json From 0005ba2c8279122d31243ff16f99abb0eb22f984 Mon Sep 17 00:00:00 2001 From: Ashwin Shenoy Date: Wed, 2 Dec 2020 12:55:47 +0530 Subject: [PATCH 4/4] A few fixes. This commit 1. Places the `block_caret_corner_radius` in the correct context so that the integer radius gets the correct scope. 2. Places the `block_caret_corner_style` in the correct context so that the corner style gets the correct scope. --- .../Sublime Text Color Scheme.sublime-syntax | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Package/Sublime Text Color Scheme/Sublime Text Color Scheme.sublime-syntax b/Package/Sublime Text Color Scheme/Sublime Text Color Scheme.sublime-syntax index cdee86c1..ac2f9153 100644 --- a/Package/Sublime Text Color Scheme/Sublime Text Color Scheme.sublime-syntax +++ b/Package/Sublime Text Color Scheme/Sublime Text Color Scheme.sublime-syntax @@ -233,7 +233,7 @@ contexts: |brackets_foreground|bracket_contents_foreground|tags_foreground |minimap_border|gutter|gutter_foreground|rulers|fold_marker |line_diff_(?:modified|added|deleted) # added in 3186 & 3189 - |block_caret(?:_(?:corner_style|border|underline|corner_radius))? # block_caret added in 3190, others in 4086. + |block_caret(?:_(?:border|underline))? # block_caret added in 3190, others in 4086. )(") captures: 1: punctuation.definition.string.begin.json @@ -246,7 +246,7 @@ contexts: 2: entity.name.globals.sublime-color-scheme 3: punctuation.definition.string.end.json set: [expect-css-string-value, expect-colon] - - match: (")(shadow_width|selection_corner_radius|selection_border_width|line_diff_width)(") + - match: (")(shadow_width|(?:selection|block_caret)_corner_radius|selection_border_width|line_diff_width)(") captures: 1: punctuation.definition.string.begin.json 2: entity.name.globals.sublime-color-scheme @@ -264,7 +264,7 @@ contexts: 2: entity.name.globals.sublime-color-scheme 3: punctuation.definition.string.end.json set: [expect-underlinestyle-string-value, expect-colon] - - match: (")(selection_corner_style)(") + - match: (")((?:selection|block_caret)_corner_style)(") captures: 1: punctuation.definition.string.begin.json 2: entity.name.globals.sublime-color-scheme