p-e-w/language-javascript-semantic

Enable as default for Javascript files?

iksose opened this issue · 5 comments

Is there a way to do this besides manually setting the grammar on each document

You have to play with getScore for that (https://github.com/p-e-w/language-javascript-semantic/blob/master/lib/javascript-semantic-grammar.coffee#L28). See https://github.com/atom/first-mate/blob/master/src/grammar.coffee#L178 for a Grammar that actually does scoring simply based on the file name. While there will of course be a conflicting grammar (the regular JavaScript grammar) you could add 1 to the score to give yours priority.

In a future release, this is what will happen by default.

Nice, works, learned something new. Thanks for the work and support.

Pull Request: #7

p-e-w commented

This is now implemented.