   @testName: (packageName) ->
     /(\.|_|-)tmbundle$/.test(packageName)
 
+  @getLoadQueue: ->
+    return @loadQueue if @loadQueue
+    @loadQueue = async.queue (pack, done) -> pack.loadGrammars(done)
+    @loadQueue.drain = -> syntax.trigger 'grammars-loaded'
+    @loadQueue
+
   constructor: ->
     super
     @preferencesPath = fsUtils.join(@path, "Preferences")

    if sync
      @loadGrammarsSync()
    else
      @loadGrammars()
    @loadScopedProperties()

  legalGrammarExtensions: ['plist', 'tmLanguage', 'tmlanguage', 'cson', 'json']

    TextMateGrammar.load path, (err, grammar) =>
      return console.log("Error loading grammar at path '#{path}':", err.stack ? err) if err
      @addGrammar(grammar)
      done()

  loadGrammarsSync: ->
    for path in fsUtils.list(@syntaxesPath, @legalGrammarExtensions) ? []
