Enable as default for Javascript files?
iksose opened this issue · 5 comments
iksose commented
Is there a way to do this besides manually setting the grammar on each document
p-e-w commented
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.
p-e-w commented
In a future release, this is what will happen by default.
iksose commented
Nice, works, learned something new. Thanks for the work and support.
darrenscerri commented
Pull Request: #7
p-e-w commented
This is now implemented.