atom-file-types
atom-file-types copied to clipboard
Readme is very confusing
For example, you can associate .ex_em_el with text.xml in your config.cson as follows:
'file-types': 'ex_em_el': 'text.xml'
huh? does this associate an imaginary syntax called 'ex_em_el' with a single file called .xml? Or does it make the .ex_em_el extension open as if it's a file called text.xml? In which case what's the text. for? sorry if I'm being dumb, I just want to make atom interpret the extension .extra as a shell script
I appreciate your interest in this extension! I also apologize for any ambiguity in the README. Any help in making a more understandable README would be much appreciated! Pull requests are always welcome :)
You've just got the two switched: ex_em_el is the extension; text.xml is the syntax (scope name).
As to your particular dilemma...
Looking at the settings for language-shellscript, we can see that it provides the source.shell scope. Therefore, you should add "extra": "source.shell" to associate your .extra extension with the source.shell syntax.
Does this help?
In which case what's the
text.for?
I think I see the source of confusion! Atom's various syntax highlighting are handled by language packages, which register something called a "scope name", which is a unique identifier for a particular syntax highlight. For example, the package "language-xml" provides syntax highlighting for XML; a scope named "text.xml".
Unfortunately, these scope names resemble file names with extensions—which they absolutely are not.
I hope that helps :smile:
OK that does help clarify things, thank you! If I have time later I'll PR something to the readme
@callumlocke You're very welcome! By the way, does #41 help?
it does!
Great! I'll go ahead and close this ticket then.
+1 confusing readme, can't get it to work.
@ajbraus There is nothing actionable in what you have said. Give concrete examples or suggestions on how to improve, please. Just saying “It doesn’t work” does not help anyone at all.
I don't think I'm the best person to fix it because I can't make sense of it. Sorry. I think whoever knows how this library works should rewrite the README to be clearer.
I'm confused too. I'm not sure if I'm on the right path.
I want all .jsonc files to use the json format, not plain text.
Here's my try:
"file-types": "*.jsonc": "source.json"
Is it correct? Because it isn't working.