Don't assign text grammar by default. Just use the null grammar.

This commit is contained in:
Corey Johnson & Nathan Sobo
2013-04-03 18:21:07 -06:00
parent 144984c726
commit 2973a81293
2 changed files with 5 additions and 10 deletions

View File

@@ -43,12 +43,10 @@ class TextMateGrammar
contents = fsUtils.read(path) if not contents? and fsUtils.isFile(path)
if syntax.grammarOverrideForPath(path) is @scopeName
Infinity
else if @matchesContents(contents)
3
else if @matchesPath(path)
else if @matchesContents(contents)
2
else if @isTextGrammar()
else if @matchesPath(path)
1
else
-1
@@ -78,9 +76,6 @@ class TextMateGrammar
pathSuffix = pathComponents[-fileTypeComponents.length..-1]
_.isEqual(pathSuffix, fileTypeComponents)
isTextGrammar: ->
@scopeName is 'text.plain'
tokenizeLine: (line, ruleStack=[@initialRule], firstLine=false) ->
originalRuleStack = ruleStack
ruleStack = new Array(ruleStack...) # clone ruleStack