/* @flow */

const useLSP = atom.config.get('flow-ide.useLSP')

// possible improvement: check if flow really supports lsp

if (useLSP === true) {
  // eslint-disable-next-line global-require
  const { FlowLanguageClient } = require('./language-client')
  module.exports = new FlowLanguageClient()
} else {
  // eslint-disable-next-line global-require
  const { Flow } = require('./index')
  module.exports = new Flow()
}

@@ -57,16 +57,328 @@
 eLSP')%0A%0A
+// notify to restart if the value changes%0Aatom.config.onDidChange('flow-ide.useLSP', () =%3E %7B%0A  const buttons = %5B%7B%0A    text: 'Restart',%0A    onDidClick () %7B return atom.restartApplication() %7D,%0A  %7D%5D%0A  atom.notifications.addInfo('Changing this value requires a restart of atom.', %7B dismissable: true, buttons %7D)%0A%7D)%0A%0A
 // possi

Add notification to restart atom when switching to/from LSP