       done()
 
   loadGrammarsSync: ->
-    for path in fsUtils.list(@syntaxesPath, @legalGrammarExtensions)
+    for path in fsUtils.list(@getSyntaxesPath(), @legalGrammarExtensions)
       @addGrammar(TextMateGrammar.loadSync(path))
 
   addGrammar: (grammar) ->


  getGrammars: -> @grammars

  loadScopedPropertiesSync: ->
    for grammar in @getGrammars()
      if properties = @propertiesFromTextMateSettings(grammar)
        selector = syntax.cssSelectorFromScopeSelector(grammar.scopeName)
        @scopedProperties.push({selector, properties})

    for path in fsUtils.list(@preferencesPath)
      {scope, settings} = fsUtils.readObject(path)
      if properties = @propertiesFromTextMateSettings(settings)
        selector = syntax.cssSelectorFromScopeSelector(scope) if scope?

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

  loadGrammars: (done) ->
    fsUtils.isDirectoryAsync @getSyntaxesPath(), (isDirectory) =>
      return done() unless isDirectory

      fsUtils.listAsync @getSyntaxesPath(), @legalGrammarExtensions, (error, paths) =>
        if error?
          console.log("Error loading grammars of TextMate package '#{@path}':", error.stack, error)
          done()
