language-javascript-jsx icon indicating copy to clipboard operation
language-javascript-jsx copied to clipboard

How to exclude .js file from the plugin?

Open SidKwok opened this issue 9 years ago • 3 comments

SidKwok avatar Aug 05 '16 06:08 SidKwok

I found a solution. In your config.cson (Edit > Config...), you should have something like this:

"*":
  core:
    audioBeep: false
    customFileTypes:
      "source.jade": [
        "pug"
      ]
      "source.js.jsx": [
        "js"
      ]

the jade>pug one was added by me

So just remove the js in source.js.jsx so it becomes:

"*":
  core:
    audioBeep: false
    customFileTypes:
      "source.jade": [
        "pug"
      ]
      "source.jsx": [
        "js"
      ]

Then close the syntax highlighted file and open it again and it should be showing properly. It'd be much better to be able to check a checkbox that says "JSX" and another that says "JS" in the preferences because it took me a long time to find out that this file existed and how to use it.

franciscop avatar Jan 15 '17 20:01 franciscop

Small correction: you should rather remove jsx, so that the working config.cson fragment goes like this:

"*":
  core:
    customFileTypes:
      "source.js": [
        "js"
      ]

drastus avatar Mar 12 '18 15:03 drastus

Thanks @franciscop (myself! this is my corporate github) from the past, found this issue through Google after 30 min fighting Atom 😄

franciscop-invast avatar May 15 '18 06:05 franciscop-invast