rmosolgo / language-graphql

GraphQL support for Atom text editor
MIT License
57 stars 13 forks source link

No syntax type found in the Atom search #12

Open c10b10 opened 7 years ago

c10b10 commented 7 years ago

Is there a way to specify for what file types I want this syntax to be active?

rmosolgo commented 7 years ago

I think it's built into the grammar here:

https://github.com/rmosolgo/language-graphql/blob/master/grammars/graphql.json#L6-L9

Does that help?

gandm commented 7 years ago

@c10b10 You could try this https://discuss.atom.io/t/how-do-i-make-atom-recognize-a-file-with-extension-x-as-language-y/26539 using source.graphql as the scope.

nicerr commented 7 years ago

@gandm can't get this (what is described in the link) to work:

customFileTypes:
  "source.graphql": [
    ".graphcool"
  ]

The only way I managed was to was to add the extension I want (graphcool) to~/.atom/packages/language-graphql/grammars/graphql.json to fileTypes like this:

 "fileTypes": [
    "graphqls",
    "graphql",
    "gql",
    "graphcool"
  ],
nicerr commented 7 years ago

Sorry... took the dot out and it works:

    customFileTypes:
      "source.graphql": [
        "graphcool"
      ]