       type: 'string'
       default: 'ghc-modi'
       description: 'Path to ghc-modi'
-    suppressStartupWarning:
-      type: 'boolean'
-      default: false
     debug:
       type: 'boolean'
       default: false

                    Separate with comma.'
      items:
        type: 'string'
    useLinter:
      type: 'boolean'
      default: false
      description: 'Use Atom Linter service for check and lint
                    (requires restart)'

  activate: (state) ->
    @process = new GhcModiProcess

    unless atom.config.get('haskell-ghc-mod.suppressStartupWarning')
      setTimeout (->
        unless atom.packages.isPackageActive('ide-haskell')
          atom.notifications.addWarning "Haskell-ghc-mod package is intended to
          be used as a backend for ide-haskell, please consider installing
          or activating it.
          You can suppress this warning in haskell-ghc-mod settings.",
          dismissable:true
        ), 5000

  deactivate: ->
    @process?.destroy()

    new CompletionBackend @process

  provideLinter: ->
    if atom.packages.getLoadedPackage('ide-haskell')
      return unless atom.config.get 'ide-haskell.useLinter'
    backend = new IdeBackend @process
    [
      func: 'checkBuffer'
      lintOnFly: false
      scopes: ['source.haskell', 'text.tex.latex.haskell']
    ,
      func: 'lintBuffer'
      lintOnFly: true
      scopes: ['source.haskell']
    ].map ({func, scopes, lintOnFly}) ->
      grammarScopes: scopes
      scope: 'file'
      lintOnFly: lintOnFly
      lint: (textEditor) ->
        return new Promise (resolve, reject) ->
          backend[func] textEditor.getBuffer(), (res) ->
            resolve res.map ({uri, position, message, severity}) ->
              [message, messages...] = message.split /^(?!\s)/gm
              {
