 GitOpenChangedFiles    = require './models/git-open-changed-files'
 diffGrammar            = require './grammars/diff.js'
 
-atom.grammars.addGrammar(diffGrammar);
+baseGrammar = __dirname + '/grammars/diff.json'
 
 currentFile = (repo) ->
   repo.relativize(atom.workspace.getActiveTextEditor()?.getPath())

      type: 'boolean'
      default: true
      description: 'Should word diffs be highlighted in diffs?'
    numberOfCommitsToShow:
      type: 'integer'
      default: 25

  subscriptions: null

  activate: (state) ->
    enableSyntaxHighlighting = atom.config.get('git-plus').syntaxHighlighting;
    if enableSyntaxHighlighting
      atom.grammars.addGrammar(diffGrammar)
    else
      atom.grammars.loadGrammarSync(baseGrammar);
    @subscriptions = new CompositeDisposable
    repos = atom.project.getRepositories().filter (r) -> r?
    if repos.length is 0
