SublimeText/AFileIcon

webpack icons only showing with config

Opened this issue · 5 comments

Webpack icons only showing if the file name has the word config example :
webpack.config.js < this will work fine and the icon will show

if the file name is webpack.dev.js for example it's just showing a normal js icon

  • when i try to edit the settings for A fil icons and save i got this error

Error loading syntax file "Packages/zzz A File Icon zzz/aliases/JSON (Sublime).sublime-syntax": Unable to read Packages/zzz A File Icon zzz/aliases/JSON (Sublime).sublime-syntax

The error message is most likely displayed if for some reason the alias syntax does not exist while there is a corresponding file in ST's cache directory. This may happen due to race conditions if the Revert command is exectued and a file associated with an alias is open at that time.

You should be able to fix that issue by either call the Revert function or by disabling and reenabling the "alias" setting. Both recreate the cache and the alias syntaxes.

The syntax is assigned to file extensions which are literal strings. So any type of webpack needs to be listed explicitly in the sublime-syntax or the syntax specific setting. Something like webpack.*.js is not possible.

We could propably extend the list of supported file extensions, if someone would provide a list of missing ones.

Reverting and disabling does not fix the issue, i reinstalled everything including a new mac os still same error

Does the mensioned sublime-syntax file exist?

Its content should look like:

%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: JSON (Sublime)
hidden: true
file_extensions: ['.no-sublime-package', 'hidden-color-scheme', 'hidden-theme', 'sublime-color-scheme', 'sublime-commands', 'sublime-menu', 'sublime-project', 'sublime-settings', 'sublime-theme', 'sublime-workspace', 'sublime-keymap', 'sublime-mousemap']
scope: source.json.sublime
contexts:
  main:
    - include: scope:source.json#prototype
    - include: scope:source.json

You could also try to manually delete the Cache/zzz A File Icons zzz folder. It should be removed by reverting A File Icons, but maybe something locked the files?

If the issue still persists then, I'd guess your session file could contain something weird. Even though I can't really find a logical explanantion in case the syntax file exists.

I removed the packages A File Icon, and zzz A File Icon zzz, then reinstalled A File Icon (which will automatically generate/install zzz A File Icon zzz). I watched the Packages directory and could see the zzz A File Icon zzz directory being built with aliases/ and patches/.

HTH!

The .webpack.dev.js extension was added.
The other issue is not reproducible.