Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

Readme is very confusing #40

Open
callumlocke opened this issue Mar 18, 2016 · 10 comments
Open

Readme is very confusing #40

callumlocke opened this issue Mar 18, 2016 · 10 comments
Assignees
Labels

Comments

@callumlocke
Copy link

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

@execjosh
Copy link
Owner

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?

@execjosh
Copy link
Owner

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 😄

@execjosh execjosh self-assigned this Mar 19, 2016
@callumlocke
Copy link
Author

OK that does help clarify things, thank you! If I have time later I'll PR something to the readme

@execjosh
Copy link
Owner

@callumlocke You're very welcome! By the way, does #41 help?

@callumlocke
Copy link
Author

it does!

@execjosh
Copy link
Owner

Great! I'll go ahead and close this ticket then.

@ajbraus
Copy link

ajbraus commented Apr 13, 2019

+1 confusing readme, can't get it to work.

@execjosh
Copy link
Owner

@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.

@execjosh execjosh reopened this Apr 14, 2019
@ajbraus
Copy link

ajbraus commented Apr 16, 2019

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.

@rvogel
Copy link

rvogel commented Mar 10, 2021

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants