     @subscriptions.add atom.commands.add 'atom-workspace', 'git-plus:merge-remote', -> git.getRepo().then((repo) -> GitMerge(repo, remote: true))
     @subscriptions.add atom.commands.add 'atom-workspace', 'git-plus:rebase', -> git.getRepo().then((repo) -> GitRebase(repo))
     @subscriptions.add atom.commands.add 'atom-workspace', 'git-plus:git-open-changed-files', -> git.getRepo().then((repo) -> GitOpenChangedFiles(repo))
+    @subscriptions.add atom.config.observe 'git-plus.syntaxHighlighting',
+      (value) ->
+        atom.grammars.removeGrammarForScopeName('diff')
+        if value
+          atom.grammars.addGrammar(diffGrammar)
+        else
+          atom.grammars.loadGrammarSync(baseGrammar)
 
   deactivate: ->
     @subscriptions.dispose()

  subscriptions: null

  activate: (state) ->
    @subscriptions = new CompositeDisposable
    repos = atom.project.getRepositories().filter (r) -> r?
    if repos.length is 0

GitOpenChangedFiles    = require './models/git-open-changed-files'
diffGrammar            = require './grammars/diff.js'

baseGrammar = __dirname + '/grammars/diff.json'

currentFile = (repo) ->
  repo.relativize(atom.workspace.getActiveTextEditor()?.getPath())
