Skip to content

Instantly share code, notes, and snippets.

@matias-eduardo
Last active December 29, 2022 02:57
Show Gist options
  • Save matias-eduardo/78e3af9864fd3f2267205bf9db222085 to your computer and use it in GitHub Desktop.
Save matias-eduardo/78e3af9864fd3f2267205bf9db222085 to your computer and use it in GitHub Desktop.
Sublime Text Settings and Syntax Highlighting
{
"name": "Cool Monokai",
"author": "Matias Eduardo",
"variables":
{
"black": "#0F131A",
"black2": "#151B27",
"black3": "#1A202E",
"blue": "hsl(190, 81%, 67%)",
"grey": "hsl(55, 8%, 26%)",
"orange": "hsl(32, 98%, 56%)",
"orange2": "hsl(30, 83%, 34%)",
"orange3": "hsl(47, 100%, 79%)",
"purple": "hsl(261, 100%, 75%)",
"red": "hsl(0, 93%, 59%)",
"red2": "hsl(338, 95%, 56%)",
"white": "#FBFDFE",
"white2": "#ECF1F7",
"white3": "#ECF1F7",
"yellow": "hsl(54, 70%, 68%)",
"yellow2": "hsl(80, 76%, 53%)",
"yellow3": "hsl(60, 12%, 79%)",
"yellow4": "hsl(55, 11%, 22%)",
"yellow5": "#64748B"
},
"globals":
{
"foreground": "var(white3)",
"background": "var(black3)",
"caret": "color(var(white2) alpha(0.9))",
"block_caret": "color(var(white2) alpha(0.4))",
"invisibles": "color(var(white3) alpha(0.35))",
"line_highlight": "var(yellow4)",
"selection": "var(grey)",
"selection_border": "var(black2)",
"misspelling": "var(red2)",
"active_guide": "color(var(orange2) alpha(0.69))",
"find_highlight_foreground": "var(black)",
"find_highlight": "var(orange3)",
"brackets_options": "underline",
"brackets_foreground": "color(var(white3) alpha(0.65))",
"bracket_contents_options": "underline",
"bracket_contents_foreground": "color(var(white3) alpha(0.65))",
"tags_options": "stippled_underline"
},
"rules":
[
{
"background": "#353535FF",
"scope": "col_353535FF",
"foreground": "#B5B5B5FF"
},
{
"background": "#191919FF",
"scope": "col_191919FF",
"foreground": "#999999FF"
},
{
"background": "#B5B5B5FF",
"scope": "col_B5B5B5FF",
"foreground": "#353535FF"
},
{
"background": "#3232322B",
"scope": "col_3232322B",
"foreground": "#A2A2A2FF"
},
{
"background": "#2E2F30FF",
"scope": "col_2E2F30FF",
"foreground": "#AEAEAEFF"
},
{
"background": "#730E15FF",
"scope": "col_730E15FF",
"foreground": "#ACACACFF"
},
{
"background": "#B00100FF",
"scope": "col_B00100FF",
"foreground": "#B5B5B5FF"
},
{
"background": "#999999FF",
"scope": "col_999999FF",
"foreground": "#191919FF"
},
{
"scope": "col_989898FF",
"foreground": "#181818FF",
"background": "#989898FF"
},
{
"scope": "col_181818FF",
"foreground": "#989898FF",
"background": "#181818FF"
},
{
"scope": "col_659EFFFF",
"foreground": "#181818FF",
"background": "#659EFFFF"
},
{
"scope": "col_698FFFFF",
"foreground": "#101010FF",
"background": "#698FFFFF"
},
{
"scope": "col_4F7BFFFF",
"foreground": "#FCFCFCFF",
"background": "#4F7BFFFF"
},
{
"scope": "col_5983FFFF",
"foreground": "#040404FF",
"background": "#5983FFFF"
},
{
"scope": "col_6277FFFF",
"foreground": "#000000FF",
"background": "#6277FFFF"
},
{
"scope": "col_5B71FFFF",
"foreground": "#FAFAFAFF",
"background": "#5B71FFFF"
},
{
"scope": "col_919191FF",
"foreground": "#111111FF",
"background": "#919191FF"
},
{
"scope": "col_111111FF",
"foreground": "#919191FF",
"background": "#111111FF"
},
{
"scope": "col_6873EBFF",
"foreground": "#FDFDFDFF",
"background": "#6873EBFF"
},
{
"scope": "col_EB687EFF",
"foreground": "#111111FF",
"background": "#EB687EFF"
},
{
"scope": "col_EB8B9BFF",
"foreground": "#292929FF",
"background": "#EB8B9BFF"
},
{
"scope": "col_008DDEFF",
"foreground": "#ECECECFF",
"background": "#008DDEFF"
},
{
"scope": "col_838383FF",
"foreground": "#030303FF",
"background": "#838383FF"
},
{
"scope": "col_030303FF",
"foreground": "#838383FF",
"background": "#030303FF"
},
{
"scope": "col_1DA3F1FF",
"foreground": "#030303FF",
"background": "#1DA3F1FF"
},
{
"scope": "col_11DDAAFF",
"foreground": "#1A1A1AFF",
"background": "#11DDAAFF"
},
{
"scope": "col_11DDAA33",
"foreground": "#B8B8B8FF",
"background": "#11DDAA33"
},
{
"scope": "col_5D5D5DFF",
"foreground": "#DDDDDDFF",
"background": "#5D5D5DFF"
},
{
"scope": "col_565656FF",
"foreground": "#D6D6D6FF",
"background": "#565656FF"
},
{
"scope": "col_909090FF",
"foreground": "#101010FF",
"background": "#909090FF"
},
{
"scope": "col_B0B0B0FF",
"foreground": "#303030FF",
"background": "#B0B0B0FF"
},
{
"scope": "col_656565FF",
"foreground": "#E5E5E5FF",
"background": "#656565FF"
},
{
"scope": "col_FBFBFBFF",
"foreground": "#7B7B7BFF",
"background": "#FBFBFBFF"
},
{
"scope": "col_171717FF",
"foreground": "#979797FF",
"background": "#171717FF"
},
{
"scope": "col_A4A4A4FF",
"foreground": "#242424FF",
"background": "#A4A4A4FF"
},
{
"scope": "col_8D8D8DFF",
"foreground": "#0D0D0DFF",
"background": "#8D8D8DFF"
},
{
"scope": "col_E6E6E6FF",
"foreground": "#666666FF",
"background": "#E6E6E6FF"
},
{
"scope": "col_A1A1A1FF",
"foreground": "#212121FF",
"background": "#A1A1A1FF"
},
{
"scope": "col_ACACACFF",
"foreground": "#2C2C2CFF",
"background": "#ACACACFF"
},
{
"scope": "col_818181FF",
"foreground": "#010101FF",
"background": "#818181FF"
},
{
"scope": "col_595959FF",
"foreground": "#D9D9D9FF",
"background": "#595959FF"
},
{
"scope": "col_878787FF",
"foreground": "#070707FF",
"background": "#878787FF"
},
{
"scope": "col_848484FF",
"foreground": "#040404FF",
"background": "#848484FF"
},
{
"scope": "col_AEAEAEFF",
"foreground": "#2E2E2EFF",
"background": "#AEAEAEFF"
},
{
"scope": "col_858585FF",
"foreground": "#050505FF",
"background": "#858585FF"
},
{
"scope": "col_E7E7E7FF",
"foreground": "#676767FF",
"background": "#E7E7E7FF"
},
{
"scope": "col_959595FF",
"foreground": "#151515FF",
"background": "#959595FF"
},
{
"scope": "col_868686FF",
"foreground": "#060606FF",
"background": "#868686FF"
},
{
"scope": "col_939393FF",
"foreground": "#131313FF",
"background": "#939393FF"
},
{
"scope": "col_DEDEDEFF",
"foreground": "#5E5E5EFF",
"background": "#DEDEDEFF"
},
{
"scope": "col_444444FF",
"foreground": "#C4C4C4FF",
"background": "#444444FF"
},
{
"scope": "col_F8F8F8FF",
"foreground": "#787878FF",
"background": "#F8F8F8FF"
},
{
"scope": "col_BDBDBDFF",
"foreground": "#3D3D3DFF",
"background": "#BDBDBDFF"
},
{
"scope": "col_EDEDEDFF",
"foreground": "#6D6D6DFF",
"background": "#EDEDEDFF"
},
{
"scope": "col_3A3A3AFF",
"foreground": "#BABABAFF",
"background": "#3A3A3AFF"
},
{
"scope": "col_CACACAFF",
"foreground": "#4A4A4AFF",
"background": "#CACACAFF"
},
{
"scope": "col_B2B2B2FF",
"foreground": "#323232FF",
"background": "#B2B2B2FF"
},
{
"scope": "col_8C8C8CFF",
"foreground": "#0C0C0CFF",
"background": "#8C8C8CFF"
},
{
"scope": "col_DBDBDBFF",
"foreground": "#5B5B5BFF",
"background": "#DBDBDBFF"
},
{
"scope": "col_AAAAAAFF",
"foreground": "#2A2A2AFF",
"background": "#AAAAAAFF"
},
{
"scope": "col_ABABABFF",
"foreground": "#2B2B2BFF",
"background": "#ABABABFF"
},
{
"scope": "col_262626FF",
"foreground": "#A6A6A6FF",
"background": "#262626FF"
},
{
"scope": "col_8B8B8BFF",
"foreground": "#0B0B0BFF",
"background": "#8B8B8BFF"
},
{
"scope": "col_F2F2F2FF",
"foreground": "#727272FF",
"background": "#F2F2F2FF"
},
{
"scope": "col_242424FF",
"foreground": "#A4A4A4FF",
"background": "#242424FF"
},
{
"scope": "col_FDFDFDFF",
"foreground": "#7D7D7DFF",
"background": "#FDFDFDFF"
},
{
"scope": "col_151515FF",
"foreground": "#959595FF",
"background": "#151515FF"
},
{
"scope": "col_040404FF",
"foreground": "#848484FF",
"background": "#040404FF"
},
{
"scope": "col_2B2B2BFF",
"foreground": "#ABABABFF",
"background": "#2B2B2BFF"
},
{
"scope": "col_7A8CF8FF",
"foreground": "#121212FF",
"background": "#7A8CF8FF"
},
{
"scope": "col_131313FF",
"foreground": "#939393FF",
"background": "#131313FF"
},
{
"scope": "col_4E4E4EFF",
"foreground": "#CECECEFF",
"background": "#4E4E4EFF"
},
{
"scope": "col_DFDFDFFF",
"foreground": "#5F5F5FFF",
"background": "#DFDFDFFF"
},
{
"scope": "col_D6D6D6FF",
"foreground": "#565656FF",
"background": "#D6D6D6FF"
},
{
"scope": "col_7B7B7BFF",
"foreground": "#FBFBFBFF",
"background": "#7B7B7BFF"
},
{
"scope": "col_6A6A6AFF",
"foreground": "#EAEAEAFF",
"background": "#6A6A6AFF"
},
{
"scope": "col_6D6D6DFF",
"foreground": "#EDEDEDFF",
"background": "#6D6D6DFF"
},
{
"scope": "col_393939FF",
"foreground": "#B9B9B9FF",
"background": "#393939FF"
},
{
"scope": "col_A5A5A5FF",
"foreground": "#252525FF",
"background": "#A5A5A5FF"
},
{
"scope": "col_C4C4C4FF",
"foreground": "#444444FF",
"background": "#C4C4C4FF"
},
{
"scope": "col_010101FF",
"foreground": "#818181FF",
"background": "#010101FF"
},
{
"scope": "col_070707FF",
"foreground": "#878787FF",
"background": "#070707FF"
},
{
"scope": "col_E2E2E2FF",
"foreground": "#626262FF",
"background": "#E2E2E2FF"
},
{
"scope": "col_0C0C0CFF",
"foreground": "#8C8C8CFF",
"background": "#0C0C0CFF"
},
{
"scope": "col_5E5E5EFF",
"foreground": "#DEDEDEFF",
"background": "#5E5E5EFF"
},
{
"scope": "col_545454FF",
"foreground": "#D4D4D4FF",
"background": "#545454FF"
},
{
"scope": "col_494949FF",
"foreground": "#C9C9C9FF",
"background": "#494949FF"
},
{
"scope": "col_404040FF",
"foreground": "#C0C0C0FF",
"background": "#404040FF"
},
{
"scope": "col_DDDDDDFF",
"foreground": "#5D5D5DFF",
"background": "#DDDDDDFF"
},
{
"scope": "col_D9D9D9FF",
"foreground": "#595959FF",
"background": "#D9D9D9FF"
},
{
"scope": "col_060606FF",
"foreground": "#868686FF",
"background": "#060606FF"
},
{
"scope": "col_666666FF",
"foreground": "#E6E6E6FF",
"background": "#666666FF"
},
{
"scope": "col_7A7A7AFF",
"foreground": "#FAFAFAFF",
"background": "#7A7A7AFF"
},
{
"scope": "col_0E0E0EFF",
"foreground": "#8E8E8EFF",
"background": "#0E0E0EFF"
},
{
"scope": "col_050505FF",
"foreground": "#858585FF",
"background": "#050505FF"
},
{
"scope": "col_C9C9C9FF",
"foreground": "#494949FF",
"background": "#C9C9C9FF"
},
{
"scope": "col_E9E9E9FF",
"foreground": "#696969FF",
"background": "#E9E9E9FF"
},
{
"scope": "col_5C5C5CFF",
"foreground": "#DCDCDCFF",
"background": "#5C5C5CFF"
},
{
"scope": "col_0B0B0BFF",
"foreground": "#8B8B8BFF",
"background": "#0B0B0BFF"
},
{
"scope": "col_A6A6A6FF",
"foreground": "#262626FF",
"background": "#A6A6A6FF"
},
{
"scope": "col_CECECEFF",
"foreground": "#4E4E4EFF",
"background": "#CECECEFF"
},
{
"scope": "col_292929FF",
"foreground": "#A9A9A9FF",
"background": "#292929FF"
},
{
"scope": "col_323232FF",
"foreground": "#B2B2B2FF",
"background": "#323232FF"
},
{
"scope": "col_FAFAFAFF",
"foreground": "#7A7A7AFF",
"background": "#FAFAFAFF"
},
{
"scope": "col_0D0D0DFF",
"foreground": "#8D8D8DFF",
"background": "#0D0D0DFF"
},
{
"scope": "col_9C9C9CFF",
"foreground": "#1C1C1CFF",
"background": "#9C9C9CFF"
},
{
"scope": "col_BABABAFF",
"foreground": "#3A3A3AFF",
"background": "#BABABAFF"
},
{
"scope": "col_B9B9B9FF",
"foreground": "#393939FF",
"background": "#B9B9B9FF"
},
{
"scope": "col_2E2E2EFF",
"foreground": "#AEAEAEFF",
"background": "#2E2E2EFF"
},
{
"scope": "col_3D3D3DFF",
"foreground": "#BDBDBDFF",
"background": "#3D3D3DFF"
},
{
"scope": "col_E8E8E8FF",
"foreground": "#686868FF",
"background": "#E8E8E8FF"
},
{
"scope": "col_252525FF",
"foreground": "#A5A5A5FF",
"background": "#252525FF"
},
{
"scope": "col_5B5B5BFF",
"foreground": "#DBDBDBFF",
"background": "#5B5B5BFF"
},
{
"scope": "col_787878FF",
"foreground": "#F8F8F8FF",
"background": "#787878FF"
},
{
"scope": "col_757575FF",
"foreground": "#F5F5F5FF",
"background": "#757575FF"
},
{
"scope": "col_E5E5E5FF",
"foreground": "#656565FF",
"background": "#E5E5E5FF"
},
{
"scope": "col_2A2A2AFF",
"foreground": "#AAAAAAFF",
"background": "#2A2A2AFF"
},
{
"scope": "col_979797FF",
"foreground": "#171717FF",
"background": "#979797FF"
},
{
"scope": "col_2C2C2CFF",
"foreground": "#ACACACFF",
"background": "#2C2C2CFF"
},
{
"scope": "col_D4D4D4FF",
"foreground": "#545454FF",
"background": "#D4D4D4FF"
},
{
"scope": "col_686868FF",
"foreground": "#E8E8E8FF",
"background": "#686868FF"
},
{
"scope": "col_676767FF",
"foreground": "#E7E7E7FF",
"background": "#676767FF"
},
{
"scope": "col_7D7D7DFF",
"foreground": "#FDFDFDFF",
"background": "#7D7D7DFF"
},
{
"scope": "col_212121FF",
"foreground": "#A1A1A1FF",
"background": "#212121FF"
},
{
"scope": "col_8E8E8EFF",
"foreground": "#0E0E0EFF",
"background": "#8E8E8EFF"
},
{
"scope": "col_303030FF",
"foreground": "#B0B0B0FF",
"background": "#303030FF"
},
{
"scope": "col_4A4A4AFF",
"foreground": "#CACACAFF",
"background": "#4A4A4AFF"
},
{
"scope": "col_727272FF",
"foreground": "#F2F2F2FF",
"background": "#727272FF"
},
{
"scope": "col_101010FF",
"foreground": "#909090FF",
"background": "#101010FF"
},
{
"scope": "col_EAEAEAFF",
"foreground": "#6A6A6AFF",
"background": "#EAEAEAFF"
},
{
"scope": "col_626262FF",
"foreground": "#E2E2E2FF",
"background": "#626262FF"
},
{
"scope": "col_1C1C1CFF",
"foreground": "#9C9C9CFF",
"background": "#1C1C1CFF"
},
{
"scope": "col_5F5F5FFF",
"foreground": "#DFDFDFFF",
"background": "#5F5F5FFF"
},
{
"scope": "col_FF8C00FF",
"foreground": "#1E1E1EFF",
"background": "#FF8C00FF"
},
{
"scope": "col_FFEBCDFF",
"foreground": "#6D6D6DFF",
"background": "#FFEBCDFF"
},
{
"scope": "col_DDA0DDFF",
"foreground": "#393939FF",
"background": "#DDA0DDFF"
},
{
"scope": "col_1E90FFFF",
"foreground": "#FAFAFAFF",
"background": "#1E90FFFF"
},
{
"scope": "col_48D1CCFF",
"foreground": "#272727FF",
"background": "#48D1CCFF"
},
{
"scope": "col_DC143CFF",
"foreground": "#D4D4D4FF",
"background": "#DC143CFF"
},
{
"scope": "col_9400D3FF",
"foreground": "#C4C4C4FF",
"background": "#9400D3FF"
},
{
"scope": "col_2F4F4FFF",
"foreground": "#C5C5C5FF",
"background": "#2F4F4FFF"
},
{
"scope": "col_00FA9AFF",
"foreground": "#242424FF",
"background": "#00FA9AFF"
},
{
"scope": "col_FAFAD2FF",
"foreground": "#757575FF",
"background": "#FAFAD2FF"
},
{
"scope": "col_87CEFAFF",
"foreground": "#3D3D3DFF",
"background": "#87CEFAFF"
},
{
"scope": "col_F5DEB3FF",
"foreground": "#5F5F5FFF",
"background": "#F5DEB3FF"
},
{
"scope": "col_DCDCDCFF",
"foreground": "#5C5C5CFF",
"background": "#DCDCDCFF"
},
{
"scope": "col_AFEEEEFF",
"foreground": "#5B5B5BFF",
"background": "#AFEEEEFF"
},
{
"scope": "col_708090FF",
"foreground": "#FDFDFDFF",
"background": "#708090FF"
},
{
"scope": "col_9ACD32FF",
"foreground": "#2C2C2CFF",
"background": "#9ACD32FF"
},
{
"scope": "col_696969FF",
"foreground": "#E9E9E9FF",
"background": "#696969FF"
},
{
"scope": "col_FDF5E6FF",
"foreground": "#757575FF",
"background": "#FDF5E6FF"
},
{
"scope": "col_556B2FFF",
"foreground": "#DDDDDDFF",
"background": "#556B2FFF"
},
{
"scope": "col_8A2BE2FF",
"foreground": "#DCDCDCFF",
"background": "#8A2BE2FF"
},
{
"scope": "col_9932CCFF",
"foreground": "#E2E2E2FF",
"background": "#9932CCFF"
},
{
"scope": "col_DA70D6FF",
"foreground": "#1B1B1BFF",
"background": "#DA70D6FF"
},
{
"scope": "col_800000FF",
"foreground": "#A6A6A6FF",
"background": "#800000FF"
},
{
"scope": "col_008B8BFF",
"foreground": "#E1E1E1FF",
"background": "#008B8BFF"
},
{
"scope": "col_F0FFF0FF",
"foreground": "#787878FF",
"background": "#F0FFF0FF"
},
{
"scope": "col_B0C4DEFF",
"foreground": "#404040FF",
"background": "#B0C4DEFF"
},
{
"scope": "col_E9967AFF",
"foreground": "#2B2B2BFF",
"background": "#E9967AFF"
},
{
"scope": "col_A9A9A9FF",
"foreground": "#292929FF",
"background": "#A9A9A9FF"
},
{
"scope": "col_FF4500FF",
"foreground": "#F4F4F4FF",
"background": "#FF4500FF"
},
{
"scope": "col_90EE90FF",
"foreground": "#474747FF",
"background": "#90EE90FF"
},
{
"scope": "col_FFFFF0FF",
"foreground": "#7D7D7DFF",
"background": "#FFFFF0FF"
},
{
"scope": "col_FFDAB9FF",
"foreground": "#616161FF",
"background": "#FFDAB9FF"
},
{
"scope": "col_BA55D3FF",
"foreground": "#010101FF",
"background": "#BA55D3FF"
},
{
"scope": "col_9370D8FF",
"foreground": "#060606FF",
"background": "#9370D8FF"
},
{
"scope": "col_B8860BFF",
"foreground": "#060606FF",
"background": "#B8860BFF"
},
{
"scope": "col_F08080FF",
"foreground": "#212121FF",
"background": "#F08080FF"
},
{
"scope": "col_40E0D0FF",
"foreground": "#2E2E2EFF",
"background": "#40E0D0FF"
},
{
"scope": "col_FFFFE0FF",
"foreground": "#7B7B7BFF",
"background": "#FFFFE0FF"
},
{
"scope": "col_D8BFD8FF",
"foreground": "#494949FF",
"background": "#D8BFD8FF"
},
{
"scope": "col_5F9EA0FF",
"foreground": "#0B0B0BFF",
"background": "#5F9EA0FF"
},
{
"scope": "col_FFFAF0FF",
"foreground": "#7A7A7AFF",
"background": "#FFFAF0FF"
},
{
"scope": "col_20B2AAFF",
"foreground": "#050505FF",
"background": "#20B2AAFF"
},
{
"scope": "col_483D8BFF",
"foreground": "#C9C9C9FF",
"background": "#483D8BFF"
},
{
"scope": "col_D2691EFF",
"foreground": "#FFFFFFFF",
"background": "#D2691EFF"
},
{
"scope": "col_66CDAAFF",
"foreground": "#2A2A2AFF",
"background": "#66CDAAFF"
},
{
"scope": "col_00BFFFFF",
"foreground": "#0D0D0DFF",
"background": "#00BFFFFF"
},
{
"scope": "col_000080FF",
"foreground": "#8E8E8EFF",
"background": "#000080FF"
},
{
"scope": "col_A52A2AFF",
"foreground": "#CECECEFF",
"background": "#A52A2AFF"
},
{
"scope": "col_C0C0C0FF",
"foreground": "#404040FF",
"background": "#C0C0C0FF"
},
{
"scope": "col_7B68EEFF",
"foreground": "#FCFCFCFF",
"background": "#7B68EEFF"
},
{
"scope": "col_00008BFF",
"foreground": "#8F8F8FFF",
"background": "#00008BFF"
},
{
"scope": "col_E6E6FAFF",
"foreground": "#686868FF",
"background": "#E6E6FAFF"
},
{
"scope": "col_00FF00FF",
"foreground": "#151515FF",
"background": "#00FF00FF"
},
{
"scope": "col_E0FFFFFF",
"foreground": "#757575FF",
"background": "#E0FFFFFF"
},
{
"scope": "col_ADFF2FFF",
"foreground": "#4E4E4EFF",
"background": "#ADFF2FFF"
},
{
"scope": "col_CD5C5CFF",
"foreground": "#FDFDFDFF",
"background": "#CD5C5CFF"
},
{
"scope": "col_DEB887FF",
"foreground": "#3D3D3DFF",
"background": "#DEB887FF"
},
{
"scope": "col_98FB98FF",
"foreground": "#525252FF",
"background": "#98FB98FF"
},
{
"scope": "col_FFEFD5FF",
"foreground": "#707070FF",
"background": "#FFEFD5FF"
},
{
"scope": "col_8B0000FF",
"foreground": "#A9A9A9FF",
"background": "#8B0000FF"
},
{
"scope": "col_7CFC00FF",
"foreground": "#393939FF",
"background": "#7CFC00FF"
},
{
"scope": "col_FAEBD7FF",
"foreground": "#6D6D6DFF",
"background": "#FAEBD7FF"
},
{
"scope": "col_191970FF",
"foreground": "#A2A2A2FF",
"background": "#191970FF"
},
{
"scope": "col_FFE4B5FF",
"foreground": "#666666FF",
"background": "#FFE4B5FF"
},
{
"scope": "col_FFA07AFF",
"foreground": "#383838FF",
"background": "#FFA07AFF"
},
{
"scope": "col_87CEEBFF",
"foreground": "#3C3C3CFF",
"background": "#87CEEBFF"
},
{
"scope": "col_008080FF",
"foreground": "#D9D9D9FF",
"background": "#008080FF"
},
{
"scope": "col_F5F5F5FF",
"foreground": "#757575FF",
"background": "#F5F5F5FF"
},
{
"scope": "col_BDB76BFF",
"foreground": "#303030FF",
"background": "#BDB76BFF"
},
{
"scope": "col_778899FF",
"foreground": "#040404FF",
"background": "#778899FF"
},
{
"scope": "col_0000CDFF",
"foreground": "#979797FF",
"background": "#0000CDFF"
},
{
"scope": "col_00FF7FFF",
"foreground": "#242424FF",
"background": "#00FF7FFF"
},
{
"scope": "col_3CB371FF",
"foreground": "#070707FF",
"background": "#3CB371FF"
},
{
"scope": "col_F0E68CFF",
"foreground": "#5E5E5EFF",
"background": "#F0E68CFF"
},
{
"scope": "col_FFB6C1FF",
"foreground": "#4D4D4DFF",
"background": "#FFB6C1FF"
},
{
"scope": "col_8B008BFF",
"foreground": "#B9B9B9FF",
"background": "#8B008BFF"
},
{
"scope": "col_FF00FFFF",
"foreground": "#E9E9E9FF",
"background": "#FF00FFFF"
},
{
"scope": "col_8FBC8FFF",
"foreground": "#292929FF",
"background": "#8FBC8FFF"
},
{
"scope": "col_B22222FF",
"foreground": "#CDCDCDFF",
"background": "#B22222FF"
},
{
"scope": "col_FFDEADFF",
"foreground": "#626262FF",
"background": "#FFDEADFF"
},
{
"scope": "col_F0F8FFFF",
"foreground": "#767676FF",
"background": "#F0F8FFFF"
},
{
"scope": "col_FF69B4FF",
"foreground": "#1E1E1EFF",
"background": "#FF69B4FF"
},
{
"scope": "col_4169E1FF",
"foreground": "#EAEAEAFF",
"background": "#4169E1FF"
},
{
"scope": "col_F5FFFAFF",
"foreground": "#7B7B7BFF",
"background": "#F5FFFAFF"
},
{
"scope": "col_DAA520FF",
"foreground": "#252525FF",
"background": "#DAA520FF"
},
{
"scope": "col_F8F8FFFF",
"foreground": "#787878FF",
"background": "#F8F8FFFF"
},
{
"scope": "col_FFC0CBFF",
"foreground": "#545454FF",
"background": "#FFC0CBFF"
},
{
"scope": "col_FFD700FF",
"foreground": "#4A4A4AFF",
"background": "#FFD700FF"
},
{
"scope": "col_2E8B57FF",
"foreground": "#E9E9E9FF",
"background": "#2E8B57FF"
},
{
"scope": "col_FFFACDFF",
"foreground": "#767676FF",
"background": "#FFFACDFF"
},
{
"scope": "col_FFFAFAFF",
"foreground": "#7B7B7BFF",
"background": "#FFFAFAFF"
},
{
"scope": "col_4B0082FF",
"foreground": "#A5A5A5FF",
"background": "#4B0082FF"
},
{
"scope": "col_CD853FFF",
"foreground": "#121212FF",
"background": "#CD853FFF"
},
{
"scope": "col_FFE4E1FF",
"foreground": "#6B6B6BFF",
"background": "#FFE4E1FF"
},
{
"scope": "col_D2B48CFF",
"foreground": "#383838FF",
"background": "#D2B48CFF"
},
{
"scope": "col_F0FFFFFF",
"foreground": "#7A7A7AFF",
"background": "#F0FFFFFF"
},
{
"scope": "col_FF7F50FF",
"foreground": "#1F1F1FFF",
"background": "#FF7F50FF"
},
{
"scope": "col_EE82EEFF",
"foreground": "#2E2E2EFF",
"background": "#EE82EEFF"
},
{
"scope": "col_00FFFFFF",
"foreground": "#323232FF",
"background": "#00FFFFFF"
},
{
"scope": "col_EEE8AAFF",
"foreground": "#626262FF",
"background": "#EEE8AAFF"
},
{
"scope": "col_4682B4FF",
"foreground": "#F5F5F5FF",
"background": "#4682B4FF"
},
{
"scope": "col_6B8E23FF",
"foreground": "#F7F7F7FF",
"background": "#6B8E23FF"
},
{
"scope": "col_A0522DFF",
"foreground": "#E5E5E5FF",
"background": "#A0522DFF"
},
{
"scope": "col_FAF0E6FF",
"foreground": "#717171FF",
"background": "#FAF0E6FF"
},
{
"scope": "col_D87093FF",
"foreground": "#131313FF",
"background": "#D87093FF"
},
{
"scope": "col_C71585FF",
"foreground": "#D6D6D6FF",
"background": "#C71585FF"
},
{
"scope": "col_FF1493FF",
"foreground": "#E8E8E8FF",
"background": "#FF1493FF"
},
{
"scope": "col_BC8F8FFF",
"foreground": "#1C1C1CFF",
"background": "#BC8F8FFF"
},
{
"scope": "col_7FFFD4FF",
"foreground": "#535353FF",
"background": "#7FFFD4FF"
},
{
"scope": "col_ADD8E6FF",
"foreground": "#4C4C4CFF",
"background": "#ADD8E6FF"
},
{
"scope": "col_32CD32FF",
"foreground": "#0C0C0CFF",
"background": "#32CD32FF"
},
{
"scope": "col_6495EDFF",
"foreground": "#101010FF",
"background": "#6495EDFF"
},
{
"scope": "col_FA8072FF",
"foreground": "#222222FF",
"background": "#FA8072FF"
},
{
"scope": "col_F4A460FF",
"foreground": "#343434FF",
"background": "#F4A460FF"
},
{
"scope": "col_808000FF",
"foreground": "#F1F1F1FF",
"background": "#808000FF"
},
{
"scope": "col_FFF8DCFF",
"foreground": "#767676FF",
"background": "#FFF8DCFF"
},
{
"scope": "col_8B4513FF",
"foreground": "#D4D4D4FF",
"background": "#8B4513FF"
},
{
"scope": "col_B0E0E6FF",
"foreground": "#525252FF",
"background": "#B0E0E6FF"
},
{
"scope": "col_FF6347FF",
"foreground": "#0E0E0EFF",
"background": "#FF6347FF"
},
{
"scope": "col_6A5ACDFF",
"foreground": "#EBEBEBFF",
"background": "#6A5ACDFF"
},
{
"scope": "col_FFF0F5FF",
"foreground": "#757575FF",
"background": "#FFF0F5FF"
},
{
"scope": "col_228B22FF",
"foreground": "#DFDFDFFF",
"background": "#228B22FF"
},
{
"scope": "col_006400FF",
"foreground": "#BABABAFF",
"background": "#006400FF"
},
{
"scope": "col_F5F5DCFF",
"foreground": "#727272FF",
"background": "#F5F5DCFF"
},
{
"scope": "col_00CED1FF",
"foreground": "#101010FF",
"background": "#00CED1FF"
},
{
"scope": "col_FFF5EEFF",
"foreground": "#777777FF",
"background": "#FFF5EEFF"
},
{
"scope": "col_FFE4C4FF",
"foreground": "#686868FF",
"background": "#FFE4C4FF"
},
{
"scope": "col_7FFF00FF",
"foreground": "#3B3B3BFF",
"background": "#7FFF00FF"
},
{
"scope": "col_E5EDF8FF",
"foreground": "#6B6B6BFF",
"background": "#E5EDF8FF"
},
{
"scope": "col_FFF6BFFF",
"foreground": "#727272FF",
"background": "#FFF6BFFF"
},
{
"scope": "col_FBE3E4FF",
"foreground": "#6A6A6AFF",
"background": "#FBE3E4FF"
},
{
"scope": "col_E6EFC2FF",
"foreground": "#676767FF",
"background": "#E6EFC2FF"
},
{
"scope": "col_00000019",
"foreground": "#9C9C9CFF",
"background": "#00000019"
},
{
"scope": "col_0000000C",
"foreground": "#9E9E9EFF",
"background": "#0000000C"
},
{
"scope": "col_6875F5FF",
"foreground": "#FFFFFFFF",
"background": "#6875F5FF"
},
{
"scope": "col_FACA15FF",
"foreground": "#434343FF",
"background": "#FACA15FF"
},
{
"scope": "col_8F8F8FFF",
"foreground": "#0F0F0FFF",
"background": "#8F8F8FFF"
},
{
"scope": "col_0F0F0FFF",
"foreground": "#8F8F8FFF",
"background": "#0F0F0FFF"
},
{
"scope": "col_5A96F9FF",
"foreground": "#0F0F0FFF",
"background": "#5A96F9FF"
},
{
"scope": "col_5A5A5AFF",
"foreground": "#DADADAFF",
"background": "#5A5A5AFF"
},
{
"scope": "col_C7C7C7FF",
"foreground": "#474747FF",
"background": "#C7C7C7FF"
},
{
"scope": "col_434343FF",
"foreground": "#C3C3C3FF",
"background": "#434343FF"
},
{
"scope": "col_282828FF",
"foreground": "#A8A8A8FF",
"background": "#282828FF"
},
{
"scope": "col_474747FF",
"foreground": "#C7C7C7FF",
"background": "#474747FF"
},
{
"scope": "col_C3C3C3FF",
"foreground": "#434343FF",
"background": "#C3C3C3FF"
},
{
"scope": "col_DADADAFF",
"foreground": "#5A5A5AFF",
"background": "#DADADAFF"
},
{
"scope": "col_DCE6F2FF",
"foreground": "#646464FF",
"background": "#DCE6F2FF"
},
{
"scope": "col_A36468FF",
"foreground": "#F7F7F7FF",
"background": "#A36468FF"
},
{
"scope": "col_965D7BFF",
"foreground": "#F1F1F1FF",
"background": "#965D7BFF"
},
{
"scope": "col_A8A8A8FF",
"foreground": "#282828FF",
"background": "#A8A8A8FF"
},
{
"scope": "col_EFB7B9FF",
"foreground": "#474747FF",
"background": "#EFB7B9FF"
},
{
"scope": "col_57586EFF",
"foreground": "#DADADAFF",
"background": "#57586EFF"
},
{
"scope": "col_07C62293",
"foreground": "#D3D3D3FF",
"background": "#07C62293"
},
{
"scope": "col_6C63FFFF",
"foreground": "#F7F7F7FF",
"background": "#6C63FFFF"
},
{
"scope": "col_444053FF",
"foreground": "#C3C3C3FF",
"background": "#444053FF"
},
{
"scope": "col_FCFCFCFF",
"foreground": "#7C7C7CFF",
"background": "#FCFCFCFF"
},
{
"scope": "col_7C7C7CFF",
"foreground": "#FCFCFCFF",
"background": "#7C7C7CFF"
},
{
"scope": "col_364152FF",
"foreground": "#BFBFBFFF",
"background": "#364152FF"
},
{
"scope": "col_FBFDFEFF",
"foreground": "#7C7C7CFF",
"background": "#FBFDFEFF"
},
{
"scope": "col_F0F0F0FF",
"foreground": "#707070FF",
"background": "#F0F0F0FF"
},
{
"scope": "col_707070FF",
"foreground": "#F0F0F0FF",
"background": "#707070FF"
},
{
"scope": "col_ECF1F7FF",
"foreground": "#707070FF",
"background": "#ECF1F7FF"
},
{
"scope": "col_EBEBEBFF",
"foreground": "#6B6B6BFF",
"background": "#EBEBEBFF"
},
{
"scope": "col_6B6B6BFF",
"foreground": "#EBEBEBFF",
"background": "#6B6B6BFF"
},
{
"scope": "col_E6ECF4FF",
"foreground": "#6B6B6BFF",
"background": "#E6ECF4FF"
},
{
"scope": "col_F4F4F4FF",
"foreground": "#747474FF",
"background": "#F4F4F4FF"
},
{
"scope": "col_747474FF",
"foreground": "#F4F4F4FF",
"background": "#747474FF"
},
{
"scope": "col_F1F5F9FF",
"foreground": "#747474FF",
"background": "#F1F5F9FF"
},
{
"scope": "col_898989FF",
"foreground": "#090909FF",
"background": "#898989FF"
},
{
"scope": "col_7C8CA2FF",
"foreground": "#090909FF",
"background": "#7C8CA2FF"
},
{
"scope": "col_090909FF",
"foreground": "#898989FF",
"background": "#090909FF"
},
{
"scope": "col_535353FF",
"foreground": "#D3D3D3FF",
"background": "#535353FF"
},
{
"scope": "col_D3D3D3FF",
"foreground": "#535353FF",
"background": "#D3D3D3FF"
},
{
"scope": "col_475569FF",
"foreground": "#D3D3D3FF",
"background": "#475569FF"
},
{
"scope": "col_202837FF",
"foreground": "#A7A7A7FF",
"background": "#202837FF"
},
{
"scope": "col_27303FFF",
"foreground": "#AFAFAFFF",
"background": "#27303FFF"
},
{
"scope": "col_AFAFAFFF",
"foreground": "#2F2F2FFF",
"background": "#AFAFAFFF"
},
{
"scope": "col_2F2F2FFF",
"foreground": "#AFAFAFFF",
"background": "#2F2F2FFF"
},
{
"scope": "col_A2A2A2FF",
"foreground": "#222222FF",
"background": "#A2A2A2FF"
},
{
"scope": "col_222222FF",
"foreground": "#A2A2A2FF",
"background": "#222222FF"
},
{
"scope": "col_76A9FAFF",
"foreground": "#222222FF",
"background": "#76A9FAFF"
},
{
"scope": "col_BCBCBCFF",
"foreground": "#3C3C3CFF",
"background": "#BCBCBCFF"
},
{
"scope": "col_3C3C3CFF",
"foreground": "#BCBCBCFF",
"background": "#3C3C3CFF"
},
{
"scope": "col_B2BFCEFF",
"foreground": "#3C3C3CFF",
"background": "#B2BFCEFF"
},
{
"scope": "col_797979FF",
"foreground": "#F9F9F9FF",
"background": "#797979FF"
},
{
"scope": "col_F9F9F9FF",
"foreground": "#797979FF",
"background": "#F9F9F9FF"
},
{
"scope": "col_2D89EFFF",
"foreground": "#F9F9F9FF",
"background": "#2D89EFFF"
},
{
"scope": "col_A3A3A3FF",
"foreground": "#232323FF",
"background": "#A3A3A3FF"
},
{
"scope": "col_232323FF",
"foreground": "#A3A3A3FF",
"background": "#232323FF"
},
{
"scope": "col_97A6BAFF",
"foreground": "#232323FF",
"background": "#97A6BAFF"
},
{
"scope": "col_4B4B4BFF",
"foreground": "#CBCBCBFF",
"background": "#4B4B4BFF"
},
{
"scope": "col_008000FF",
"foreground": "#CBCBCBFF",
"background": "#008000FF"
},
{
"scope": "col_CBCBCBFF",
"foreground": "#4B4B4BFF",
"background": "#CBCBCBFF"
},
{
"scope": "col_717171FF",
"foreground": "#F1F1F1FF",
"background": "#717171FF"
},
{
"scope": "col_F1F1F1FF",
"foreground": "#717171FF",
"background": "#F1F1F1FF"
},
{
"scope": "col_64748BFF",
"foreground": "#F1F1F1FF",
"background": "#64748BFF"
},
{
"scope": "col_121212FF",
"foreground": "#929292FF",
"background": "#121212FF"
},
{
"scope": "col_1A1A1AFF",
"foreground": "#9A9A9AFF",
"background": "#1A1A1AFF"
},
{
"scope": "col_191F2DFF",
"foreground": "#9E9E9EFF",
"background": "#191F2DFF"
},
{
"scope": "col_0F131AFF",
"foreground": "#929292FF",
"background": "#0F131AFF"
},
{
"scope": "col_929292FF",
"foreground": "#121212FF",
"background": "#929292FF"
},
{
"scope": "col_151B27FF",
"foreground": "#9A9A9AFF",
"background": "#151B27FF"
},
{
"scope": "col_9A9A9AFF",
"foreground": "#1A1A1AFF",
"background": "#9A9A9AFF"
},
{
"scope": "col_1F1F1FFF",
"foreground": "#9F9F9FFF",
"background": "#1F1F1FFF"
},
{
"scope": "col_9F9F9FFF",
"foreground": "#1F1F1FFF",
"background": "#9F9F9FFF"
},
{
"scope": "col_1A202EFF",
"foreground": "#9F9F9FFF",
"background": "#1A202EFF"
},
{
"scope": "col_6C6C6CFF",
"foreground": "#ECECECFF",
"background": "#6C6C6CFF"
},
{
"scope": "col_454545FF",
"foreground": "#C5C5C5FF",
"background": "#454545FF"
},
{
"scope": "col_F6F6F6FF",
"foreground": "#767676FF",
"background": "#F6F6F6FF"
},
{
"scope": "col_515151FF",
"foreground": "#D1D1D1FF",
"background": "#515151FF"
},
{
"scope": "col_3F3F3FFF",
"foreground": "#BFBFBFFF",
"background": "#3F3F3FFF"
},
{
"scope": "col_CDCDCDFF",
"foreground": "#4D4D4DFF",
"background": "#CDCDCDFF"
},
{
"scope": "col_1D1D1DFF",
"foreground": "#9D9D9DFF",
"background": "#1D1D1DFF"
},
{
"scope": "col_E4E4E4FF",
"foreground": "#646464FF",
"background": "#E4E4E4FF"
},
{
"scope": "col_9B9B9BFF",
"foreground": "#1B1B1BFF",
"background": "#9B9B9BFF"
},
{
"scope": "col_E1E1E1FF",
"foreground": "#616161FF",
"background": "#E1E1E1FF"
},
{
"scope": "col_D2D2D2FF",
"foreground": "#525252FF",
"background": "#D2D2D2FF"
},
{
"scope": "col_ADADADFF",
"foreground": "#2D2D2DFF",
"background": "#ADADADFF"
},
{
"scope": "col_636363FF",
"foreground": "#E3E3E3FF",
"background": "#636363FF"
},
{
"scope": "col_6F6F6FFF",
"foreground": "#EFEFEFFF",
"background": "#6F6F6FFF"
},
{
"scope": "col_343434FF",
"foreground": "#B4B4B4FF",
"background": "#343434FF"
},
{
"scope": "col_4C4C4CFF",
"foreground": "#CCCCCCFF",
"background": "#4C4C4CFF"
},
{
"scope": "col_1E1E1EFF",
"foreground": "#9E9E9EFF",
"background": "#1E1E1EFF"
},
{
"scope": "col_B8B8B8FF",
"foreground": "#383838FF",
"background": "#B8B8B8FF"
},
{
"scope": "col_gutter",
"foreground": "#ffffff",
"background": "#000000"
},
{
"scope": "col_9D9D9DFF",
"foreground": "#1D1D1DFF",
"background": "#9D9D9DFF"
},
{
"scope": "col_CFCFC3FF",
"foreground": "#4D4D4DFF",
"background": "#CFCFC3FF"
},
{
"scope": "col_A1D5394C",
"foreground": "#D1D1D1FF",
"background": "#A1D5394C"
},
{
"scope": "col_FFA500FF",
"foreground": "#2D2D2DFF",
"background": "#FFA500FF"
},
{
"scope": "col_D7457B4C",
"foreground": "#BFBFBFFF",
"background": "#D7457B4C"
},
{
"scope": "col_808080FF",
"foreground": "#000000FF",
"background": "#808080FF"
},
{
"scope": "col_FFFFFFFF",
"foreground": "#7F7F7FFF",
"background": "#FFFFFFFF"
},
{
"scope": "col_47463CFF",
"foreground": "#C5C5C5FF",
"background": "#47463CFF"
},
{
"scope": "col_F7F7F1FF",
"foreground": "#767676FF",
"background": "#F7F7F1FF"
},
{
"scope": "col_66D8EFFF",
"foreground": "#383838FF",
"background": "#66D8EFFF"
},
{
"scope": "col_BFBFBFFF",
"foreground": "#3F3F3FFF",
"background": "#BFBFBFFF"
},
{
"scope": "col_F92472FF",
"foreground": "#ECECECFF",
"background": "#F92472FF"
},
{
"scope": "col_E3E3E3FF",
"foreground": "#636363FF",
"background": "#E3E3E3FF"
},
{
"scope": "col_F8F8F1FF",
"foreground": "#777777FF",
"background": "#F8F8F1FF"
},
{
"scope": "col_800080FF",
"foreground": "#B4B4B4FF",
"background": "#800080FF"
},
{
"scope": "col_F73535FF",
"foreground": "#EFEFEFFF",
"background": "#F73535FF"
},
{
"scope": "col_4D4D4DFF",
"foreground": "#CDCDCDFF",
"background": "#4D4D4DFF"
},
{
"scope": "col_272822FF",
"foreground": "#A7A7A7FF",
"background": "#272822FF"
},
{
"scope": "col_7F7F7FFF",
"foreground": "#FFFFFFFF",
"background": "#7F7F7FFF"
},
{
"scope": "col_CCCCCCFF",
"foreground": "#4C4C4CFF",
"background": "#CCCCCCFF"
},
{
"scope": "col_000000FF",
"foreground": "#808080FF",
"background": "#000000FF"
},
{
"scope": "col_FFFF00FF",
"foreground": "#616161FF",
"background": "#FFFF00FF"
},
{
"scope": "col_646464FF",
"foreground": "#E4E4E4FF",
"background": "#646464FF"
},
{
"scope": "col_BBBBBBFF",
"foreground": "#3B3B3BFF",
"background": "#BBBBBBFF"
},
{
"scope": "col_0000FFFF",
"foreground": "#9D9D9DFF",
"background": "#0000FFFF"
},
{
"scope": "col_616161FF",
"foreground": "#E1E1E1FF",
"background": "#616161FF"
},
{
"scope": "col_272727FF",
"foreground": "#A7A7A7FF",
"background": "#272727FF"
},
{
"scope": "col_ECECECFF",
"foreground": "#6C6C6CFF",
"background": "#ECECECFF"
},
{
"scope": "col_C6567F26",
"foreground": "#B4B4B4FF",
"background": "#C6567F26"
},
{
"scope": "col_D1D1D1FF",
"foreground": "#515151FF",
"background": "#D1D1D1FF"
},
{
"scope": "col_FFE793FF",
"foreground": "#646464FF",
"background": "#FFE793FF"
},
{
"scope": "col_B4B4B4FF",
"foreground": "#343434FF",
"background": "#B4B4B4FF"
},
{
"scope": "col_1B1B1BFF",
"foreground": "#9B9B9BFF",
"background": "#1B1B1BFF"
},
{
"scope": "col_C5C5C5FF",
"foreground": "#454545FF",
"background": "#C5C5C5FF"
},
{
"scope": "col_A5E22CFF",
"foreground": "#3B3B3BFF",
"background": "#A5E22CFF"
},
{
"scope": "col_525252FF",
"foreground": "#D2D2D2FF",
"background": "#525252FF"
},
{
"scope": "col_202017FF",
"foreground": "#9E9E9EFF",
"background": "#202017FF"
},
{
"scope": "col_AC7FFFFF",
"foreground": "#1B1B1BFF",
"background": "#AC7FFFFF"
},
{
"scope": "col_777777FF",
"foreground": "#F7F7F7FF",
"background": "#777777FF"
},
{
"scope": "col_74705DFF",
"foreground": "#EFEFEFFF",
"background": "#74705DFF"
},
{
"scope": "col_3E3D31FF",
"foreground": "#BBBBBBFF",
"background": "#3E3D31FF"
},
{
"scope": "col_767676FF",
"foreground": "#F6F6F6FF",
"background": "#767676FF"
},
{
"scope": "col_F7F7F7FF",
"foreground": "#777777FF",
"background": "#F7F7F7FF"
},
{
"scope": "col_2D2D2DFF",
"foreground": "#ADADADFF",
"background": "#2D2D2DFF"
},
{
"scope": "col_9E9E9EFF",
"foreground": "#1E1E1EFF",
"background": "#9E9E9EFF"
},
{
"scope": "col_EFEFEFFF",
"foreground": "#6F6F6FFF",
"background": "#EFEFEFFF"
},
{
"scope": "col_A7A7A7FF",
"foreground": "#272727FF",
"background": "#A7A7A7FF"
},
{
"scope": "col_3B3B3BFF",
"foreground": "#BBBBBBFF",
"background": "#3B3B3BFF"
},
{
"scope": "col_9BC34B26",
"foreground": "#BBBBBBFF",
"background": "#9BC34B26"
},
{
"scope": "col_FC9620FF",
"foreground": "#272727FF",
"background": "#FC9620FF"
},
{
"scope": "col_E6DB74FF",
"foreground": "#525252FF",
"background": "#E6DB74FF"
},
{
"scope": "col_9E560EFF",
"foreground": "#E3E3E3FF",
"background": "#9E560EFF"
},
{
"scope": "col_383838FF",
"foreground": "#B8B8B8FF",
"background": "#383838FF"
},
{
"scope": "col_FF0000FF",
"foreground": "#CCCCCCFF",
"background": "#FF0000FF"
},
{
"name": "Comment",
"scope": "comment",
"foreground": "var(yellow5)"
},
{
"name": "String",
"scope": "string",
"foreground": "var(yellow)"
},
{
"name": "Number",
"scope": "constant.numeric",
"foreground": "var(purple)"
},
{
"name": "Built-in constant",
"scope": "constant.language",
"foreground": "var(purple)"
},
{
"name": "User-defined constant",
"scope": "constant.character, constant.other",
"foreground": "var(purple)"
},
{
"name": "Variable",
"scope": "variable"
},
{
"name": "Keyword",
"scope": "keyword - (source.c keyword.operator | source.c++ keyword.operator | source.objc keyword.operator | source.objc++ keyword.operator), keyword.operator.word",
"foreground": "var(red2)"
},
{
"name": "Annotation Punctuation",
"scope": "punctuation.definition.annotation",
"foreground": "var(red2)"
},
{
"name": "JavaScript Dollar",
"scope": "variable.other.dollar.only.js",
"foreground": "var(red2)"
},
{
"name": "Storage",
"scope": "storage",
"foreground": "var(red2)"
},
{
"name": "Storage type",
"scope": "storage.type",
"foreground": "var(blue)"
},
{
"name": "Entity name",
"scope": "entity.name - (entity.name.filename | entity.name.section | entity.name.tag | entity.name.label)",
"foreground": "var(yellow2)"
},
{
"name": "Inherited class",
"scope": "entity.other.inherited-class",
"foreground": "var(yellow2)"
},
{
"name": "Function argument",
"scope": "variable.parameter - (source.c | source.c++ | source.objc | source.objc++)",
"foreground": "var(orange)",
},
{
"name": "Language variable",
"scope": "variable.language",
"foreground": "#7A8CF8",
},
{
"name": "Tag name",
"scope": "entity.name.tag",
"foreground": "var(red2)"
},
{
"name": "Tag attribute",
"scope": "entity.other.attribute-name",
"foreground": "var(yellow2)"
},
{
"name": "Function call",
"scope": "variable.function, variable.annotation",
"foreground": "var(blue)"
},
{
"name": "Library function",
"scope": "support.function, support.macro",
"foreground": "var(blue)"
},
{
"name": "Library constant",
"scope": "support.constant",
"foreground": "var(red2)"
},
{
"name": "Library class/type",
"scope": "support.type, support.class",
"foreground": "var(blue)",
},
{
"name": "Library variable",
"scope": "support.other.variable"
},
{
"name": "Invalid",
"scope": "invalid",
"foreground": "var(white2)",
"background": "var(red2)"
},
{
"name": "Invalid deprecated",
"scope": "invalid.deprecated",
"foreground": "var(white2)",
"background": "var(purple)"
},
{
"name": "JSON String",
"scope": "meta.structure.dictionary.json string.quoted.double.json",
"foreground": "var(yellow3)"
},
{
"name": "YAML String",
"scope": "string.unquoted.yaml",
"foreground": "var(white3)"
},
{
"name": "diff.header",
"scope": "meta.diff, meta.diff.header",
"foreground": "var(yellow5)"
},
{
"name": "markup headings",
"scope": "markup.heading",
"font_style": "bold"
},
{
"name": "markup headings",
"scope": "markup.heading punctuation.definition.heading",
"foreground": "var(orange)"
},
{
"name": "markup h1",
"scope": "markup.heading.1 punctuation.definition.heading",
"foreground": "var(red2)"
},
{
"name": "markup links",
"scope": "markup.underline.link",
"foreground": "var(blue)"
},
{
"name": "markup bold",
"scope": "markup.bold",
"font_style": "bold"
},
{
"name": "markup italic",
"scope": "markup.italic",
"font_style": "italic"
},
{
"name": "markup bold/italic",
"scope": "markup.italic markup.bold | markup.bold markup.italic",
"font_style": "bold italic"
},
{
"name": "markup hr",
"scope": "punctuation.definition.thematic-break",
"foreground": "var(yellow5)"
},
{
"name": "markup blockquote",
"scope": "markup.quote punctuation.definition.blockquote",
"foreground": "var(yellow5)"
},
{
"name": "markup bullets",
"scope": "markup.list.numbered.bullet",
"foreground": "var(purple)"
},
{
"name": "markup bullets",
"scope": "markup.list.unnumbered.bullet | (markup.list.numbered punctuation.definition)",
"foreground": "#7C8CA2"
},
{
"name": "markup code",
"scope": "markup.raw",
"background": "#27303F"
},
{
"name": "markup punctuation",
"scope": "markup.raw punctuation.definition.raw",
"foreground": "#7C8CA2"
},
{
"name": "markup punctuation",
"scope": "text & (punctuation.definition.italic | punctuation.definition.bold | punctuation.definition.raw | punctuation.definition.link | punctuation.definition.metadata | punctuation.definition.image | punctuation.separator.table-cell | punctuation.section.table-header | punctuation.definition.constant)",
"foreground": "#7C8CA2"
},
{
"name": "diff.deleted",
"scope": "markup.deleted",
"foreground": "var(red2)"
},
{
"name": "diff.inserted",
"scope": "markup.inserted",
"foreground": "var(yellow2)"
},
{
"name": "diff.changed",
"scope": "markup.changed",
"foreground": "var(yellow)"
},
{
"scope": "constant.numeric.line-number.find-in-files - match",
"foreground": "color(var(purple) alpha(0.63))"
},
{
"scope": "entity.name.filename",
"foreground": "var(yellow)"
},
{
"scope": "message.error",
"foreground": "var(red)"
},
{
"scope": "diff.deleted",
"background": "hsla(338, 50%, 56%, 0.15)",
"foreground_adjust": "l(+ 5%)"
},
{
"scope": "diff.deleted.char",
"background": "hsla(338, 65%, 56%, 0.30)",
"foreground_adjust": "l(+ 10%)"
},
{
"scope": "diff.inserted",
"background": "hsla(80, 50%, 53%, 0.15)",
"foreground_adjust": "l(+ 5%)"
},
{
"scope": "diff.inserted.char",
"background": "hsla(80, 65%, 53%, 0.30)",
"foreground_adjust": "l(+ 10%)"
},
// Custom Rules
{
"name": "ERB open and close embeds",
"scope": "punctuation.section.embedded.ruby",
"foreground": "var(white3)"
},
{
"name": "ruby instance variables",
"scope": "variable.other.readwrite.instance.ruby",
"foreground": "#4F7BFF"
}
]
}
%YAML 1.2
---
# Derived from https://github.com/i-akhmadullin/Sublime-CSS3
name: CSS
file_extensions:
- css
- css.erb
- css.liquid
scope: source.css
variables:
# Many variable names taken directly from https://www.w3.org/TR/css3-selectors/#lex
unicode: '\\\h{1,6}[ \t\n\f]?'
escape: '(?:{{unicode}}|\\[^\n\f\h])'
nonascii: '[\p{L}\p{M}\p{S}\p{N}&&[[:^ascii:]]]'
nmstart: '(?:[[_a-zA-Z]{{nonascii}}]|{{escape}})'
nmchar: '(?:[[-\w]{{nonascii}}]|{{escape}})'
ident: '(?:--{{nmchar}}+|-?{{nmstart}}{{nmchar}}*)'
# Types
# https://www.w3.org/TR/css3-values/#numeric-types
integer: '(?:[-+]?\d+)'
number: '[-+]?(?:(?:\d*\.\d+(?:[eE]{{integer}})*)|{{integer}})'
# Units
# https://www.w3.org/TR/css3-values/#lengths
font_relative_lengths: '(?i:em|ex|ch|rem)'
viewport_percentage_lengths: '(?i:vw|vh|vmin|vmax)'
absolute_lengths: '(?i:cm|mm|q|in|pt|pc|px|fr)'
angle_units: '(?i:deg|grad|rad|turn)'
duration_units: '(?i:s|ms)'
frequency_units: '(?i:Hz|kHz)'
resolution_units: '(?i:dpi|dpcm|dppx)'
custom_element_chars: |-
(?x:
[-_a-z0-9\x{00B7}]
| \\\.
| [\x{00C0}-\x{00D6}]
| [\x{00D8}-\x{00F6}]
| [\x{00F8}-\x{02FF}]
| [\x{0300}-\x{037D}]
| [\x{037F}-\x{1FFF}]
| [\x{200C}-\x{200D}]
| [\x{203F}-\x{2040}]
| [\x{2070}-\x{218F}]
| [\x{2C00}-\x{2FEF}]
| [\x{3001}-\x{D7FF}]
| [\x{F900}-\x{FDCF}]
| [\x{FDF0}-\x{FFFD}]
| [\x{10000}-\x{EFFFF}]
)
combinators: '(?:>{1,3}|[~+])'
# Predefined Counter Styles
# https://drafts.csswg.org/css-counter-styles-3/#predefined-counters
counter_styles: |-
(?xi:
arabic-indic | armenian | bengali | cambodian | circle
| cjk-decimal | cjk-earthly-branch | cjk-heavenly-stem | decimal-leading-zero
| decimal | devanagari | disclosure-closed | disclosure-open | disc
| ethiopic-numeric | georgian | gujarati | gurmukhi | hebrew
| hiragana-iroha | hiragana | japanese-formal | japanese-informal
| kannada | katakana-iroha | katakana | khmer
| korean-hangul-formal | korean-hanja-formal | korean-hanja-informal | lao
| lower-alpha | lower-armenian | lower-greek | lower-latin | lower-roman
| malayalam | mongolian | myanmar | oriya | persian
| simp-chinese-formal | simp-chinese-informal
| square | tamil | telugu | thai | tibetan
| trad-chinese-formal | trad-chinese-informal
| upper-alpha | upper-armenian | upper-latin | upper-roman
)
contexts:
main:
- include: comment-block
- include: selector
- include: at-rules
- include: property-list
at-rules:
- include: at-charset
- include: at-counter-style
- include: at-custom-media
- include: at-document
- include: at-font-face
- include: at-import
- include: at-keyframes
- include: at-media
- include: at-namespace
- include: at-page
- include: at-supports
# When including `color-values` and `color-adjuster-functions`, make sure it is
# included after the color adjustors to prevent `color-values` from consuming
# conflicting function names & color constants such as `red`, `green`, or `blue`.
color-values:
- include: color-functions
# https://www.w3.org/TR/CSS22/syndata.html#color-units
- match: \b(aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)\b
scope: support.constant.color.w3c-standard-color-name.css
# https://www.w3.org/TR/css3-color/#svg-color
- match: \b(aliceblue|antiquewhite|aquamarine|azure|beige|bisque|blanchedalmond|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|gainsboro|ghostwhite|gold|goldenrod|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|limegreen|linen|magenta|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|oldlace|olivedrab|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|rebeccapurple|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|thistle|tomato|turquoise|violet|wheat|whitesmoke|yellowgreen)\b
scope: support.constant.color.w3c-extended-color-keywords.css
# Special Color Keywords
# https://www.w3.org/TR/css3-color/#currentcolor
# https://www.w3.org/TR/css3-color/#transparent-def
- match: \b((?i)currentColor|transparent)\b
scope: support.constant.color.w3c-special-color-keyword.css
# Hex Color
- match: '(#)(\h{3}|\h{6})\b'
scope: constant.other.color.rgb-value.css
captures:
1: punctuation.definition.constant.css
# RGBA Hexadecimal Colors
# https://en.wikipedia.org/wiki/RGBA_color_space#RGBA_hexadecimal_.28word-order.29
- match: '(#)(\h{4}|\h{8})\b'
scope: constant.other.color.rgba-value.css
captures:
1: punctuation.definition.constant.css
comment-block:
- match: /\*
scope: punctuation.definition.comment.css
push:
- meta_scope: comment.block.css
- match: \*/
scope: punctuation.definition.comment.css
pop: true
at-charset:
- match: \s*((@)charset\b)\s*
captures:
1: keyword.control.at-rule.charset.css
2: punctuation.definition.keyword.css
push:
- meta_scope: meta.at-rule.charset.css
- include: at-rule-punctuation
- include: literal-string
# @counter-style
# https://drafts.csswg.org/css-counter-styles-3/#the-counter-style-rule
at-counter-style:
- match: \s*((@)counter-style\b)\s+(?:(?i:\b(decimal|none)\b)|({{ident}}))?\s*(?=\{|$)
captures:
1: keyword.control.at-rule.counter-style.css
2: punctuation.definition.keyword.css
3: invalid.illegal.counter-style-name.css
4: entity.other.counter-style-name.css
push:
- meta_scope: meta.at-rule.counter-style.css
- include: comment-block
- include: rule-list-terminator
- include: rule-list
at-custom-media:
- match: (?=\s*@custom-media\b)
push:
- match: ;
scope: punctuation.terminator.css
pop: true
- match: \s*((@)custom-media)
captures:
1: keyword.control.at-rule.custom-media.css
2: punctuation.definition.keyword.css
3: support.constant.custom-media.css
push:
- meta_scope: meta.at-rule.custom-media.css
- match: \s*(?=;)
pop: true
- include: media-query-list
# @document
# https://www.w3.org/TR/2012/WD-css3-conditional-20120911/#at-document
at-document:
- match: '((@)document)'
captures:
1: keyword.control.at-rule.document.css
2: punctuation.definition.keyword.css
push:
- meta_scope: meta.at-rule.document.css
- match: '\{'
scope: punctuation.definition.block.begin.css
push:
- meta_scope: meta.block.css
- match: '(?=\})'
pop: true
- include: main
- match: '\}'
scope: meta.block.css punctuation.definition.block.end.css
pop: true
- include: comment-block
- include: url-function
- include: url-prefix-function
- include: domain-function
- include: regexp-function
- include: comma-delimiter
at-font-face:
- match: '\s*((@)font-face)\s*(?=\{|$)'
captures:
1: keyword.control.at-rule.font-face.css
2: punctuation.definition.keyword.css
push:
- meta_scope: meta.at-rule.font-face.css
- include: comment-block
- include: rule-list-terminator
- include: rule-list
at-import:
- match: \s*((@)import\b)\s*
captures:
1: keyword.control.at-rule.import.css
2: punctuation.definition.keyword.css
push:
- meta_scope: meta.at-rule.import.css
- include: at-rule-punctuation
- include: literal-string
- include: url-function
- include: media-query-list
# https://drafts.csswg.org/css-animations/#propdef-animation-name
keyframe-name:
- match: '\s*({{ident}})?'
captures:
1: entity.other.animation-name.css
push:
- match: '\s*(?:(,)|(?=[{;]))'
captures:
1: punctuation.definition.arbitrary-repetition.css
pop: true
# @keyframes
# https://drafts.csswg.org/css-animations/#keyframes
at-keyframes:
- match: (?=\s*@(?:-webkit-|-moz-|-o-)?keyframes\b)
push:
- include: rule-list-terminator
- match: \s*((@)(-webkit-|-moz-|-o-)?keyframes)
captures:
1: keyword.control.at-rule.keyframe.css
2: punctuation.definition.keyword.css
3: support.type.property-vendor.css
4: support.constant.keyframe.css
push:
- meta_scope: meta.at-rule.keyframe.css
- match: '\s*(?=\{)'
pop: true
- match: '\s*(?=[^{;])'
push:
- match: '\s*(?=[{;])'
pop: true
- include: keyframe-name
- match: '\s*(\{)'
captures:
1: punctuation.section.property-list.css
push:
- match: '(?=\})'
pop: true
- match: '\s*(?:(from|to)|((?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)(%)))\s*,?\s*'
captures:
1: keyword.keyframe-selector.css
2: constant.numeric.css
3: keyword.other.unit.css
- include: main
at-media:
- match: (?=\s*@media\b)
push:
- include: rule-list-terminator
- match: \s*((@)media)
captures:
1: keyword.control.at-rule.media.css
2: punctuation.definition.keyword.css
3: support.constant.media.css
push:
- meta_scope: meta.at-rule.media.css
- match: '\s*(?=\{)'
pop: true
- include: media-query-list
- match: '\s*(\{)'
captures:
1: punctuation.section.property-list.css
push:
- match: '(?=\})'
pop: true
- include: main
media-query:
# Media Types: https://www.w3.org/TR/CSS21/media.html
- include: comment-block
- match: \b(?i:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)\b
scope: support.constant.media.css
- match: '\b(?i:and|or|not|only)\b'
scope: keyword.operator.logic.media.css
- match: ','
scope: punctuation.definition.arbitrary-repetition.css
- match: \(
scope: punctuation.definition.group.begin.css
push:
- match: \)
scope: punctuation.definition.group.end.css
pop: true
- include: comment-block
- match: |-
(?x)
(
(-webkit-|-o-)?
((min|max)-)?
(-moz-)?
(
((device-)?(height|width|aspect-ratio|pixel-ratio))|
(color(-index)?)|monochrome|resolution
)
)|grid|scan|orientation
\s*(?=[:)])
captures:
0: support.type.property-name.media.css
2: support.type.vendor-prefix.css
5: support.type.vendor-prefix.css
push:
- match: (:)|(?=\))
captures:
1: punctuation.separator.key-value.css
pop: true
- match: \b(portrait|landscape|progressive|interlace)
scope: support.constant.property-value.css
- match: \s*(\d+)(/)(\d+)
captures:
1: constant.numeric.css
2: keyword.operator.arithmetic.css
3: constant.numeric.css
- include: numeric-values
media-query-list:
- match: '\s*(?=[^{;])'
push:
- match: '\s*(?=[{;])'
pop: true
- include: media-query
# @namespace
# https://www.w3.org/TR/css3-namespace/
at-namespace:
- match: '\s*((@)namespace)\s+({{ident}}(?!{{nmchar}}|\())?'
captures:
1: keyword.control.at-rule.namespace.css
2: punctuation.definition.keyword.css
3: entity.other.namespace-prefix.css
push:
- meta_scope: meta.at-rule.namespace.css
- include: at-rule-punctuation
- include: literal-string
- include: url-function
- include: comment-block
# @page
# https://www.w3.org/TR/CSS2/page.html
at-page:
- match: '\s*((@)page)\s*(?:(:)(first|left|right))?\s*(?=\{|$)'
captures:
1: keyword.control.at-rule.page.css
2: punctuation.definition.keyword.css
3: punctuation.definition.entity.css
4: entity.other.pseudo-class.css
push:
- meta_scope: meta.at-rule.page.css
- include: comment-block
- include: rule-list-terminator
- include: rule-list
# @supports
# https://drafts.csswg.org/css-conditional-3/#at-supports
at-supports:
- match: '((@)supports)'
captures:
1: keyword.control.at-rule.supports.css
2: punctuation.definition.keyword.css
push:
- meta_scope: meta.at-rule.supports.css
- match: '\{'
scope: punctuation.definition.block.begin.css
push:
- meta_scope: meta.block.css
- match: '(?=\})'
pop: true
- include: main
- match: '\}'
scope: meta.block.css punctuation.definition.block.end.css
pop: true
- include: at-supports-operators
- include: at-supports-parens
at-supports-operators:
- match: '\b(?i:and|or|not)\b'
scope: keyword.operator.logic.css
at-supports-parens:
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '\)'
scope: punctuation.definition.group.end.css
pop: true
- include: at-supports-operators
- include: at-supports-parens
- include: rule-list-body
property-list:
- match: '(?=\{)'
push:
- match: '\}'
scope: punctuation.section.property-list.css
pop: true
- include: rule-list
property-value-constants:
- match: |-
(?x)\b(
absolute|active|add
| all(-(petite|small)-caps|-scroll)?
| alpha(betic)?
| alternate(-reverse)?
| always|annotation|antialiased|at
| auto(hiding-scrollbar|-flow)?
| avoid(-column|-page|-region)?
| background(-color|-image|-position|-size)?
| backwards|balance|baseline|below|bevel|bicubic|bidi-override|blink
| block(-line-height)?
| blur
| bold(er)?
| border(-bottom|-left|-right|-top)?-(color|radius|width|style)
| border-(bottom|top)-(left|right)-radius
| border-image(-outset|-repeat|-slice|-source|-width)?
| border(-bottom|-left|-right|-top|-collapse|-spacing|-box)?
| both|bottom
| box(-shadow)?
| break-(all|word)
| brightness
| butt(on)?
| capitalize
| cent(er|ral)
| char(acter-variant)?
| cjk-ideographic|clip|clone|close-quote
| closest-(corner|side)
| col-resize|collapse
| color(-stop|-burn|-dodge)?
| column((-count|-gap|-reverse|-rule(-color|-width)?|-width)|s)?
| common-ligatures|condensed|consider-shifts|contain
| content(-box|s)?
| contextual|contrast|cover
| crisp(-e|E)dges
| crop
| cross(hair)?
| da(rken|shed)
| default|dense|diagonal-fractions|difference|disabled
| discretionary-ligatures|disregard-shifts
| distribute(-all-lines|-letter|-space)?
| dotted|double|drop-shadow
| (nwse|nesw|ns|ew|sw|se|nw|ne|w|s|e|n)-resize
| ease(-in-out|-in|-out)?
| element|ellipsis|embed|end|EndColorStr|evenodd
| exclu(de(-ruby)?|sion)
| expanded
| (extra|semi|ultra)-(condensed|expanded)
| farthest-(corner|side)?
| fill(-box|-opacity)?
| filter|fixed|flat
| flex((-basis|-end|-grow|-shrink|-start)|box)?
| flip|flood-color
| font(-size(-adjust)?|-stretch|-weight)?
| forwards
| from(-image)?
| full-width|geometricPrecision|glyphs|gradient|grayscale
| grid(-height)?
| groove|hand|hanging|hard-light|height|help|hidden|hide
| historical-(forms|ligatures)
| horizontal(-tb)?
| hue
| ideograph(-alpha|-numeric|-parenthesis|-space|ic)
| inactive|include-ruby|infinite|inherit|initial
| inline(-block|-box|-flex(box)?|-line-height|-table)?
| inset|inside
| inter(-ideograph|-word|sect)
| invert|isolat(e|ion)|italic
| jis(04|78|83|90)
| justify(-all)?
| keep-all
| large[r]?
| last|left|letter-spacing
| light(e[nr]|ing-color)
| line(-edge|-height|-through)?
| linear(-gradient|RGB)?
| lining-nums|list-item|local|loose|lowercase|lr-tb|ltr
| lumin(osity|ance)|manual
| margin(-bottom|-box|-left|-right|-top)?
| marker(-offset|s)?
| mathematical
| max-(content|height|lines|size|width)
| medium|middle
| min-(content|height|width)
| miter|mixed|move|multiply|newspaper
| no-(change|clip|(close|open)-quote|(common|discretionary|historical)-ligatures|contextual|drop|repeat)
| none|nonzero|normal|not-allowed|nowrap|oblique
| offset(-after|-before|-end|-start)?
| oldstyle-nums|opacity|open-quote
| optimize(Legibility|Precision|Quality|Speed)
| order|ordinal|ornaments
| outline(-color|-offset|-width)?
| outset|outside|over(line|-edge|lay)
| padding(-bottom|-box|-left|-right|-top)?
| page|painted|paused
| perspective-origin
| petite-caps|pixelated|pointer
| pre(-line|-wrap)?
| preserve-3d
| progid:DXImageTransform.Microsoft.(Alpha|Blur|dropshadow|gradient|Shadow)
| progress
| proportional-(nums|width)
| radial-gradient|recto|region|relative
| repeat(-[xy])?
| repeating-(linear|radial)-gradient
| replaced|reset-size|reverse|ridge|right
| round
| row(-resize|-reverse)?
| run-in
| ruby(-base|-text)?(-container)?
| rtl|running|saturat(e|ion)|screen
| scroll(-position|bar)?
| separate|sepia
| scale-down
| shape-(image-threshold|margin|outside)
| show
| sideways(-lr|-rl)?
| simplified
| slashed-zero|slice
| small(-caps|er)?
| smooth|snap|solid|soft-light
| space(-around|-between)?
| span|sRGB
| stack(ed-fractions)?
| start(ColorStr)?
| static
| step-(end|start)
| sticky
| stop-(color|opacity)
| stretch|strict
| stroke(-box|-dash(array|offset)|-miterlimit|-opacity|-width)?
| style(set)?
| stylistic
| sub(grid|pixel-antialiased|tract)?
| super|swash
| table(-caption|-cell|(-column|-footer|-header|-row)-group|-column|-row)?
| tabular-nums|tb-rl
| text((-bottom|-(decoration|emphasis)-color|-indent|-(over|under|after|before)-edge|-shadow|-size(-adjust)?|-top)|field)?
| thi(ck|n)
| titling-ca(ps|se)
| to[p]?
| touch|traditional
| transform(-origin)?
| under(-edge|line)?
| unicase|unset|uppercase|upright
| use-(glyph-orientation|script)
| verso
| vertical(-align|-ideographic|-lr|-rl|-text)?
| view-box
| viewport-fill(-opacity)?
| visibility
| visible(Fill|Painted|Stroke)?
| wait|wavy|weight|whitespace|width|word-spacing
| wrap(-reverse)?
| x{1,2}-(large|small)
| z-index|zero
| zoom(-in|-out)?
| ({{counter_styles}})
)\b
scope: support.constant.property-value.css
# Generic Font Families: https://www.w3.org/TR/CSS2/fonts.html
- match: \b(?i:sans-serif|serif|monospace|fantasy|cursive|system-ui)\b(?=\s*[;,\n}])
scope: support.constant.font-name.css
property-values:
- include: comment-block
- include: vendor-prefix
- include: builtin-functions
- include: line-names
- include: unicode-range
- include: numeric-values
- include: color-values
- include: property-value-constants
- include: literal-string
- match: \!\s*important
scope: keyword.other.important.css
rule-list-terminator:
- match: '\s*(\})'
captures:
1: punctuation.section.property-list.css
pop: true
rule-list:
- match: '\{'
scope: punctuation.section.property-list.css
push:
- meta_scope: meta.property-list.css
- match: '(?=\s*\})'
pop: true
- include: rule-list-body
rule-list-body:
- include: comment-block
- match: "(?=[-a-z])"
push:
- meta_scope: meta.property-name.css
- match: "$|(?![-a-z])"
pop: true
- include: vendor-prefix
- match: '\b(var-)({{ident}})(?=\s)'
scope: invalid.deprecated.custom-property.css
captures:
1: keyword.other.custom-property.prefix.css
2: support.type.custom-property.name.css
- include: custom-property-name
- match: \bfont(-family)?(?!-)\b
scope: support.type.property-name.css
push:
- match: (:)([ \t]*)
captures:
1: punctuation.separator.key-value.css
2: meta.property-value.css
push:
- meta_content_scope: meta.property-value.css
- match: '\s*(;)|(?=[})])'
captures:
1: punctuation.terminator.rule.css
pop: true
- include: property-values
- match: '{{ident}}(\s+{{ident}})*'
scope: string.unquoted.css
- match: ','
scope: punctuation.separator.css
- match: ''
pop: true
# Property names are sorted by popularity in descending order.
# Popularity data taken from https://www.chromestatus.com/metrics/css/popularity
- match: |-
\b(?x)(
display|width|background-color|height|position|font-family|font-weight
| top|opacity|cursor|background-image|right|visibility|box-sizing
| user-select|left|float|margin-left|margin-top|line-height
| padding-left|z-index|margin-bottom|margin-right|margin
| vertical-align|padding-top|white-space|border-radius|padding-bottom
| padding-right|padding|bottom|clear|max-width|box-shadow|content
| border-color|min-height|min-width|font-style|border-width
| border-collapse|background-size|text-overflow|max-height|text-transform
| text-shadow|text-indent|border-style|overflow-y|list-style-type
| word-wrap|border-spacing|appearance|zoom|overflow-x|border-top-left-radius
| border-bottom-left-radius|border-top-color|pointer-events
| border-bottom-color|align-items|justify-content|letter-spacing
| border-top-right-radius|border-bottom-right-radius|border-right-width
| font-smoothing|border-bottom-width|border-right-color|direction
| border-top-width|src|border-left-color|border-left-width
| tap-highlight-color|table-layout|background-clip|word-break
| transform-origin|resize|filter|backface-visibility|text-rendering
| box-orient|transition-property|transition-duration|word-spacing
| quotes|outline-offset|animation-timing-function|animation-duration
| animation-name|transition-timing-function|border-bottom-style
| border-bottom|transition-delay|transition|unicode-bidi|border-top-style
| border-top|unicode-range|list-style-position|orphans|outline-width
| line-clamp|order|flex-direction|box-pack|animation-fill-mode
| outline-color|list-style-image|list-style|touch-action|flex-grow
| border-left-style|border-left|animation-iteration-count
| page-break-inside|box-flex|box-align|page-break-after|animation-delay
| widows|border-right-style|border-right|flex-align|outline-style
| outline|background-origin|animation-direction|fill-opacity
| background-attachment|flex-wrap|transform-style|counter-increment
| overflow-wrap|counter-reset|animation-play-state|animation
| will-change|box-ordinal-group|image-rendering|mask-image|flex-flow
| background-position-y|stroke-width|background-position-x|background-position
| background-blend-mode|flex-shrink|flex-basis|flex-order|flex-item-align
| flex-line-pack|flex-negative|flex-pack|flex-positive|flex-preferred-size
| flex|user-drag|font-stretch|column-count|empty-cells|align-self
| caption-side|mask-size|column-gap|mask-repeat|box-direction
| font-feature-settings|mask-position|align-content|object-fit
| columns|text-fill-color|clip-path|stop-color|font-kerning
| page-break-before|stroke-dasharray|size|fill-rule|border-image-slice
| column-width|break-inside|column-break-before|border-image-width
| stroke-dashoffset|border-image-repeat|border-image-outset|line-break
| stroke-linejoin|stroke-linecap|stroke-miterlimit|stroke-opacity
| stroke|shape-rendering|border-image-source|border-image|border
| tab-size|writing-mode|perspective-origin-y|perspective-origin-x
| perspective-origin|perspective|text-align-last|text-align|clip-rule
| clip|text-anchor|column-rule-color|box-decoration-break|column-fill
| fill|column-rule-style|mix-blend-mode|text-emphasis-color
| baseline-shift|dominant-baseline|page|alignment-baseline
| column-rule-width|column-rule|break-after|font-variant-ligatures
| transform-origin-y|transform-origin-x|transform|object-position
| break-before|column-span|isolation|shape-outside|all
| color-interpolation-filters|marker|marker-end|marker-start
| marker-mid|color-rendering|color-interpolation|background-repeat-x
| background-repeat-y|background-repeat|background|mask-type
| flood-color|flood-opacity|text-orientation|mask-composite
| text-emphasis-style|paint-order|lighting-color|shape-margin
| text-emphasis-position|text-emphasis|shape-image-threshold
| mask-clip|mask-origin|mask|font-variant-caps|font-variant-alternates
| font-variant-east-asian|font-variant-numeric|font-variant-position
| font-variant|font-size-adjust|font-size|font-language-override
| font-display|font-synthesis|font|line-box-contain|text-justify
| text-decoration-color|text-decoration-style|text-decoration-line
| text-decoration|text-underline-position|grid-template-rows
| grid-template-columns|grid-template-areas|grid-template|rotate|scale
| translate|scroll-behavior|grid-column-start|grid-column-end
| grid-column-gap|grid-row-start|grid-row-end|grid-auto-rows
| grid-area|grid-auto-flow|grid-auto-columns|image-orientation
| hyphens|overflow-scrolling|overflow|color-profile|kerning
| nbsp-mode|color|image-resolution|grid-row-gap|grid-row|grid-column
| blend-mode|azimuth|pause-after|pause-before|pause|pitch-range|pitch
| text-height|system|negative|prefix|suffix|range|pad|fallback
| additive-symbols|symbols|speak-as|speak|grid-gap
)\b
scope: support.type.property-name.css
- match: (:)([ \t]*)
captures:
1: punctuation.separator.key-value.css
2: meta.property-value.css
push:
- meta_content_scope: meta.property-value.css
- match: '\s*(;)|(?=[})])'
captures:
1: punctuation.terminator.rule.css
pop: true
- include: property-values
selector:
- match: '\s*(?=[:.*#a-zA-Z\[])'
push:
- meta_scope: meta.selector.css
- match: "(?=[/@{)])"
pop: true
# Custom Elements: http://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts
- match: '\b([a-z](?:{{custom_element_chars}})*-(?:{{custom_element_chars}})*)\b'
scope: entity.name.tag.custom.css
- match: '\b(a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdi|bdo|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|content|data|datalist|dd|del|details|dfn|dir|dialog|div|dl|dt|element|em|embed|eventsource|fieldset|figure|figcaption|footer|form|frame|frameset|h[1-6]|head|header|hgroup|hr|html|i|iframe|img|input|ins|isindex|kbd|keygen|label|legend|li|link|main|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|picture|pre|progress|q|rp|rt|rtc|s|samp|script|section|select|shadow|small|source|span|strike|strong|style|sub|summary|sup|svg|table|tbody|td|template|textarea|tfoot|th|thead|time|title|tr|track|tt|u|ul|var|video|wbr|xmp|circle|clipPath|defs|ellipse|filter|foreignObject|g|glyph|glyphRef|image|line|linearGradient|marker|mask|path|pattern|polygon|polyline|radialGradient|rect|stop|switch|symbol|text|textPath|tref|tspan|use)\b'
scope: entity.name.tag.css
# https://drafts.csswg.org/selectors-4/#class-html
- match: '(\.){{ident}}'
scope: entity.other.attribute-name.class.css
captures:
1: punctuation.definition.entity.css
# https://drafts.csswg.org/selectors-4/#id-selectors
- match: "(#){{ident}}"
scope: entity.other.attribute-name.id.css
captures:
1: punctuation.definition.entity.css
- match: \*
scope: entity.name.tag.wildcard.css
# Combinators
# https://drafts.csswg.org/selectors-4/#combinators
# https://drafts.csswg.org/css-scoping/#deep-combinator
- match: '({{combinators}})(?![>~+])'
scope: punctuation.separator.combinator.css
- match: '({{combinators}}){2,}'
scope: invalid.illegal.combinator.css
- include: pseudo-elements
- include: pseudo-classes # pseudo-classes must be included after pseudo-elements
# Attribute Selectors
# https://drafts.csswg.org/selectors-4/#attribute-selectors
- match: '\['
scope: punctuation.definition.entity.css
push:
- meta_scope: meta.attribute-selector.css
- include: qualified-name
- match: '({{ident}})'
scope: entity.other.attribute-name.css
- match: '\s*([~*|^$]?=)\s*'
captures:
1: keyword.operator.attribute-selector.css
push:
- match: '[^\s\]\[''"]'
scope: string.unquoted.css
- include: literal-string
- match: '(?=(\s|\]))'
pop: true
- match: '(?:\s+([iI]))?' # case insensitive flag
captures:
1: keyword.other.css
- match: '\]'
scope: punctuation.definition.entity.css
pop: true
# Pseudo Elements
# https://drafts.csswg.org/selectors-4/#pseudo-elements
pseudo-elements:
- match: |-
(?x:
(:{1,2})(?:before|after|first-line|first-letter) # CSS1 & CSS2 require : or ::
| (::)(-(?:moz|ms|webkit)-)?(?:{{ident}}) # CSS3 requires ::
)\b
scope: entity.other.pseudo-element.css
captures:
1: punctuation.definition.entity.css
2: punctuation.definition.entity.css
3: support.type.vendor-prefix.css
# Pseudo Classes
# https://drafts.csswg.org/selectors-4/#pseudo-classes
pseudo-classes:
# Functional Pseudo Classes
# https://drafts.csswg.org/selectors-4/#functional-pseudo-class
# Functional Pseudo Classes with a single unquoted string
- match: '(:)(dir|lang)(?=\()'
scope: entity.other.pseudo-class.css
captures:
1: punctuation.definition.entity.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: unquoted-string
# Functional Pseudo Classes with selector list
- match: '(:)(matches|not|has)(?=\()'
scope: entity.other.pseudo-class.css
captures:
1: punctuation.definition.entity.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: selector
# Special :drop() pseudo-class
- match: '(:)(drop)(?=\()'
scope: entity.other.pseudo-class.css
captures:
1: punctuation.definition.entity.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- match: \b(active|valid|invalid)\b
scope: keyword.other.pseudo-class.css
# Functional Pseudo Classes with `An+B` param
# An+B Notation: https://drafts.csswg.org/css-syntax/#anb
# nth-last-child(), nth-child(), nth-last-of-type(), nth-of-type()
- match: '(:)(nth-last-child|nth-child|nth-last-of-type|nth-of-type)(?=\()'
scope: entity.other.pseudo-class.css
captures:
1: punctuation.definition.entity.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- match: \b(even|odd)\b
scope: keyword.other.pseudo-class.css
- match: '(?:[-+]?(?:\d+)?(n)(\s*[-+]\s*\d+)?|[-+]?\s*\d+)'
scope: constant.numeric.css
captures:
1: keyword.other.unit.css
# Regular Pseudo Classes
- match: '(:)({{ident}})'
scope: entity.other.pseudo-class.css
captures:
1: punctuation.definition.entity.css
builtin-functions:
- include: attr-function
- include: calc-function
- include: cross-fade-function
- include: filter-functions
- include: gradient-functions
- include: image-function
- include: image-set-function
- include: minmax-function
- include: url-function
- include: var-function
- include: color-adjuster-functions
# filter()
# https://drafts.fxtf.org/filters/#funcdef-filter
- match: '\b(filter)(?=\()'
scope: support.function.filter.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: comma-delimiter
- include: image-type
- include: literal-string
- include: filter-functions
# counter()
# https://drafts.csswg.org/css-lists-3/#funcdef-counter
- match: '\b(counter)(?=\()'
scope: support.function.counter.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- match: '({{ident}})'
scope: entity.other.counter-name.css string.unquoted.css
- match: '(?=,)'
push:
- match: '(?=\))'
pop: true
- include: comma-delimiter
- match: '\b({{counter_styles}}|none)\b'
scope: support.constant.property-value.counter-style.css
# counters()
# https://drafts.csswg.org/css-lists-3/#funcdef-counters
- match: '\b(counters)(?=\()'
scope: support.function.counter.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- match: '({{ident}})'
scope: entity.other.counter-name.css string.unquoted.css
- match: '(?=,)'
push:
- match: '(?=\))'
pop: true
- include: comma-delimiter
- include: literal-string
- match: '\b({{counter_styles}}|none)\b'
scope: support.constant.property-value.counter-style.css
# symbols()
# https://drafts.csswg.org/css-counter-styles-3/#symbols-function
- match: '\b(symbols)(?=\()'
scope: support.function.counter.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- match: '\b(cyclic|numeric|alphabetic|symbolic|fixed)\b'
scope: support.constant.symbol-type.css
- include: comma-delimiter
- include: literal-string
- include: image-type
# format()
# https://drafts.csswg.org/css-fonts-3/#descdef-src
# format() is also mentioned in `issue 2` at https://drafts.csswg.org/css-images-3/#issues-index
# but does not seem to be implemented in any manner
- match: '\b(format)(?=\()'
scope: support.function.font-face.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: literal-string
# local()
# https://drafts.csswg.org/css-fonts-3/#descdef-src
- match: '\b(local)(?=\()'
scope: support.function.font-face.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: unquoted-string
# Transform Functions
# https://www.w3.org/TR/css-transforms-1/#transform-functions
# transform functions with comma separated <number> types
# matrix(), scale(), matrix3d(), scale3d()
- match: '\b(matrix3d|scale3d|matrix|scale)(?=\()'
scope: support.function.transform.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: comma-delimiter
- include: number-type
- include: var-function
# transform functions with comma separated <number> or <length> types
# translate(), translate3d()
- match: '\b(translate(3d)?)(?=\()'
scope: support.function.transform.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: comma-delimiter
- include: percentage-type
- include: length-type
- include: number-type
- include: var-function
# transform functions with a single <number> or <length> type
# translateX(), translateY()
- match: '\b(translate[XY])(?=\()'
scope: support.function.transform.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: percentage-type
- include: length-type
- include: number-type
# transform functions with a single <angle> type
# rotate(), skewX(), skewY(), rotateX(), rotateY(), rotateZ()
- match: '\b(rotate[XYZ]?|skew[XY])(?=\()'
scope: support.function.transform.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: angle-type
# transform functions with comma separated <angle> types
# skew()
- match: '\b(skew)(?=\()'
scope: support.function.transform.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: comma-delimiter
- include: angle-type
# transform functions with a single <length> type
# translateZ(), perspective()
- match: '\b(translateZ|perspective)(?=\()'
scope: support.function.transform.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: length-type
# transform functions with a comma separated <number> or <angle> types
# rotate3d()
- match: '\b(rotate3d)(?=\()'
scope: support.function.transform.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: comma-delimiter
- include: angle-type
- include: number-type
# transform functions with a single <number> type
# scaleX(), scaleY(), scaleZ()
- match: '\b(scale[XYZ])(?=\()'
scope: support.function.transform.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: comma-delimiter
- include: number-type
# Timing Functions
# https://www.w3.org/TR/web-animations-1/#timing-functions
# cubic-bezier()
# https://www.w3.org/TR/web-animations-1/#cubic-bzier-timing-function
- match: '\b(cubic-bezier)(?=\()'
scope: support.function.timing.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: comma-delimiter
- include: number-type
# steps()
# https://www.w3.org/TR/web-animations-1/#step-timing-function
- match: '\b(steps)(?=\()'
scope: support.function.timing.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: comma-delimiter
- include: integer-type
- match: (end|middle|start)
scope: support.keyword.timing-direction.css
# Shape Functions
# https://www.w3.org/TR/css-shapes-1/#typedef-basic-shape
# rect() - Deprecated
# https://drafts.fxtf.org/css-masking-1/#funcdef-clip-rect
- match: '\b(rect)(?=\()'
scope: support.function.shape.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- match: \bauto\b
scope: support.constant.property-value.css
- include: length-type
# inset()
# https://www.w3.org/TR/css-shapes-1/#funcdef-inset
- match: '\b(inset)(?=\()'
scope: support.function.shape.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- match: '\bround\b'
scope: keyword.other.css
- include: length-type
- include: percentage-type
# circle()
# https://www.w3.org/TR/css-shapes-1/#funcdef-circle
# ellipse()
# https://www.w3.org/TR/css-shapes-1/#funcdef-ellipse
- match: '\b(circle|ellipse)(?=\()'
scope: support.function.shape.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- match: '\bat\b'
scope: keyword.other.css
- match: '\b(top|right|bottom|left|center|closest-side|farthest-side)\b'
scope: support.constant.property-value.css
- include: length-type
- include: percentage-type
# polygon()
# https://www.w3.org/TR/css-shapes-1/#funcdef-polygon
- match: '\b(polygon)(?=\()'
scope: support.function.shape.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- include: comment-block
- match: '(?=\))'
pop: true
- match: '\b(nonzero|evenodd)\b'
scope: support.constant.property-value.css
- include: length-type
- include: percentage-type
- include: calc-function
- match: ','
scope: punctuation.separator.sequence.css
# toggle()
# https://www.w3.org/TR/css3-values/#toggle-notation
- match: '\b(toggle)(?=\()'
scope: support.function.toggle.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: comma-delimiter
- include: vendor-prefix
- include: property-value-constants
- include: numeric-values
- include: color-values
- include: literal-string
# repeat()
# https://drafts.csswg.org/css-grid/#funcdef-repeat
- match: '\b(repeat)(?=\()'
scope: support.function.grid.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: comma-delimiter
- include: length-type
- include: percentage-type
- include: minmax-function
- include: integer-type
- include: var-function
- include: line-names
- match: \b(auto-fill|auto-fit)\b
scope: support.keyword.repetitions.css
- match: \b(max-content|min-content|auto)\b
scope: support.constant.property-value.css
# var()
# https://drafts.csswg.org/css-variables/#funcdef-var
var-function:
- match: '\b(var)(?=\()'
scope: support.function.var.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: comma-delimiter
- include: custom-property-name
# Filter Functions
# https://drafts.fxtf.org/filters/#typedef-filter-function
filter-functions:
# blur()
# https://drafts.fxtf.org/filters/#funcdef-filter-blur
- match: '\b(blur)(?=\()'
scope: support.function.filter.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: length-type
# brightness(), contrast(), grayscale(), invert(), opacity(), saturate(), sepia()
# https://drafts.fxtf.org/filters/#funcdef-filter-brightness
- match: '\b(brightness|contrast|grayscale|invert|opacity|saturate|sepia)(?=\()'
scope: support.function.filter.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: percentage-type
- include: number-type
# drop-shadow()
# https://drafts.fxtf.org/filters/#funcdef-filter-drop-shadow
- match: '\b(drop-shadow)(?=\()'
scope: support.function.filter.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: length-type
- include: color-values
# hue-rotate()
# https://drafts.fxtf.org/filters/#funcdef-filter-hue-rotate
- match: '\b(hue-rotate)(?=\()'
scope: support.function.filter.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: angle-type
# calc()
# https://www.w3.org/TR/css3-values/#funcdef-calc
calc-function:
- match: '\b(calc)(?=\()'
scope: support.function.calc.css
push:
- meta_scope: meta.function-call.css
- match: '\('
scope: punctuation.definition.group.begin.css
push: inside-calc-parens
- match: ''
pop: true
inside-calc-parens:
- meta_scope: meta.group.css
- match: '(?=\))'
set: function-notation-terminator
- include: comment-block
- include: calc-function
- include: var-function
- include: numeric-values
- include: attr-function
- match: "[-/*+]"
scope: keyword.operator.css
- match: '\('
scope: punctuation.definition.group.begin.css
push: inside-calc-parens
# attr()
# https://www.w3.org/TR/css3-values/#funcdef-attr
attr-function:
- match: '\b(attr)(?=\()'
scope: support.function.attr.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: qualified-name
- include: literal-string
- match: '({{ident}})'
scope: entity.other.attribute-name.css
push:
- match: |-
(?x)\b(
{{font_relative_lengths}}
| {{viewport_percentage_lengths}}
| {{absolute_lengths}}
| {{angle_units}}
| {{duration_units}}
| {{frequency_units}}
| {{resolution_units}}
)\b
scope: keyword.other.unit.css
- match: '(?=\))'
pop: true
- include: comma-delimiter
- include: property-value-constants
- include: numeric-values
- include: color-values
# url()
# https://drafts.csswg.org/css-images-3/#url-notation
url-function:
- match: '\b(url)(?=\()'
scope: support.function.url.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: literal-string
- include: unquoted-string
# url-prefix()
# https://www.w3.org/TR/2012/WD-css3-conditional-20120911/#url-prefix
url-prefix-function:
- match: '\b(url-prefix)(?=\()'
scope: support.function.url-prefix.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: literal-string
- include: unquoted-string
# domain()
# https://www.w3.org/TR/2012/WD-css3-conditional-20120911/#url-domain
domain-function:
- match: '\b(domain)(?=\()'
scope: support.function.domain.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: literal-string
- include: unquoted-string
# regexp()
# https://www.w3.org/TR/2012/WD-css3-conditional-20120911/#url-regexp
regexp-function:
- match: '\b(regexp)(?=\()'
scope: support.function.regexp.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: literal-string
# image()
# https://drafts.csswg.org/css-images-3/#funcdef-image
image-function:
- match: '\b(image)(?=\()'
scope: support.function.image.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: image-type
- include: literal-string
- include: color-values
- include: comma-delimiter
- include: unquoted-string
# image-set()
# https://drafts.csswg.org/css-images-3/#funcdef-image-set
image-set-function:
- match: '\b(image-set)(?=\()'
scope: support.function.image.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: literal-string
- include: color-values
- include: comma-delimiter
- include: resolution-type
- include: image-type
- match: '[0-9]+(x)'
scope: constant.numeric.css
captures:
1: keyword.other.unit.css
- include: unquoted-string
# Gradient Functions
# https://drafts.csswg.org/css-images-3/#gradients
gradient-functions:
# linear-gradient()
# https://drafts.csswg.org/css-images-3/#linear-gradients
# repeating-linear-gradient()
# https://drafts.csswg.org/css-images-3/#funcdef-repeating-linear-gradient
- match: '\b((?:repeating-)?linear-gradient)(?=\()'
scope: support.function.gradient.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: angle-type
- include: comma-delimiter
- include: color-values
- include: percentage-type
- include: length-type
- match: '\bto\b'
scope: keyword.other.css
- match: \b(top|right|bottom|left)\b
scope: support.constant.property-value.css
# radial-gradient()
# https://drafts.csswg.org/css-images-3/#radial-gradients
# repeating-radial-gradient()
# https://drafts.csswg.org/css-images-3/#funcdef-repeating-radial-gradient
- match: '\b((?:repeating-)?radial-gradient)(?=\()'
scope: support.function.gradient.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: comma-delimiter
- include: color-values
- include: percentage-type
- include: length-type
- match: '\b(at|circle|ellipse)\b'
scope: keyword.other.css
- match: |-
(?x)\b(
left
| center
| right
| top
| bottom
| closest-corner
| closest-side
| farthest-corner
| farthest-side
)\b
scope: support.constant.property-value.css
# cross-fade()
# https://drafts.csswg.org/css-images-3/#cross-fade-function
cross-fade-function:
- match: '\b(cross-fade)(?=\()'
scope: support.function.image.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: comma-delimiter
- include: percentage-type
- include: color-values
- include: image-type
- include: literal-string
- include: unquoted-string
# minmax()
# https://drafts.csswg.org/css-grid/#valdef-grid-template-columns-minmax
minmax-function:
- match: '\b(minmax)(?=\()'
scope: support.function.grid.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: comma-delimiter
- include: length-type
- include: percentage-type
- match: \b(auto|max-content|min-content)\b
scope: support.constant.property-value.css
# Color Functions
# https://drafts.csswg.org/css-color
color-functions:
# rgb(), rgba()
# https://drafts.csswg.org/css-color/#rgb-functions
- match: '\b(rgba?)(?=\()'
scope: support.function.color.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: comma-delimiter
- include: percentage-type
- include: number-type
# hsl(), hsla()
# https://drafts.csswg.org/css-color/#the-hsl-notation
# hwb() - Not yet implemented by browsers
# https://drafts.csswg.org/css-color/#funcdef-hwb
- match: '\b(hsla?|hwb)(?=\()'
scope: support.function.color.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: comma-delimiter
- include: angle-type
- include: percentage-type
- include: number-type
# gray() - Not yet implemented by browsers
# https://drafts.csswg.org/css-color/#funcdef-gray
- match: '\b(gray)(?=\()'
scope: support.function.color.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: comma-delimiter
- include: percentage-type
- include: number-type
# device-cmyk() - Not yet implemented by browsers
# https://drafts.csswg.org/css-color/#funcdef-device-cmyk
- match: '\b(device-cmyk)(?=\()'
scope: support.function.color.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: comma-delimiter
- include: color-adjuster-functions # must be included before `color-values`
- include: color-values
- include: percentage-type
- include: number-type
# color-mod() - Not yet implemented by browsers
# https://drafts.csswg.org/css-color/#funcdef-color-mod
- match: '\b(color)(?=\()'
scope: support.function.color.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: comma-delimiter
- include: color-adjuster-functions # must be included before `color-values`
- include: var-function
- include: color-values
- include: angle-type
- include: number-type
# Color Adjuster Functions - Not yet implemented by browsers
# https://drafts.csswg.org/css-color/#typedef-color-adjuster
color-adjuster-functions:
# red(), green(), blue(), alpha() - Not yet implemented by browsers
- match: '\b(red|green|blue|alpha|a)(?=\()'
scope: support.function.color.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: color-adjuster-operators
- include: percentage-type
- include: number-type
# hue() - Not yet implemented by browsers
- match: '\b(hue|h)(?=\()'
scope: support.function.color.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: color-adjuster-operators
- include: angle-type
# saturation(), lightness(), whiteness(), blackness() - Not yet implemented by browsers
- match: '\b(saturation|lightness|whiteness|blackness|[slwb])(?=\()'
scope: support.function.color.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: color-adjuster-operators
- include: percentage-type
# tint(), shade(), contrast() - Not yet implemented by browsers
# contrast() interferes with the contrast() filter function;
# therefore, it is not yet implemented here
- match: '\b(tint|shade)(?=\()'
scope: support.function.color.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- include: percentage-type
# blend(), blenda() - Not yet implemented by browsers
- match: '\b(blenda|blend)(?=\()'
scope: support.function.color.css
push:
- meta_scope: meta.function-call.css
- include: function-notation-terminator
- match: '\('
scope: punctuation.definition.group.begin.css
push:
- meta_scope: meta.group.css
- match: '(?=\))'
pop: true
- match: '\b(rgb|hsl|hwb)\b'
scope: keyword.other.color-space.css
- include: color-values
- include: percentage-type
- include: var-function
unicode-range:
- match: |-
(?xi)
(u\+)
([0-9a-f?]{1,6}
(?:(-)[0-9a-f]{1,6})?)
scope: support.unicode-range.css
captures:
1: support.constant.unicode-range.prefix.css
2: constant.codepoint-range.css
3: punctuation.section.range.css
# Qualified Name
# https://drafts.csswg.org/css-namespaces-3/#css-qnames
qualified-name:
- match: '(?:({{ident}})|(\*))?([|])(?!=)'
captures:
1: entity.other.namespace-prefix.css
2: entity.name.namespace.wildcard.css
3: punctuation.separator.namespace.css
# Custom Properties
# https://drafts.csswg.org/css-variables/#typedef-custom-property-name
custom-property-name:
- match: '(--)({{nmchar}}+)'
scope: support.type.custom-property.css
captures:
1: punctuation.definition.custom-property.css
2: support.type.custom-property.name.css
color-adjuster-operators:
- match: '[\-\+*](?=\s+)'
scope: keyword.operator.css
comma-delimiter:
- match: '\s*(,)\s*'
captures:
1: punctuation.separator.css
vendor-prefix:
- match: "-(?:webkit|moz|ms|o)-"
scope: support.type.vendor-prefix.css
function-notation-terminator:
- match: '\)'
scope: meta.group.css punctuation.definition.group.end.css
pop: true
at-rule-punctuation:
- match: \;
scope: punctuation.terminator.rule.css
- match: (?=;|$)
pop: true
# Named Grid Lines
# https://drafts.csswg.org/css-grid/#named-lines
line-names:
- match: '\['
scope: punctuation.section.begin.css
push:
- match: '{{ident}}'
scope: string.unquoted.line-name.css
- match: '\]'
scope: punctuation.section.end.css
pop: true
unquoted-string:
- match: '[^\s''"]'
scope: string.unquoted.css
literal-string:
- match: "'"
scope: punctuation.definition.string.begin.css
push:
- meta_scope: string.quoted.single.css
- match: (')|(\n)
captures:
1: punctuation.definition.string.end.css
2: invalid.illegal.newline.css
pop: true
- include: string-content
- match: '"'
scope: punctuation.definition.string.begin.css
push:
- meta_scope: string.quoted.double.css
- match: (")|(\n)
captures:
1: punctuation.definition.string.end.css
2: invalid.illegal.newline.css
pop: true
- include: string-content
string-content:
- match: \\\s*\n
scope: constant.character.escape.newline.css
- match: '\\(\h{1,6}|.)'
scope: constant.character.escape.css
# https://www.w3.org/TR/css3-values/#numeric-types
numeric-values:
- include: dimensions
- include: percentage-type
- include: number-type
integer-type:
- match: '{{integer}}'
scope: constant.numeric.css
# Make sure `number-type` is included after any other numeric values
# as `number-type` will consume all numeric values.
number-type:
- match: '{{number}}'
scope: constant.numeric.css
percentage-type:
- match: '{{number}}(%)'
scope: constant.numeric.css
captures:
1: keyword.other.unit.css
dimensions:
- include: angle-type
- include: frequency-type
- include: length-type
- include: resolution-type
- include: time-type
length-type:
- match: '{{number}}({{font_relative_lengths}}|{{viewport_percentage_lengths}}|{{absolute_lengths}})\b'
scope: constant.numeric.css
captures:
1: keyword.other.unit.css
- match: '0\b(?!%)'
scope: constant.numeric.css
time-type:
- match: '{{number}}({{duration_units}})\b'
scope: constant.numeric.css
captures:
1: keyword.other.unit.css
frequency-type:
- match: '{{number}}({{frequency_units}})\b'
scope: constant.numeric.css
captures:
1: keyword.other.unit.css
resolution-type:
- match: '{{number}}({{resolution_units}})\b'
scope: constant.numeric.css
captures:
1: keyword.other.unit.css
angle-type:
- match: '{{number}}({{angle_units}})\b'
scope: constant.numeric.css
captures:
1: keyword.other.unit.css
- match: '0\b(?!%)'
scope: constant.numeric.css
# https://drafts.csswg.org/css-images-3/#typedef-image
image-type:
- include: cross-fade-function
- include: gradient-functions
- include: image-function
- include: image-set-function
- include: url-function
{
"color_scheme": "Packages/User/CoolMonokai.sublime-color-scheme",
"ensure_newline_at_eof_on_save": true,
"font_size": 13,
"ignored_packages":
[
"Vintage"
],
"mini_diff": false,
"show_git_status": false,
"tab_size": 2,
"theme": "Adaptive.sublime-theme",
"translate_tabs_to_spaces": true,
"trim_trailing_white_space_on_save": true,
"folder_exclude_patterns": ["node_modules"]
}
%YAML 1.2
---
name: Ruby on Rails
file_extensions:
- rxml
- builder
scope: source.ruby.rails
contexts:
main:
- include: early-expressions
- include: late-expressions
- include: 'scope:source.ruby#expressions'
embedded-expressions:
- include: early-expressions
# This is placed here to prevent the lookaheads from causing infinite recursion
- include: scope:source.ruby
- include: late-expressions
early-expressions:
# Uses negative lookahead to filter out symbols
- match: |
(?x)
\b
(
before_(filter|action)
| skip_before_(filter|action)
| skip_after_(filter|action)
| after_(filter|action)
| around_(filter|action)
| filter
| filter_parameter_logging
| flash
| layout
| require_dependency
| render
| render_action
| render_text
| render_file
| render_template
| render_nothing
| render_component
| render_without_layout
| rescue_from
| root_path
| url_for
| redirect_to
| redirect_to_path
| redirect_to_url
| respond_to
| helper
| helper_method
| model
| observer
| params
| protect_from_forgery
| serialize
| scaffold
| verify
| hide_action
| append_view_path
| prepend_view_path
| view_paths
)
(?![?!:])
\b
scope: support.function.actionpack.rails
# Uses negative lookahead to filter out symbols
- match: |
(?x)
\b
(
named_scope
| default_scope
| scope
| after_create
| after_destroy
| after_save
| after_update
| after_validation
| after_validation_on_create
| after_validation_on_update
| after_rollback
| after_(create_|destroy_|update_)?commit
| before_create
| before_destroy
| before_save
| before_update
| before_validation
| before_validation_on_create
| before_validation_on_update
| composed_of
| devise
| belongs_to
| has_one
| has_many
| has_and_belongs_to_many
| has_one_attached
| has_person_name
| has_secure_token
| has_rich_text
| pg_search_scope
| validate
| validate_on_create
| validates_numericality_of
| validate_on_update
| validates_acceptance_of
| validates_associated
| validates_confirmation_of
| validates_each
| validates_format_of
| validates_inclusion_of
| validates_exclusion_of
| validates_length_of
| validates_presence_of
| validates_size_of
| validates_uniqueness_of
| validates
| attr_protected
| attr_accessible
| attr_readonly
)
(?![?!:])
\b
scope: support.function.activerecord.rails
- match: |
(?x)
\b
(
alias_method_chain
| alias_attribute
| delegate
(?# | attribute)
| cattr_accessor
| mattr_accessor
| store_accessor
| class_attribute
| attr_encrypted
| returning
)
\b
scope: support.function.activesupport.rails
# These expressions match the leading whitespace to properly match the correct
# "end", but it also means they'll match before the main Ruby syntax will
late-expressions:
# Uses lookahead to match classes with the ControllerTest suffix
- match: '(^\s*)(?=class\s+(([.[:alnum:]_:]+ControllerTest(\s*<\s*[.[:alnum:]_:]+)?)))'
push:
- meta_scope: meta.functional_test.rails
- match: ^\1(?=end)\b
pop: true
- include: embedded-expressions
# Uses lookahead to match classes with the Controller suffix
- match: '(^\s*)(?=class\s+(([.[:alnum:]_:]+Controller\b(\s*<\s*[.[:alnum:]_:]+)?)|(<<\s*[.[:alnum:]_:]+)))(?!.+\bend\b)'
push:
- meta_scope: meta.controller.rails
- match: ^\1(?=end)\b
pop: true
- include: embedded-expressions
# Uses lookahead to match modules with the Helper suffix
- match: '(^\s*)(?=module\s+((([[:upper:]]\w*::)*)[[:upper:]]\w*)Helper\b)'
push:
- meta_scope: meta.helper.rails
- match: ^\1(?=end)\b
pop: true
- include: embedded-expressions
# Uses lookahead to match classes that inherit from ActionMailer::Base
- match: '(^\s*)(?=class\s+(([.[:alnum:]_:]+(\s*<\s*ActionMailer::Base\b))))'
push:
- meta_scope: meta.mailer.rails
- match: ^\1(?=end)\b
pop: true
- include: embedded-expressions
# Uses lookahead to match classes that (may) inherit from ActiveRecord::Base
- match: (^\s*)(?=class\s+.+ActiveRecord::Base\b)
push:
- meta_scope: meta.model.rails
- match: ^\1(?=end)\b
pop: true
- include: embedded-expressions
# Uses lookahead to match classes that (may) inherit from ActiveRecord::Migration
- match: (^\s*)(?=class\s+.+ActiveRecord::Migration\b)
push:
- meta_scope: meta.migration.rails
- match: ^\1(?=end)\b
pop: true
- match: (^\s*)(?=change_table)\b
push:
- meta_content_scope: meta.migration.change_table.rails
- match: ^\1(?=end)\b
pop: true
- include: embedded-expressions
- match: (^\s*)(?=create_table)\b
push:
- meta_content_scope: meta.migration.create_table.rails
- match: ^\1(?=end)\b
pop: true
- include: embedded-expressions
- include: embedded-expressions
# Uses lookahead to match classes with the Test suffix
- match: '(^\s*)(?=class\s+(?![.[:alnum:]_:]+ControllerTest)(([.[:alnum:]_:]+Test(\s*<\s*[.[:alnum:]_:]+)?)|(<<\s*[.[:alnum:]_:]+)))'
push:
- meta_scope: meta.unit_test.rails
- match: ^\1(?=end)\b
pop: true
- include: embedded-expressions
- match: (^\s*)ActionController::Routing::Routes
push:
- meta_scope: meta.routes.rails
- match: ^\1(?=end)\b
pop: true
- include: embedded-expressions
%YAML 1.2
---
name: Ruby
# TODO: unresolved issues
#
# text:
# "p << end
# print me!
# end"
# symptoms:
# not recognized as a heredoc
# solution:
# there is no way to distinguish perfectly between the << operator and the start
# of a heredoc. Currently, we require assignment to recognize a heredoc. More
# refinement is possible.
# • Heredocs with indented terminators (<<-) are always distinguishable, however.
# • Nested heredocs are not really supportable at present
#
# text:
# print <<-'THERE'
# This is single quoted.
# The above used #{Time.now}
# THERE
# symtoms:
# From Programming Ruby p306; should be a non-interpolated heredoc.
#
# text:
# "a\332a"
# symptoms:
# '\332' is not recognized as slash3.. which should be octal 332.
# solution:
# plain regexp.. should be easy.
#
# text:
# val?(a):p(b)
# val?'a':'b'
# symptoms:
# ':p' is recognized as a symbol.. its 2 things ':' and 'p'.
# :'b' has same problem.
# solution:
# ternary operator rule, precedence stuff, symbol rule.
# but also consider 'a.b?(:c)' ??
file_extensions:
- rb
- Appfile
- Appraisals
- Berksfile
- Brewfile
- capfile
- cgi
- Cheffile
- config.ru
- Deliverfile
- Fastfile
- fcgi
- Gemfile
- gemspec
- Guardfile
- irbrc
- jbuilder
- Podfile
- podspec
- prawn
- rabl
- rake
- Rakefile
- Rantfile
- rbx
- rjs
- ruby.rail
- Scanfile
- simplecov
- Snapfile
- thor
- Thorfile
- Vagrantfile
first_line_match: ^#!\s*/.*\bj?ruby\b
scope: source.ruby
variables:
identifier: '\b[[:alpha:]_][[:alnum:]_]*\b'
method_punctuation: '(?:[?!]|=(?![>=]))?'
method_name: '{{identifier}}{{method_punctuation}}'
path_lookahead: '(::)?({{identifier}}(\.|::))*{{identifier}}'
contexts:
main:
- include: expressions
expressions:
- include: class
- include: module
- include: constants
- include: invalid
- include: blocks
- include: keywords
- include: well-known-methods
- include: variables
- include: method
- include: strings
- include: comments
- include: data-section
- include: heredocs
- include: operators
- include: identifiers-accessors
comments:
# multiline comments
- match: ^=begin
scope: punctuation.definition.comment.ruby
push:
- meta_scope: comment.block.documentation.ruby
- match: ^=end
scope: punctuation.definition.comment.ruby
pop: true
- match: '(#).*$\n?'
scope: comment.line.number-sign.ruby
captures:
1: punctuation.definition.comment.ruby
class:
# Defining a class method
- match: \b(class)\b(?=\s*<)
scope: keyword.control.class.ruby
- match: '\b(class)\b'
scope: meta.class.ruby keyword.control.class.ruby
push: class-declaration
class-declaration:
- meta_content_scope: meta.class.ruby
- match: '(?={{path_lookahead}})'
set: class-name
# Escape if no valid match
- match: (?=\S)
pop: true
class-name:
- meta_content_scope: meta.class.ruby entity.name.class.ruby
- include: name-parts
- match: ''
set: class-inheritance
class-inheritance:
- meta_content_scope: meta.class.ruby
- match: '<'
scope: punctuation.separator.inheritance.ruby
set:
- meta_content_scope: meta.class.ruby
- match: '(?={{path_lookahead}})'
set:
- meta_content_scope: meta.class.ruby entity.other.inherited-class.ruby
- include: name-parts
- match: ''
pop: true
# Escape if no valid match
- match: '(?=\S)'
pop: true
# Escape if no valid match
- match: '(?=\S)'
pop: true
module:
- match: \b(module)\b
scope: meta.module.ruby keyword.control.module.ruby
push: module-declaration
module-declaration:
- meta_content_scope: meta.module.ruby
- match: '(?=(::)?({{identifier}}::)*{{identifier}})'
set:
- meta_content_scope: meta.module.ruby entity.name.module.ruby
- include: name-parts
- match: ''
pop: true
# Escape if no valid match
- match: (?=\S)
pop: true
name-parts:
- match: '::'
scope: punctuation.accessor.ruby
- match: '\.'
scope: punctuation.accessor.ruby
- match: '({{identifier}})(::|\.)'
captures:
1: support.other.namespace.ruby
2: punctuation.accessor.ruby
- match: '{{identifier}}'
invalid:
# else if is a common mistake carried over from other languages. it works if you put in a second end, but it’s never what you want.
- match: \belse\s+if\b
scope: invalid.deprecated.ruby
constants:
# constant definition, handles multiple definitions on a single line 'APPLE, ORANGE= 1, 2'
- match: '\b([[:upper:]]\w*)(?=(\s*,\s*[[:upper:]]\w*)*\s*=(?![=\>]))'
scope: meta.constant.ruby entity.name.constant.ruby
# Ruby 1.9 symbols
- match: '{{identifier}}[?!]?(:)(?!:)'
scope: constant.other.symbol.ruby
captures:
1: punctuation.definition.constant.ruby
push: try-regex
- match: '\b(nil|true|false)\b(?![?!])'
scope: constant.language.ruby
- match: '\b(__(FILE|LINE|ENCODING)__|self)\b(?![?!])'
scope: variable.language.ruby
- match: '\b(0[xX]\h(_?\h)*|\d(_?\d)*(\.(?![^[:space:][:digit:]])(_?\d)*)?([eE][-+]?\d(_?\d)*)?|0[bB][01]+)\b'
scope: constant.numeric.ruby
- match: ":'"
scope: punctuation.definition.constant.ruby
push:
- meta_scope: constant.other.symbol.single-quoted.ruby
- match: "'"
scope: punctuation.definition.constant.ruby
pop: true
- match: '\\[''\\]'
scope: constant.character.escape.ruby
- match: ':"'
scope: punctuation.definition.constant.ruby
push:
- meta_scope: constant.other.symbol.double-quoted.ruby
- match: '"'
scope: punctuation.definition.constant.ruby
pop: true
- include: interpolated-ruby
- include: escaped-char
# Unquoted symbols
- match: |-
(?x:
(:)
(
{{identifier}}{{method_punctuation}}|
===?|
>[>=]?|
<[<=]?|
<=>|
[%&`/\|]|
\*\*?|
=?~|
[-+]@?|
\[\]=?|
@@?{{identifier}}
)
)
scope: constant.other.symbol.ruby
captures:
1: punctuation.definition.constant.ruby
# matches questionmark-letters.
#
# examples (1st alternation = hex):
# ?\x1 ?\x61
#
# examples (2nd alternation = octal):
# ?\0 ?\07 ?\017
#
# examples (3rd alternation = escaped):
# ?\n ?\b
#
# examples (4th alternation = meta-ctrl):
# ?\C-a ?\M-a ?\C-\M-\C-\M-a
#
# examples (4th alternation = normal):
# ?a ?A ?0
# ?* ?" ?(
# ?. ?#
#
# the negative lookbehind prevents against matching
# p(42.tainted?)
- match: '\?(\\(x\h{1,2}\b|0[0-7]{0,2}\b|[^x0MC]\b)|(\\[MC]-)+\w\b|[a-zA-Z0-9_]\b(?!\s*:)|[^a-zA-Z0-9_\s\\])'
scope: constant.numeric.ruby
blocks:
- match: \b(do)\b\s*
captures:
1: keyword.control.start-block.ruby
push: maybe-block-parameters
- match: \{
scope: punctuation.section.scope.ruby
push: maybe-block-parameters
maybe-block-parameters:
- match: \|
scope: meta.block.parameters.ruby punctuation.definition.parameters.begin.ruby
set: block-parameters
- match: (?=\s*[^\s\|])
pop: true
block-parameters:
- meta_content_scope: meta.block.parameters.ruby
- match: \|
scope: meta.block.parameters.ruby punctuation.definition.parameters.end.ruby
set: try-regex
- match: '{{identifier}}'
scope: variable.parameter.ruby
- match: ','
scope: punctuation.separator.ruby
- match: \*
scope: keyword.operator.splat.ruby
- match: '&'
scope: keyword.operator.ruby
- match: '(?==)'
set:
- meta_content_scope: meta.block.parameters.default-value.ruby
- match: '='
scope: keyword.operator.assignment.ruby
set:
- meta_content_scope: meta.block.parameters.default-value.ruby
- match: '(?=[,\|])'
set: block-parameters
- include: nest-all
- include: expressions
keywords:
- match: '\b(BEGIN|END)\b(?![?!])'
scope: keyword.control.ruby
- match: '\b(class|module)\b(?![?!])'
scope: keyword.control.ruby
- match: '\b(begin|end|ensure|rescue)\b(?![?!])'
scope: keyword.control.ruby
- match: '\b(case|else|ensure|for|in|then)\b(?![?!])'
scope: keyword.control.ruby
- match: '\b(elsif|if|unless|when|while|until)\b(?![?!])'
scope: keyword.control.ruby
push: after-keyword
- match: \b(and|not|or)\b
scope: keyword.operator.logical.ruby
push: after-keyword
- match: '!+|&&|\|\||\^'
scope: keyword.operator.logical.ruby
push: after-operator
- match: '\b(alias|alias_method|break|next|redo|retry|return|super|undef|yield)\b(?![?!])|\bdefined\?|\bblock_given\?'
scope: keyword.control.pseudo-method.ruby
operators:
- match: '=>'
scope: punctuation.separator.key-value.ruby
push: after-operator
- match: '<<=|%=|&=|\*=|\*\*=|\+=|\-=|\^=|\|{1,2}=|<<'
scope: keyword.operator.assignment.augmented.ruby
push: after-operator
- match: '<=>|<(?!<|=)|>(?!<|=|>)|<=|>=|===|==|=~|!=|!~'
scope: keyword.operator.comparison.ruby
push: after-operator
- match: (%|&|\*\*|\*|\+|\-|/)
scope: keyword.operator.arithmetic.ruby
push: after-operator
- match: '='
scope: keyword.operator.assignment.ruby
push: after-operator
- match: \||~|>>
scope: keyword.operator.other.ruby
push: after-operator
- match: \?
scope: keyword.operator.conditional.ruby
push:
# Handle hash-key-lookalike of identifier: in ternary
- match: '\s*{{identifier}}(:)(?!:)'
captures:
1: keyword.operator.conditional.ruby
- include: after-operator
- match: ':(?!:)'
scope: keyword.operator.conditional.ruby
push: after-operator
- match: \;
scope: punctuation.terminator.statement.ruby
push: after-operator
- match: ","
scope: punctuation.separator.ruby
push: after-operator
- match: '\['
scope: punctuation.section.array.ruby
push: after-operator
- match: \(
scope: punctuation.definition.group.begin.ruby
push: after-operator
# Opening { is handled by "block" context to try and detect parameters
- match: '\}'
scope: punctuation.section.scope.ruby
- match: '\]'
scope: punctuation.section.array.ruby
- match: \)
scope: punctuation.definition.group.end.ruby
- match: '\.\.\.?'
scope: keyword.operator.ruby
push: after-operator
identifiers-accessors:
# This consumes class/module access to prevent issues parsing : as part
# of a ternary operator
- match: '(::)(?={{identifier}}{{method_punctuation}})'
scope: punctuation.accessor.ruby
push:
- include: well-known-methods
- match: '{{identifier}}{{method_punctuation}}'
- match: ''
set: after-identifier
# This consumes attribute access so we don't need a lookbehind for .
- match: '(\.)(?={{identifier}}{{method_punctuation}})'
scope: punctuation.accessor.ruby
push:
- include: well-known-methods
- match: '{{identifier}}{{method_punctuation}}'
- match: ''
set: after-identifier
# This consumes method names ending in punctuation so we don't need a lookbehind for ?, ! or =
- match: '{{identifier}}{{method_punctuation}}'
# This consumes module/class accessor so we don't need a lookbehind for ::
push: after-identifier
- match: '::|\.'
scope: punctuation.accessor.ruby
after-identifier:
# Handles a : right after an identifier. In this case it can't be the
# beginning of a symbol, so it must be part of a ternary operator
- match: ':(?!:)'
scope: keyword.operator.conditional.ruby
pop: true
- match: ''
pop: true
variables:
- match: '(@)[a-zA-Z_]\w*'
scope: variable.other.readwrite.instance.ruby
captures:
1: punctuation.definition.variable.ruby
- match: '(@@)[a-zA-Z_]\w*'
scope: variable.other.readwrite.class.ruby
captures:
1: punctuation.definition.variable.ruby
- match: '(\$)[a-zA-Z_]\w*'
scope: variable.other.readwrite.global.ruby
captures:
1: punctuation.definition.variable.ruby
- match: '(\$)(!|@|&|`|''|\+|\d+|~|=|/|\\|,|;|\.|<|>|_|\*|\$|\?|:|"|-[0adFiIlpv])'
scope: variable.other.readwrite.global.pre-defined.ruby
captures:
1: punctuation.definition.variable.ruby
- match: '\b(ENV)\['
captures:
1: variable.other.constant.ruby
push:
- meta_scope: meta.environment-variable.ruby
- match: '\]'
pop: true
- include: expressions
- match: '(::)?(\b[[:upper:]]\w*)'
captures:
1: punctuation.accessor.ruby
2: support.class.ruby
- match: '\b[[:upper:]]\w*\b'
scope: variable.other.constant.ruby
well-known-methods:
- match: '\b(initialize|new|loop|include|extend|prepend|raise|fail|attr_reader|attr_writer|attr_accessor|attr|catch|throw|module_function|public|protected|private)\b(?![?!])'
scope: keyword.other.special-method.ruby
- match: \b(require|require_relative|gem)\b
captures:
1: keyword.other.special-method.ruby
push:
- meta_scope: meta.require.ruby
- match: $|(?=#)
captures:
1: keyword.other.special-method.ruby
pop: true
- include: expressions
# Conversion methods
- match: |-
(?x:
\b(
(?# to_ary|)
(?# to_a|)
to_c|
to_enum|
(?# to_f|)
(?# to_hash|)
(?# to_h|)
(?# to_int|)
to_io|
(?# to_i|)
to_proc|
to_r|
(?# to_str|)
(?# to_sym|)
(?# to_s)
)\b
(?![!?=])
)
scope: support.function.builtin.ruby
# Methods that may be followed by a regex
- match: |-
(?x:
\b(
gsub!|
sub!
)(?=\s)
|
\b(
assert_match|
assert_no_match|
gsub|
(?# index|)
match|
scan|
sub
)\b
)
scope: support.function.builtin.ruby
push: try-regex
# Methods from the Object class not handled elsewhere, ending in punctuation
- match: |-
(?x:
\b(
eql\?|
instance_of\?|
instance_variable_defined\?|
is_a\?|
kind_of\?|
(?# nil\?|)
respond_to\?|
respond_to_missing\?|
tainted\?|
untrusted\?
)
)
scope: support.function.builtin.ruby
# Methods from the Object class not handled elsewhere
- match: |-
(?x:
\b(
class|
clone|
define_singleton_method|
display|
dup|
enum_for|
extend|
freeze|
frozen?|
hash|
inspect|
instance_variable_get|
instance_variable_set|
instance_variables|
itself|
method|
methods|
object_id|
private_methods|
protected_methods|
public_method|
public_methods|
public_send|
remove_instance_variable|
send|
singleton_class|
singleton_method|
singleton_methods|
taint|
tap|
trust|
untaint|
untrust
)\b
(?![!?=])
)
scope: support.function.builtin.ruby
# Methods from the Kernel class not handled elsewhere, ending in punctuation
- match: |-
(?x:
\b(
autoload\?|
iterator\?|
exit!
)
)
scope: support.function.builtin.ruby
# Methods from the Kernel class not handled elsewhere
- match: |-
(?x:
\b(
Array|
Complex|
Float|
Hash|
Integer|
Rational|
String|
__callee__|
__dir__|
__method__|
__send__|
abort|
at_exit|
autoload|
binding|
callcc|
caller|
caller_locations|
chomp|
chop|
eval|
exec|
exit|
fork|
format|
gets|
global_variables|
gsub|
lambda|
load|
local_variables|
open|
p|
print|
printf|
proc|
putc|
puts|
rand|
readline|
readlines|
require|
require_relative|
set_trace_func|
sleep|
spawn|
sprintf|
srand|
sub|
syscall|
system|
test|
trace_var|
trap|
untrace_var|
warn
)\b
(?![!?=])
)
scope: support.function.builtin.ruby
# Methods from the Kernel class not handled elsewhere, ending in punctuation
- match: |-
(?x:
\b(
class_variable_defined\?|
const_defined\?|
include\?|
instance_methods\?|
method_defined\?|
private_method_defined\?|
protected_method_defined\?|
public_method_defined\?|
singleton_class\?
)
)
scope: support.function.builtin.ruby
# Methods from the Module class not handled elsewhere
- match: |-
(?x:
\b(
ancestors|
append_features|
class_eval|
class_exec|
class_variable_get|
class_variable_set|
class_variables|
const_get|
const_missing|
const_set|
constants|
define_method|
extend_object|
extended|
freeze|
included|
included_modules|
inspect|
method_added|
method_removed|
method_undefined|
module_eval|
module_exec|
prepend_features|
prepended|
private_class_method|
private_constant|
private_instance_methods|
protected_instance_methods|
public_class_method|
public_constant|
public_instance_method|
public_instance_methods|
refine|
remove_class_variable|
remove_const|
remove_method|
undef_method|
using
)\b
(?![!?=])
)
scope: support.function.builtin.ruby
method:
- match: \b(def)\b
scope: meta.function.ruby keyword.control.def.ruby
push:
- meta_content_scope: meta.function.ruby
- match: '(self)(\.)({{identifier}}{{method_punctuation}}|===?|>[>=]?|<=>|<[<=]?|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\]=?)'
captures:
1: variable.language.ruby
2: punctuation.accessor.ruby
3: entity.name.function.ruby
set: method-parameters-start
- match: '===?|>[>=]?|<=>|<[<=]?|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\]=?'
scope: entity.name.function.ruby
set: method-parameters-start
- match: '(?:({{identifier}})(::|\.))?{{identifier}}{{method_punctuation}}'
scope: entity.name.function.ruby
captures:
1: support.other.namespace.ruby
2: punctuation.accessor.ruby
set: method-parameters-start
- match: '$'
pop: true
- match: '(?=\S)'
pop: true
method-parameters-start:
- meta_content_scope: meta.function.ruby
- match: '(?=\()'
set:
- meta_content_scope: meta.function.parameters.ruby
- match: '\('
scope: punctuation.definition.group.begin.ruby
set: method-parameters
# No parameters
- match: '(?=$|;|#)'
pop: true
# No parentheses around parameters
- match: '(?=[[:alpha:]_*])'
set: method-bare-parameters
method-parameters:
- meta_content_scope: meta.function.parameters.ruby
- match: '\)'
scope: meta.function.parameters.ruby punctuation.definition.group.end.ruby
pop: true
- match: '{{identifier}}'
scope: variable.parameter.ruby
- include: comments
- match: ','
scope: punctuation.separator.ruby
- match: '\*'
scope: keyword.operator.splat.ruby
- match: '&'
scope: keyword.operator.ruby
# De-structuring
- match: \(
scope: punctuation.definition.group.begin.ruby
push:
- match: \)
scope: punctuation.definition.group.end.ruby
pop: true
- match: '{{identifier}}'
scope: variable.parameter.ruby
- match: ','
scope: punctuation.separator.ruby
- match: '\*'
scope: keyword.operator.splat.ruby
# Default values
- match: (?==)
set:
- meta_content_scope: meta.function.parameters.default-value.ruby
- match: '='
scope: keyword.operator.assignment.ruby
set:
- meta_content_scope: meta.function.parameters.default-value.ruby
- match: '(?=[,\)])'
set: method-parameters
- include: nest-all
- include: expressions
# Keyword parameter (with default value support)
- match: (?=:)
set:
- meta_content_scope: meta.function.parameters.default-value.ruby
- match: ':'
scope: punctuation.separator.ruby
set:
- meta_content_scope: meta.function.parameters.default-value.ruby
- match: '(?=[,\)])'
set: method-parameters
- include: nest-all
- include: expressions
# When no parentheses are placed around the parameters
method-bare-parameters:
- meta_content_scope: meta.function.parameters.ruby
- match: '(?=$|;|#)'
pop: true
- match: '{{identifier}}'
scope: variable.parameter.ruby
- match: ','
scope: punctuation.separator.ruby
- match: '\*'
scope: keyword.operator.splat.ruby
- match: '&'
scope: keyword.operator.ruby
# Default values
- match: (?==)
set:
- meta_content_scope: meta.function.parameters.default-value.ruby
- match: '='
scope: punctuation.operator.assignment.ruby
set:
- meta_content_scope: meta.function.parameters.default-value.ruby
- match: '(?=$|[,;])'
set: method-bare-parameters
- include: nest-all
- include: expressions
# Keyword parameter (with default value support)
- match: (?=:)
set:
- meta_content_scope: meta.function.parameters.default-value.ruby
- match: ':'
scope: punctuation.separator.ruby
set:
- meta_content_scope: meta.function.parameters.default-value.ruby
- match: '(?=$|[,;])'
set: method-bare-parameters
- include: nest-all
- include: expressions
strings:
- include: early-strings
- include: regexes
- include: late-strings
early-strings:
# single quoted string (does not allow interpolation)
- match: "'"
scope: punctuation.definition.string.begin.ruby
push:
- meta_scope: string.quoted.single.ruby
- match: "'"
scope: punctuation.definition.string.end.ruby
pop: true
- match: \\'|\\\\
scope: constant.character.escape.ruby
- include: string-placeholder
# double quoted string (allows for interpolation)
- match: '"'
scope: punctuation.definition.string.begin.ruby
push:
- meta_scope: string.quoted.double.ruby
- match: '"'
scope: punctuation.definition.string.end.ruby
pop: true
- include: interpolated-ruby
- include: escaped-char
- include: string-placeholder
# execute string (allows for interpolation)
- match: "`"
scope: punctuation.definition.string.begin.ruby
push:
- meta_scope: string.interpolated.ruby
- match: "`"
scope: punctuation.definition.string.end.ruby
pop: true
- include: interpolated-ruby
- include: escaped-char
# execute string (allow for interpolation)
- match: '%x\{'
scope: punctuation.definition.string.begin.ruby
push:
- meta_scope: string.interpolated.ruby
- match: '\}'
scope: punctuation.definition.string.end.ruby
pop: true
- include: interpolated-ruby
- include: escaped-char
- include: nest-curly-i
# execute string (allow for interpolation)
- match: '%x\['
scope: punctuation.definition.string.begin.ruby
push:
- meta_scope: string.interpolated.ruby
- match: '\]'
scope: punctuation.definition.string.end.ruby
pop: true
- include: interpolated-ruby
- include: escaped-char
- include: nest-brackets-i
# execute string (allow for interpolation)
- match: '%x\<'
scope: punctuation.definition.string.begin.ruby
push:
- meta_scope: string.interpolated.ruby
- match: \>
scope: punctuation.definition.string.end.ruby
pop: true
- include: interpolated-ruby
- include: escaped-char
- include: nest-ltgt-i
# execute string (allow for interpolation)
- match: '%x\('
scope: punctuation.definition.string.begin.ruby
push:
- meta_scope: string.interpolated.ruby
- match: \)
scope: punctuation.definition.string.end.ruby
pop: true
- include: interpolated-ruby
- include: escaped-char
- include: nest-parens-i
# execute string (allow for interpolation)
- match: '%x([^\w])'
scope: punctuation.definition.string.begin.ruby
push:
- meta_scope: string.interpolated.ruby
- match: \1
scope: punctuation.definition.string.end.ruby
pop: true
- include: interpolated-ruby
- include: escaped-char
late-strings:
# literal capable of interpolation ()
- match: '%[QWI]?\('
scope: punctuation.definition.string.begin.ruby
push:
- meta_scope: string.quoted.other.literal.upper.ruby
- match: \)
scope: punctuation.definition.string.end.ruby
pop: true
- include: interpolated-ruby
- include: escaped-char
- include: nest-parens-i
# "literal capable of interpolation []"
- match: '%[QWI]?\['
scope: punctuation.definition.string.begin.ruby
push:
- meta_scope: string.quoted.other.literal.upper.ruby
- match: '\]'
scope: punctuation.definition.string.end.ruby
pop: true
- include: interpolated-ruby
- include: escaped-char
- include: nest-brackets-i
# literal capable of interpolation <>
- match: '%[QWI]?\<'
scope: punctuation.definition.string.begin.ruby
push:
- meta_scope: string.quoted.other.literal.upper.ruby
- match: \>
scope: punctuation.definition.string.end.ruby
pop: true
- include: interpolated-ruby
- include: escaped-char
- include: nest-ltgt-i
# literal capable of interpolation -- {}
- match: '%[QWI]?\{'
scope: punctuation.definition.string.begin.ruby
push:
- meta_scope: string.quoted.double.ruby.mod
- match: '\}'
scope: punctuation.definition.string.end.ruby
pop: true
- include: interpolated-ruby
- include: escaped-char
- include: nest-curly-i
# literal capable of interpolation -- wildcard
- match: '%[QWI]([^\w])'
scope: punctuation.definition.string.begin.ruby
push:
- meta_scope: string.quoted.other.literal.upper.ruby
- match: \1
scope: punctuation.definition.string.end.ruby
pop: true
- include: interpolated-ruby
- include: escaped-char
# literal capable of interpolation -- wildcard
- match: '%([^\w\s=])'
scope: punctuation.definition.string.begin.ruby
push:
- meta_scope: string.quoted.other.literal.other.ruby
- match: \1
scope: punctuation.definition.string.end.ruby
pop: true
- include: interpolated-ruby
- include: escaped-char
# literal incapable of interpolation -- ()
- match: '%[qwsi]\('
scope: punctuation.definition.string.begin.ruby
push:
- meta_scope: string.quoted.other.literal.lower.ruby
- match: \)
scope: punctuation.definition.string.end.ruby
pop: true
- match: \\\)|\\\\
scope: constant.character.escape.ruby
- include: nest-parens
# literal incapable of interpolation -- <>
- match: '%[qwsi]\<'
scope: punctuation.definition.string.begin.ruby
push:
- meta_scope: string.quoted.other.literal.lower.ruby
- match: \>
scope: punctuation.definition.string.end.ruby
pop: true
- match: \\\>|\\\\
scope: constant.character.escape.ruby
- include: nest-ltgt
# literal incapable of interpolation -- []
- match: '%[qwsi]\['
scope: punctuation.definition.string.begin.ruby
push:
- meta_scope: string.quoted.other.literal.lower.ruby
- match: '\]'
scope: punctuation.definition.string.end.ruby
pop: true
- match: '\\\]|\\\\'
scope: constant.character.escape.ruby
- include: nest-brackets
# literal incapable of interpolation -- {}
- match: '%[qwsi]\{'
scope: punctuation.definition.string.begin.ruby
push:
- meta_scope: string.quoted.other.literal.lower.ruby
- match: '\}'
scope: punctuation.definition.string.end.ruby
pop: true
- match: '\\\}|\\\\'
scope: constant.character.escape.ruby
- include: nest-curly
# literal incapable of interpolation -- wildcard
- match: '%[qwsi]([^\w])'
scope: punctuation.definition.string.begin.ruby
push:
- meta_scope: string.quoted.other.literal.lower.ruby
- match: \1
scope: punctuation.definition.string.end.ruby
pop: true
# Cant be named because its not necessarily an escape
- match: \\.
after-keyword:
- include: try-regex
after-operator:
- include: try-regex
try-regex:
# Generally for multiline regexes, one of the %r forms below will be used,
# so we bail out if we can't find a second / on the current line
- match: '\s*(/)(?![*+{}?])(?=.*/)'
captures:
1: string.regexp.classic.ruby punctuation.definition.string.ruby
push:
- meta_content_scope: string.regexp.classic.ruby
- match: "(/)([eimnosux]*)"
scope: string.regexp.classic.ruby
captures:
1: punctuation.definition.string.ruby
2: keyword.other.ruby
pop: true
- include: regex-sub
- match: ''
pop: true
regexes:
# Needs higher precedence than regular expressions.
- match: /=
scope: keyword.operator.assignment.augmented.ruby
- match: '(?=^\s*/)'
push: try-regex
- match: (?=/\s*[^\w\(\s@"'])
push: try-regex
# regular expressions (literal)
- match: '%r\{'
scope: punctuation.definition.string.begin.ruby
push:
- meta_scope: string.regexp.mod-r.ruby
- match: '\}[eimnosux]*'
scope: punctuation.definition.string.end.ruby
pop: true
- include: regex-sub
- include: nest-curly-r
# regular expressions (literal)
- match: '%r\['
scope: punctuation.definition.string.begin.ruby
push:
- meta_scope: string.regexp.mod-r.ruby
- match: '\][eimnosux]*'
scope: punctuation.definition.string.end.ruby
pop: true
- include: regex-sub
- include: nest-brackets-r
# regular expressions (literal)
- match: '%r\('
scope: punctuation.definition.string.begin.ruby
push:
- meta_scope: string.regexp.mod-r.ruby
- match: '\)[eimnosux]*'
scope: punctuation.definition.string.end.ruby
pop: true
- include: regex-sub
- include: nest-parens-r
# regular expressions (literal)
- match: '%r\<'
scope: punctuation.definition.string.begin.ruby
push:
- meta_scope: string.regexp.mod-r.ruby
- match: '\>[eimnosux]*'
scope: punctuation.definition.string.end.ruby
pop: true
- include: regex-sub
- include: nest-ltgt-r
# regular expressions (literal)
- match: '%r([^\w])'
scope: punctuation.definition.string.begin.ruby
push:
- meta_scope: string.regexp.mod-r.ruby
- match: '\1[eimnosux]*'
scope: punctuation.definition.string.end.ruby
pop: true
- include: regex-sub
regex-sub:
- include: interpolated-ruby
- include: escaped-char
- match: '(\{)\d+(,\d+)?(\})'
scope: string.regexp.arbitrary-repetition.ruby
captures:
1: punctuation.definition.arbitrary-repetition.ruby
3: punctuation.definition.arbitrary-repetition.ruby
- match: '\[(?:\^?\])?'
scope: punctuation.definition.character-class.ruby
push:
- meta_scope: string.regexp.character-class.ruby
- match: '\]'
scope: punctuation.definition.character-class.ruby
pop: true
- include: escaped-char
- match: \(
scope: punctuation.definition.group.ruby
push:
- meta_scope: string.regexp.group.ruby
- match: \)
scope: punctuation.definition.group.ruby
pop: true
- include: regex-sub
# We are restrictive in what we allow to go after the comment character to
# avoid false positives, since the availability of comments depend on regexp
# flags.
- match: '(?:^|\s)(#)\s[[a-zA-Z0-9,. \t?!-][^\x{00}-\x{7F}]]*$'
scope: comment.line.number-sign.ruby
captures:
1: punctuation.definition.comment.ruby
nest-brackets-r:
- match: '\['
scope: punctuation.section.scope.ruby
push:
- match: '\]'
scope: punctuation.section.scope.ruby
pop: true
- include: regex-sub
- include: nest-brackets-r
nest-curly-r:
- match: '\{'
scope: punctuation.section.scope.ruby
push:
- match: '\}'
scope: punctuation.section.scope.ruby
pop: true
- include: regex-sub
- include: nest-curly-r
nest-ltgt-r:
- match: \<
scope: punctuation.section.scope.ruby
push:
- match: \>
scope: punctuation.section.scope.ruby
pop: true
- include: regex-sub
- include: nest-ltgt-r
nest-parens-r:
- match: \(
scope: punctuation.section.scope.ruby
push:
- match: \)
scope: punctuation.section.scope.ruby
pop: true
- include: regex-sub
- include: nest-parens-r
nest-brackets:
- match: '\['
scope: punctuation.section.scope.ruby
push:
- match: '\]'
scope: punctuation.section.scope.ruby
pop: true
- include: nest-brackets
nest-curly:
- match: '\{'
scope: punctuation.section.scope.ruby
push: [nest-curly-inner, maybe-block-parameters]
nest-curly-inner:
- match: '\}'
scope: punctuation.section.scope.ruby
pop: true
- include: nest-curly
nest-ltgt:
- match: \<
scope: punctuation.section.scope.ruby
push:
- match: \>
scope: punctuation.section.scope.ruby
pop: true
- include: nest-ltgt
nest-parens:
- match: \(
scope: punctuation.section.scope.ruby
push:
- match: \)
scope: punctuation.section.scope.ruby
pop: true
- include: nest-parens
string-placeholder:
# %[flags][width][.precision]type
#
# A format sequence consists of a percent sign, followed by optional
# flags, width, and precision indicators, then terminated with a field
# type character.
#
# Also this is used for time format in strftime.
- match: |-
(?x)%
([#0\- +\*]|(\d+\$))* # flags
(-?\d+)? # minimum field width
(\.(\d+)?)? # precision
[diouxXDOUeEfFgGaAcCsSpnvtTbByYhHmMzZ%] # conversion type
scope: constant.other.placeholder.ruby
escaped-char:
- match: '\\(?:[0-7]{1,3}|x[\da-fA-F]{1,2}|.)'
scope: constant.character.escape.ruby
interpolated-ruby:
- match: '#\{'
scope: punctuation.section.interpolation.begin.ruby
push:
- clear_scopes: 1
- meta_scope: meta.interpolation
- meta_content_scope: source.ruby.embedded
- match: '\}'
scope: punctuation.section.interpolation.end.ruby
pop: true
- include: nest-curly-expressions
- include: expressions
- match: '(#@)[[:alpha:]_]\w*'
scope: variable.other.readwrite.instance.ruby
captures:
1: punctuation.definition.variable.ruby
- match: '(#@@)[[:alpha:]_]\w*'
scope: variable.other.readwrite.class.ruby
captures:
1: punctuation.definition.variable.ruby
- match: '(#\$)[[:alpha:]_]\w*'
scope: variable.other.readwrite.global.ruby
captures:
1: punctuation.definition.variable.ruby
nest-curly-expressions:
- match: '\{'
scope: punctuation.section.scope.ruby
push: [nest-curly-expressions-inner, maybe-block-parameters]
nest-curly-expressions-inner:
- match: '\}'
scope: punctuation.section.scope.ruby
pop: true
- include: nest-curly-expressions
- include: expressions
nest-all:
- match: '\('
scope: punctuation.definition.group.begin.ruby
push:
- match: '\)'
scope: punctuation.definition.group.end.ruby
pop: true
- include: nest-all
- include: expressions
- match: '\{'
scope: punctuation.section.scope.ruby
push: [nest-all-inner, maybe-block-parameters]
- match: '\['
scope: punctuation.section.array.ruby
push:
- match: '\]'
scope: punctuation.section.array.ruby
pop: true
- include: nest-all
- include: expressions
nest-all-inner:
- match: '\}'
scope: punctuation.section.scope.ruby
pop: true
- include: nest-all
- include: expressions
nest-brackets-i:
- match: '\['
scope: punctuation.section.scope.ruby
push:
- match: '\]'
scope: punctuation.section.scope.ruby
pop: true
- include: interpolated-ruby
- include: escaped-char
- include: nest-brackets-i
nest-curly-i:
- match: '\{'
scope: punctuation.section.scope.ruby
push: [nest-curly-i-inner, maybe-block-parameters]
nest-curly-i-inner:
- match: '\}'
scope: punctuation.section.scope.ruby
pop: true
- include: interpolated-ruby
- include: escaped-char
- include: nest-curly-i
nest-ltgt-i:
- match: \<
scope: punctuation.section.scope.ruby
push:
- match: \>
scope: punctuation.section.scope.ruby
pop: true
- include: interpolated-ruby
- include: escaped-char
- include: nest-ltgt-i
nest-parens-i:
- match: \(
scope: punctuation.section.scope.ruby
push:
- match: \)
scope: punctuation.section.scope.ruby
pop: true
- include: interpolated-ruby
- include: escaped-char
- include: nest-parens-i
heredocs:
# heredoc with embedded HTML and indented terminator
- match: '(<<[-~]"?((?:[_\w]+_|)HTML)\b"?)'
scope: punctuation.definition.string.begin.ruby
push: [heredoc-html, trailing-heredoc-start]
# heredoc with embedded SQL and indented terminator
- match: '(<<[-~]"?((?:[_\w]+_|)SQL)\b"?)'
scope: punctuation.definition.string.begin.ruby
push: [heredoc-sql, trailing-heredoc-start]
# heredoc with embedded css and indented terminator
- match: '(<<[-~]"?((?:[_\w]+_|)CSS)\b"?)'
scope: punctuation.definition.string.begin.ruby
push: [heredoc-css, trailing-heredoc-start]
# heredoc with embedded javascript and indented terminator
- match: '(<<[-~]"?((?:[_\w]+_|)(?:JS|JAVASCRIPT))\b"?)'
scope: punctuation.definition.string.begin.ruby
push: [heredoc-js, trailing-heredoc-start]
# heredoc with embedded ruby and indented terminator
- match: '(<<[-~]"?((?:[_\w]+_|)RUBY)\b"?)'
scope: punctuation.definition.string.begin.ruby
push: [heredoc-ruby, trailing-heredoc-start]
# Escaped to prevent recursion?
# heredoc with embedded shell and indented terminator
# - match: '(<<[-~]("?)((?:[_\w]+_|)(?:SH|SHELL))\b\1)'
# scope: punctuation.definition.string.begin.ruby
# push: [heredoc-shell, trailing-heredoc-start]
- match: (\=)\s*(<<(\w+))
captures:
1: keyword.operator.assignment.ruby
2: punctuation.definition.string.begin.ruby
push: [heredoc-assign, trailing-heredoc-no-embedding-start]
# heredoc with indented terminator
- match: '(<<[-~](\w+))'
scope: punctuation.definition.string.begin.ruby
push: [heredoc-plain, trailing-heredoc-no-embedding-start]
heredoc-html:
- meta_scope: string.unquoted.embedded.html.ruby
- meta_content_scope: text.html.embedded.ruby
- match: ^\s*\2$
scope: punctuation.definition.string.end.ruby
pop: true
- include: scope:text.html.basic
- include: interpolated-ruby
- include: escaped-char
heredoc-sql:
- meta_scope: string.unquoted.embedded.sql.ruby
- meta_content_scope: text.sql.embedded.ruby
- match: ^\s*\2$
scope: punctuation.definition.string.end.ruby
pop: true
- include: scope:source.sql
- include: interpolated-ruby
- include: escaped-char
heredoc-css:
- meta_scope: string.unquoted.embedded.css.ruby
- meta_content_scope: text.css.embedded.ruby
- match: ^\s*\2$
scope: punctuation.definition.string.end.ruby
pop: true
- include: 'scope:source.css'
- include: interpolated-ruby
- include: escaped-char
heredoc-js:
- meta_scope: string.unquoted.embedded.js.ruby
- meta_content_scope: text.js.embedded.ruby
- match: ^\s*\2$
scope: punctuation.definition.string.end.ruby
pop: true
- include: 'scope:source.js'
- include: interpolated-ruby
- include: escaped-char
heredoc-ruby:
- meta_scope: string.unquoted.embedded.ruby.ruby
- meta_content_scope: text.ruby.embedded.ruby
- match: ^\s*\2$
scope: punctuation.definition.string.end.ruby
pop: true
- include: interpolated-ruby
- include: escaped-char
- include: expressions
#heredoc-shell:
# - meta_scope: string.unquoted.embedded.shell.ruby
# - meta_content_scope: text.shell.embedded.ruby
# - match: ^\s*\2$
# scope: punctuation.definition.string.end.ruby
# pop: true
# - include: Shell-Unix-Generic.sublime-syntax
# - include: interpolated-ruby
# - include: escaped-char
# This prevents clear_scopes from applying to the push token
trailing-heredoc-start:
- match: ''
set: trailing-heredoc
trailing-heredoc:
- clear_scopes: 2
- match: '$'
pop: true
- include: expressions
heredoc-assign:
- meta_scope: string.unquoted.heredoc.ruby
- match: ^\s*\3$
scope: punctuation.definition.string.end.ruby
pop: true
- include: interpolated-ruby
- include: escaped-char
heredoc-plain:
- meta_scope: string.unquoted.heredoc.ruby
- match: ^\s*\2$
scope: punctuation.definition.string.end.ruby
pop: true
- include: interpolated-ruby
- include: escaped-char
# This prevents clear_scopes from applying to the push token
trailing-heredoc-no-embedding-start:
- match: ''
set: trailing-heredoc-no-embedding
trailing-heredoc-no-embedding:
- clear_scopes: 1
- match: '$'
pop: true
- include: expressions
data-section:
- match: ^__END__\n
scope: string.unquoted.program-block.ruby
push:
- meta_content_scope: text.plain
- match: (?=<?xml|<(?i:html\b)|!DOCTYPE (?i:html\b))
push:
- meta_scope: text.html.embedded.ruby
- include: scope:text.html.basic
%YAML 1.2
---
name: SCSS
file_extensions: [scss]
scope: source.scss
variables:
interpolation_start: \#{(?=.*})
interpolation_end: \}
quoted_string: ("|')(?=.*\1)
property_name: (^|;|,|\{|\()\s*(?=-?[\w#]+[\w-$#{}]+:)
contexts:
main:
# push onto the map stack if the first character of a variable's value is '('
- match: (\$[\w-]+)(?=:\s*\()|(?<=(\s|,)\($)
captures:
1: variable.parameter.sass
push: map
# push onto the block comment stack
- match: /\*
push: block_comment
# push onto the line comment stack
- match: //
push: line_comment
# highlight included mixin name as function
- match: (@include)\s+([\w-]+)
captures:
1: keyword.control.at-rule.css.sass
2: support.function.sass
# highlight mixin and function definition
- match: (@mixin|@function)\s+([\w-]+)
captures:
1: keyword.control.at-rule.css.sass
2: entity.name.function.sass
# highlight at-rules
- match: '@[\w-]*(\s*if)?'
scope: keyword.control.at-rule.css.sass
# highlight type selector
- match: \b(a|abbr|address|area|article|aside|audio|b|base|bdi|bdo|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|content|data|datalist|dd|del|details|dfn|dialog|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hgroup|hr|html|i|iframe|img|input|ins|isindex|kbd|keygen|label|legend|li|link|main|map|mark|menu|menuitem|meta|meter|nav|noscript|object|ol|optgroup|option|output|p|param|picture|pre|progress|q|rp|rt|rtc|ruby|s|samp|script|section|select|slot|small|source|span|strong|style|sub|summary|sup|table|tbody|td|template|textarea|tfoot|th|thead|time|title|tr|track|u|ul|var|video|wbr|svg|circle|ellipse|line|path|polygon|polyline|rect|text|title)\b(?!-)
scope: entity.name.tag.css.sass
# hightlight attribution selector
- match: \[([\w-]+)(\^|\$|\*|~|\|)*(=)?([\w"'-]+)?\]
captures:
1: entity.other.attribute-name.css.sass
2: keyword.operator.attribute-selector.css.sass
# 3: # match =
4: string.quoted.css.sass
# push onto the id selector stack
- match: \#(?!{)
push: id_selector
# push onto the class selector stack
- match: \.(?!\d|\.)
push: class_selector
# highlight placeholder selector as class selector
- match: (?<!\d)%
push: class_selector
# highlight parent selector
- match: '(&)([\w-]*)'
captures:
1: keyword.other.parent-selector.sass
2: entity.other.attribute-name.class.css.sass
# highlight pseudo elements and pseudo classes
- match: :{1,2}[a-z-]+(?=\s|:|,|\(|\)|>|~|\+|\.|#|\{|$)
scope: entity.other.pseudo-class.css.sass
# push onto the property name stack
- match: '{{property_name}}'
push: property_name
# push onto the property value list stack
- match: ':'
push: value_list
# push onto the quoted string stack
- match: '{{quoted_string}}'
push: quoted_string
# push onto the interpolation stack
- match: '{{interpolation_start}}'
push: interpolation
# include patterns
- include: flag
- include: css_variable
- include: variable
- include: numeric
- include: unit
- include: function
- include: operator
- include: reserved_word
- include: property_value
# patterns
css_variable:
- match: --[\w-]*
scope: variable.parameter.sass
variable:
- match: \$[\w-]*|\.{3}
scope: variable.parameter.sass
css_function_has_quote:
- match: \b(url|format|attr)\((.+?)\)
captures:
1: support.constant.property-value.css.sass
2: string.quoted.css.sass
css_function:
- match: \b(annotation|blur|brightness|calc|character-variant|circle|contrast|cross-fade|cubic-bezier|drop-shadow|element|ellipse|fit-content|frames|grayscale|hue-rotate|image|image-set|inset|invert|leader|linear-gradient|local|matrix|matrix3d|minmax|opacity|ornaments|perspective|polygon|radial-gradient|rect|repeat|repeating-linear-gradient|repeating-radial-gradient|rotate|rotate3d|rotateX|rotateY|rotateZ|saturate|scale|scale3d|scaleX|scaleY|scaleZ|sepia|skew|skewX|skewY|steps|styleset|stylistic|swash|symbols|target-counter|target-counters|target-text|translate|translate3d|translateX|translateY|translateZ|var)+(?=\()
scope: support.constant.property-value.css.sass
function:
- match: '[\w-]+(?=\()'
scope: support.function.sass
property_value:
- match: '[\w-]*\w+\b(?!\s*:|-)'
scope: support.constant.property-value.css.sass
numeric:
- match: -?\d*\.?\d+|-(?=#{|\$|\()
scope: constant.numeric.css.sass
unit:
- match: (?<=\d|})(em|ex|ch|rem|vh|vw|vmin|vmax|px|mm|cm|in|pt|pc|deg|grad|rad|turn|Hz|kHz|dpi|dpcm|dppx|s|ms|n(\+|-)?|%)
scope: keyword.other.unit.css.sass
operator:
- match: \+|-|\*|/|%|=|!|<|>|~
scope: keyword.operator.css.sass
hex_color:
- match: '#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})\b'
scope: constant.other.color.rgb-value.css.sass
flag:
- match: '!(important|default|optional|global)'
scope: keyword.other.important.css.sass
reserved_word:
- match: \b(true|false|null|from|through|to|in|or|and|not|all|print|screen|speech|only)\b(?!-)
scope: keyword.other.reserved.sass
property_name:
- match: '{{interpolation_start}}'
push: interpolation
- match: '[\w-]'
scope: support.type.property-name.css.sass
- match: (?=:)
pop: true
# stacks
map:
- match: //
push: line_comment
- match: '{{quoted_string}}'
push: quoted_string
- match: '{{interpolation_start}}'
push: interpolation
- include: flag
- include: hex_color
- include: css_variable
- include: variable
- include: numeric
- include: unit
- include: css_function_has_quote
- include: css_function
- include: function
- include: operator
- include: reserved_word
- include: property_value
- match: ;|$
pop: true
value_list:
- match: //
push: line_comment
- match: '{{property_name}}'
push: property_name
- match: '{{quoted_string}}'
push: quoted_string
- match: '{{interpolation_start}}'
push: interpolation
- include: flag
- include: hex_color
- include: css_variable
- include: variable
- include: numeric
- include: unit
- include: css_function_has_quote
- include: css_function
- include: function
- include: operator
- include: reserved_word
- include: property_value
- match: ;|$
pop: true
block_comment:
- meta_scope: comment.block.css.sass
- match: '{{interpolation_start}}'
push: interpolation
- match: \*/
pop: true
line_comment:
- meta_scope: comment.line.sass
- match: '{{interpolation_start}}'
push: interpolation
- match: $
pop: true
id_selector:
- meta_scope: entity.other.attribute-name.id.css.sass
- match: '{{interpolation_start}}'
push: interpolation
- match: $|(?=\s|,|:|;|\.|\(|\)|\[|{|>|\+|~)
pop: true
class_selector:
- meta_scope: entity.other.attribute-name.class.css.sass
- match: '{{interpolation_start}}'
push: interpolation
- match: $|(?=\s|,|:|;|#|\(|\)|\[|{|>|\+|~)
pop: true
quoted_string:
- meta_scope: string.quoted.double.css.sass
- match: \\.
scope: constant.character.escape
- match: '{{interpolation_start}}'
push: interpolation
- match: \1
pop: true
interpolation:
- meta_scope: keyword.control.interpolation.sass
- match: '{{quoted_string}}'
push: quoted_string
- include: css_variable
- include: variable
- include: numeric
- include: unit
- include: function
- include: operator
- include: property_value
- match: '{{interpolation_end}}'
pop: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment