Skip to content

Commit

Permalink
Add color rules for embedded/interpolation punctuation
Browse files Browse the repository at this point in the history
This commit highlights punctuation of embedded and interpolated code blocks
like html/xml tags.

Example:

   Jinja/Twig/... tags like

   {% tag ... %}
   {{ variable }}
  • Loading branch information
deathaxe committed Oct 18, 2024
1 parent 38b5bea commit 3c30990
Show file tree
Hide file tree
Showing 10 changed files with 111 additions and 10 deletions.
12 changes: 11 additions & 1 deletion Base16 Eighties Dark.sublime-color-scheme
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,24 @@
},
{
"name": "Definition Punctuation",
"scope": "punctuation.",
"scope": "punctuation.definition",
"foreground": "var(base0C)"
},
{
"name": "Section Punctuation",
"scope": "punctuation.section",
"foreground": "var(base04)"
},
{
"name": "Embedded Punctuation",
"scope": "meta.embedded punctuation.section.embedded",
"foreground": "var(base0C)",
},
{
"name": "Interpolation Punctuation",
"scope": "meta.interpolation punctuation.section.interpolation, meta.interpolation punctuation.definition.variable - meta.interpolation variable",
"foreground": "var(base0C)",
},

// Keywords

Expand Down
12 changes: 11 additions & 1 deletion Base16 Mocha Dark.sublime-color-scheme
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,24 @@
},
{
"name": "Definition Punctuation",
"scope": "punctuation.",
"scope": "punctuation.definition",
"foreground": "var(base0C)"
},
{
"name": "Section Punctuation",
"scope": "punctuation.section",
"foreground": "var(base04)"
},
{
"name": "Embedded Punctuation",
"scope": "meta.embedded punctuation.section.embedded",
"foreground": "var(base0C)",
},
{
"name": "Interpolation Punctuation",
"scope": "meta.interpolation punctuation.section.interpolation, meta.interpolation punctuation.definition.variable - meta.interpolation variable",
"foreground": "var(base0C)",
},

// Keywords

Expand Down
12 changes: 11 additions & 1 deletion Base16 Ocean Dark.sublime-color-scheme
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,24 @@
},
{
"name": "Definition Punctuation",
"scope": "punctuation.",
"scope": "punctuation.definition",
"foreground": "var(base0C)"
},
{
"name": "Section Punctuation",
"scope": "punctuation.section",
"foreground": "var(base04)"
},
{
"name": "Embedded Punctuation",
"scope": "meta.embedded punctuation.section.embedded",
"foreground": "var(base0C)",
},
{
"name": "Interpolation Punctuation",
"scope": "meta.interpolation punctuation.section.interpolation, meta.interpolation punctuation.definition.variable - meta.interpolation variable",
"foreground": "var(base0C)",
},

// Keywords

Expand Down
12 changes: 11 additions & 1 deletion Base16 Ocean Light.sublime-color-scheme
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,24 @@
},
{
"name": "Definition Punctuation",
"scope": "punctuation.",
"scope": "punctuation.definition",
"foreground": "var(base0C)"
},
{
"name": "Section Punctuation",
"scope": "punctuation.section",
"foreground": "var(base03)"
},
{
"name": "Embedded Punctuation",
"scope": "meta.embedded punctuation.section.embedded",
"foreground": "var(base0C)",
},
{
"name": "Interpolation Punctuation",
"scope": "meta.interpolation punctuation.section.interpolation, meta.interpolation punctuation.definition.variable - meta.interpolation variable",
"foreground": "var(base0C)",
},

// Keywords

Expand Down
13 changes: 12 additions & 1 deletion Base16 Oceanic.sublime-color-scheme
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,24 @@
},
{
"name": "Definition Punctuation",
"scope": "punctuation.",
"scope": "punctuation.definition",
"foreground": "var(base0C)"
},
{
"name": "Section Punctuation",
"scope": "punctuation.section",
"foreground": "var(base04)"
},
{
"name": "Embedded Punctuation",
"scope": "meta.embedded punctuation.section.embedded",
"foreground": "var(base0C)",
},
{
"name": "Interpolation Punctuation",
"scope": "meta.interpolation punctuation.section.interpolation, meta.interpolation punctuation.definition.variable - meta.interpolation variable",
"foreground": "var(base0C)",
},

