[GH-ISSUE #80] Overriding default file grammars automatically #64

Open
opened 2026-05-05 15:00:55 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @jacobmischka on GitHub (Apr 5, 2016).
Original GitHub issue: https://github.com/awatson1978/meteor-api/issues/80

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.

Originally created by @jacobmischka on GitHub (Apr 5, 2016). Original GitHub issue: https://github.com/awatson1978/meteor-api/issues/80 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.
Author
Owner

@LeNiglo commented on GitHub (Dec 20, 2016):

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

<!-- gh-comment-id:268388887 --> @LeNiglo commented on GitHub (Dec 20, 2016): Months later, it's still the case. Any chance we get an update on this ?
Author
Owner

@awatson1978 commented on GitHub (Dec 20, 2016):

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.

<!-- gh-comment-id:268393843 --> @awatson1978 commented on GitHub (Dec 20, 2016): 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.
Author
Owner

@jacobmischka commented on GitHub (Dec 20, 2016):

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"
]
<!-- gh-comment-id:268394297 --> @jacobmischka commented on GitHub (Dec 20, 2016): 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`](http://flight-manual.atom.io/using-atom/sections/basic-customization/#_customizing_language_recognition) 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" ] ```
Author
Owner

@hayk94 commented on GitHub (Jan 27, 2017):

Any fixes or workarounds yet?

<!-- gh-comment-id:275667320 --> @hayk94 commented on GitHub (Jan 27, 2017): Any fixes or workarounds yet?
Author
Owner

@jacobmischka commented on GitHub (Jan 27, 2017):

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.

<!-- gh-comment-id:275671613 --> @jacobmischka commented on GitHub (Jan 27, 2017): 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.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/meteor-api#64
No description provided.