From 7fabde79dc954d456ccb0eb776a986d13525fa65 Mon Sep 17 00:00:00 2001 From: mvllow Date: Sun, 7 Apr 2019 18:32:24 -0500 Subject: [PATCH 1/3] Add official Prettier meta_scope for styled-components (#196) --- syntaxes/fjsx15/literal/string/styled-component.sublime-syntax | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntaxes/fjsx15/literal/string/styled-component.sublime-syntax b/syntaxes/fjsx15/literal/string/styled-component.sublime-syntax index 5d3856e5..7a8a9e1d 100644 --- a/syntaxes/fjsx15/literal/string/styled-component.sublime-syntax +++ b/syntaxes/fjsx15/literal/string/styled-component.sublime-syntax @@ -153,7 +153,6 @@ contexts: 1: punctuation.accessor.js.fjsx15 2: support.function.styled-component.js.fjsx15 set: styled-component-begin - pop-now: - match: "" pop: true @@ -190,6 +189,7 @@ contexts: styled-component-content: - clear_scopes: true + - meta_scope: source.css.embedded.js - meta_content_scope: source.css - include: comment-no-pop - include: shared-content From 268f59aceffe74fe21b6c6c8e1925282726906c3 Mon Sep 17 00:00:00 2001 From: mvllow Date: Tue, 9 Apr 2019 13:51:09 -0500 Subject: [PATCH 2/3] Fix duplicate scoping --- syntaxes/fjsx15/literal/string/styled-component.sublime-syntax | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/syntaxes/fjsx15/literal/string/styled-component.sublime-syntax b/syntaxes/fjsx15/literal/string/styled-component.sublime-syntax index 7a8a9e1d..68d6d089 100644 --- a/syntaxes/fjsx15/literal/string/styled-component.sublime-syntax +++ b/syntaxes/fjsx15/literal/string/styled-component.sublime-syntax @@ -189,8 +189,7 @@ contexts: styled-component-content: - clear_scopes: true - - meta_scope: source.css.embedded.js - - meta_content_scope: source.css + - meta_content_scope: source.css.embedded.js - include: comment-no-pop - include: shared-content # Recover ruleset block. From c41e5d43a5dc0e6755dd2961d3f48731fc6f2a73 Mon Sep 17 00:00:00 2001 From: mvllow Date: Tue, 9 Apr 2019 13:59:40 -0500 Subject: [PATCH 3/3] Use same embedded scope everywhere --- syntaxes/fjsx15/literal/string/styled-component.sublime-syntax | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntaxes/fjsx15/literal/string/styled-component.sublime-syntax b/syntaxes/fjsx15/literal/string/styled-component.sublime-syntax index 68d6d089..600b7cd8 100644 --- a/syntaxes/fjsx15/literal/string/styled-component.sublime-syntax +++ b/syntaxes/fjsx15/literal/string/styled-component.sublime-syntax @@ -201,7 +201,7 @@ contexts: styled-component-content-keyframes: - clear_scopes: true - - meta_content_scope: source.css + - meta_content_scope: source.css.embedded.js - include: comment-no-pop - include: shared-content - match: (?=\S)