// Keywords

Expand All @@ -106,6 +116,7 @@
},

// Classes, Functions, Types, Variables, ...

{
"name": "Entities",
"scope": "entity",
Expand Down
12 changes: 11 additions & 1 deletion widgets/Widget - Spacegray Eighties.hidden-color-scheme
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,24 @@
},
{
"name": "Definition Punctuation",
"scope": "punctuation.",
"scope": "punctuation.definition",
"foreground": "var(base0C)"
},
{
"name": "Section Punctuation",
"scope": "punctuation.section",
"foreground": "var(base04)"
},
{
"name": "Embedded Punctuation",
"scope": "meta.embedded punctuation.section.embedded",
"foreground": "var(base0C)",
},
{
"name": "Interpolation Punctuation",
"scope": "meta.interpolation punctuation.section.interpolation, meta.interpolation punctuation.definition.variable - meta.interpolation variable",
"foreground": "var(base0C)",
},

// Keywords

Expand Down
12 changes: 11 additions & 1 deletion widgets/Widget - Spacegray Light.hidden-color-scheme
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,24 @@
},
{
"name": "Definition Punctuation",
"scope": "punctuation.",
"scope": "punctuation.definition",
"foreground": "var(base0C)"
},
{
"name": "Section Punctuation",
"scope": "punctuation.section",
"foreground": "var(base03)"
},
{
"name": "Embedded Punctuation",
"scope": "meta.embedded punctuation.section.embedded",
"foreground": "var(base0C)",
},
{
"name": "Interpolation Punctuation",
"scope": "meta.interpolation punctuation.section.interpolation, meta.interpolation punctuation.definition.variable - meta.interpolation variable",
"foreground": "var(base0C)",
},

// Keywords

Expand Down
12 changes: 11 additions & 1 deletion widgets/Widget - Spacegray Mocha.hidden-color-scheme
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,24 @@
},
{
"name": "Definition Punctuation",
"scope": "punctuation.",
"scope": "punctuation.definition",
"foreground": "var(base0C)"
},
{
"name": "Section Punctuation",
"scope": "punctuation.section",
"foreground": "var(base04)"
},
{
"name": "Embedded Punctuation",
"scope": "meta.embedded punctuation.section.embedded",
"foreground": "var(base0C)",
},
{
"name": "Interpolation Punctuation",
"scope": "meta.interpolation punctuation.section.interpolation, meta.interpolation punctuation.definition.variable - meta.interpolation variable",
"foreground": "var(base0C)",
},

// Keywords

Expand Down
12 changes: 11 additions & 1 deletion widgets/Widget - Spacegray Oceanic.hidden-color-scheme
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,24 @@
},
{
"name": "Definition Punctuation",
"scope": "punctuation.",
"scope": "punctuation.definition",
"foreground": "var(base0C)"
},
{
"name": "Section Punctuation",
"scope": "punctuation.section",
"foreground": "var(base04)"
},
{
"name": "Embedded Punctuation",
"scope": "meta.embedded punctuation.section.embedded",
"foreground": "var(base0C)",
},
{
"name": "Interpolation Punctuation",
"scope": "meta.interpolation punctuation.section.interpolation, meta.interpolation punctuation.definition.variable - meta.interpolation variable",
"foreground": "var(base0C)",
},

// Keywords

Expand Down
12 changes: 11 additions & 1 deletion widgets/Widget - Spacegray.hidden-color-scheme
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,24 @@
},
{
"name": "Definition Punctuation",
"scope": "punctuation.",
"scope": "punctuation.definition",
"foreground": "var(base0C)"
},
{
"name": "Section Punctuation",
"scope": "punctuation.section",
"foreground": "var(base04)"
},
{
"name": "Embedded Punctuation",
"scope": "meta.embedded punctuation.section.embedded",
"foreground": "var(base0C)",
},
{
"name": "Interpolation Punctuation",
"scope": "meta.interpolation punctuation.section.interpolation, meta.interpolation punctuation.definition.variable - meta.interpolation variable",
"foreground": "var(base0C)",
},

// Keywords

Expand Down

0 comments on commit 3c30990

Please sign in to comment.