Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
deathaxe committed Jul 2, 2022
2 parents aeb58da + 487abbc commit e7e4352
Show file tree
Hide file tree
Showing 27 changed files with 92 additions and 7 deletions.
4 changes: 4 additions & 0 deletions PACKAGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ This file contains a list of possible packages you may need to install to see th

- [MDX Syntax Highlighting](https://packagecontrol.io/packages/MDX%20Syntax%20Highlighting)

## Meson

- [Meson](https://packagecontrol.io/packages/Meson)

## Mint

- [Mint Lang](https://packagecontrol.io/packages/Mint%20Lang)
Expand Down
17 changes: 12 additions & 5 deletions build/icons.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import json
import os
import re

import subprocess

try:
import cairosvg
Expand Down Expand Up @@ -34,7 +34,7 @@ def replace_color(text, color, new_color):


def create_png(bytestring, write_to, size):
width, height, rows, info = png.Reader(
_, _, rows, info = png.Reader(
bytes=cairosvg.svg2png(
bytestring=bytestring, parent_height=size, parent_width=size
)
Expand All @@ -49,11 +49,11 @@ def create_icons(icons):

for icon_name, icon_data in icons.items():
with open(icons_path("svg", icon_name + ".svg")) as fp:
svg_multi = fp.read()
svg_mono = replace_color(svg_multi, ".+?", "#fff")
color = colors.get(icon_data["color"])
svg_raw = fp.read()
svg_mono = replace_color(svg_raw, ".+?", "#fff")
if color:
svg_multi = replace_color(svg_raw, "#000", color)
svg_multi = replace_color(svg_multi, "#000", color)

for size in (1, 2, 3):
suffix = "@{}x.png".format(size) if size > 1 else ".png"
Expand All @@ -67,3 +67,10 @@ def create_icons(icons):
write_to=icons_path("single", icon_name + suffix),
size=size * 16,
)

# recreate icons overlay
# note: requires `subl` to be registered on $PATH
try:
subprocess.call(["subl", "--command", "afi_revert"])
except:
pass
46 changes: 45 additions & 1 deletion icons/icons.json
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,23 @@
}
]
},
"file_type_cppheader": {
"aliases": [
{
"base": "source.c++",
"extensions": [
"h",
"h++",
"hh",
"hpp",
"hxx"
],
"name": "C++ (Header)",
"scope": "source.c++.header"
}
],
"color": "sky"
},
"file_type_crystal": {
"color": "graphite",
"syntaxes": [
Expand Down Expand Up @@ -1405,6 +1422,19 @@
}
]
},
"file_type_meson": {
"color": "blue",
"syntaxes": [
{
"extensions": [
"meson.build",
"meson_options.txt"
],
"name": "Plain Text (Meson)",
"scope": "source.meson"
}
]
},
"file_type_mint": {
"color": "green",
"syntaxes": [
Expand Down Expand Up @@ -2068,11 +2098,24 @@
{
"base": "source.json",
"extensions": [
".htmlhintrc",
".jshintrc",
".jsbeautifyrc"
".jsbeautifyrc",
".prettierrc",
".releaserc"
],
"name": "JSON (Settings)",
"scope": "source.json.settings"
},
{
"extensions": [
".htmlhintignore",
".jshintignore",
".jsbeautifyignore",
".prettierignore"
],
"name": "Plain Text (Settings)",
"scope": "text.plain.settings"
}
],
"color": "graphite",
Expand Down Expand Up @@ -2722,6 +2765,7 @@
"aliases": [
{
"extensions": [
".coverage",
"idl",
"sln"
],
Expand Down
Binary file added icons/multi/file_type_cppheader.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/multi/file_type_cppheader@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/multi/file_type_cppheader@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/multi/file_type_meson.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/multi/file_type_meson@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/multi/file_type_meson@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/single/file_type_cppheader.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/single/file_type_cppheader@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/single/file_type_cppheader@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/single/file_type_meson.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/single/file_type_meson@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/single/file_type_meson@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions icons/svg/file_type_cppheader.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions icons/svg/file_type_meson.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions preferences/file_type_cppheader.tmPreferences
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>scope</key>
<string>source.c++.header</string>
<key>settings</key>
<dict>
<key>icon</key>
<string>file_type_cppheader</string>
</dict>
</dict>
</plist>
12 changes: 12 additions & 0 deletions preferences/file_type_meson.tmPreferences
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>scope</key>
<string>source.meson</string>
<key>settings</key>
<dict>
<key>icon</key>
<string>file_type_meson</string>
</dict>
</dict>
</plist>
2 changes: 1 addition & 1 deletion preferences/file_type_settings.tmPreferences
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<plist version="1.0">
<dict>
<key>scope</key>
<string>source.env, source.ini, source.json.settings</string>
<string>source.env, source.ini, source.json.settings, text.plain.settings</string>
<key>settings</key>
<dict>
<key>icon</key>
Expand Down
Empty file added tests/.htmlhintignore
Empty file.
Empty file added tests/.htmlhintrc
Empty file.
Empty file added tests/.jshintignore
Empty file.
Empty file added tests/.prettierignore
Empty file.
Empty file added tests/.prettierrc
Empty file.
Empty file added tests/.releaserc
Empty file.
Empty file.

0 comments on commit e7e4352

Please sign in to comment.