Is it possible to have themes run based on the type of document?
For example, I'd like to have one theme for .js, .html, another for .md files.
This is no longer the correct answer, please see the other answer for a package that allows you to do what the question asked. I tried to delete this answer, but can‘t do it, since it‘s the accepted answer at the moment.
No, this is currently not possible.
Atom uses two themes: The UI Theme determines the overall layout of the editor, including tabs, the tree view and and all other visible areas - is this really what you want?
The Syntax Theme determines the colors used for displaying text and highlighting based on the syntax. There's currently no automatic way for switching the syntax theme based on the selected file's language.
Having said that, you could probably write a package to do that. Please be aware that switching between themes takes a couple of moments, I don't know how practical it would be to switch the whole theme based on the file type.
There's a couple of packages that switch between themes or to a random theme every couple of minutes or based on a keypress, you could probably use one of these as an example if you want to build your own:
Have you tried multi-theme-applicator? It seems to work well for me! As long as you have atom > 1.13 it should work. Here are the links to the atom.io documentation for this package, as well as the github page.
https://atom.io/packages/multi-theme-applicator
https://github.com/vt5491/multi-theme-applicator
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With