SublimeText/AFileIcon

Use image icon for WebP images

jwortmann opened this issue · 0 comments

Unlike for jpg, png or gif images, ST3 can't display the WebP image format and only shows binary data when a .webp file is opened. Nevertheless I would prefer to have the image icon shown for WebP files. I was able to do so with the following two files in my User package:

Webp.tmPreferences

<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
  <dict>
    <key>scope</key>
    <string>text.plain.webp</string>
    <key>settings</key>
    <dict>
      <key>icon</key>
      <string>file_type_image</string>
    </dict>
  </dict>
</plist>

Plain Text (Webp).sublime-syntax

%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: Plain Text (Webp)
hidden: true
file_extensions: ['webp']
scope: text.plain.webp
contexts:
  main:
    - include: scope:text.plain#prototype
    - include: scope:text.plain

Unbenannt

I'm not sure if this is the simplest and preferred way. Can we include it in this package per default?