zedapp / zed

Rethinking code editing.
http://zedapp.org
MIT License
2.22k stars 161 forks source link

How to make Zed recognise file extensions for language support? #554

Open tanc opened 9 years ago

tanc commented 9 years ago

As a new Zed user I'm still getting to grips with configuration but I can't seem to find anywhere to add file extension support for languages. I use Drupal a lot and it has .module files which are PHP files but Zed doesn't recognise them as such. I've found the Configuration:Mode:PHP which works for that file but not all files of that type. Is there a way of setting it so all .module files will open in the PHP language?

Asternitix commented 9 years ago

To get Zed to recognize the file extension, find where it checks the file extension in the code and add .module after PHP's file extension to have an association with those two extensions. Make sure .php comes first so that PHP is associated with .module instead of the other way around.