awatson1978 / meteor-api

Meteor API with tab completion and syntax highlighting.
MIT License
80 stars 17 forks source link

Overriding default file grammars automatically #80

Open jacobmischka opened 8 years ago

jacobmischka commented 8 years ago

Currently, when I install meteor-api it overrides the default grammars for .js and .cson and other general filetypes. This is not correct behavior as mentioned in the docs, I did not manually disable the language-javascript package.

I'd much rather have to manually select the Meteor syntax when working in meteor than deselect it when I'm not.

LeNiglo commented 7 years ago

Months later, it's still the case. Any chance we get an update on this ?

awatson1978 commented 7 years ago

Hi there. The Atom Package Manager account is borked. I've logged requests for someone to reset it, but it may be easier to create a new package. Not much I can do about it.

jacobmischka commented 7 years ago

I ended up just uninstalling this package, but I have since run into this problem with some other packages.

For the other packages, I ended up working around the issue using the core.customFileTypes setting in config.cson

Unfortunately, meteor-api doesn't set a custom scope (source.js.meteor, for example), and instead uses the standard source.js. Because of this I'm not sure if you'll be able to override it.

This would work if the scope were set correctly, but you can try it anyway:

customFileTypes:
  "source.js": [
    "js"
]
hayk94 commented 7 years ago

Any fixes or workarounds yet?

jacobmischka commented 7 years ago

You can fork this package, fix the scope like I mentioned then use the workaround I mentioned, and then install it with am via git.