<commit_before>packages = require './packages'
pathfinder = require './path'

module.exports =
  config:
    disable:
      type: 'boolean'
      default: false
      description: "Don't run installation when Atom boots. (This option is set automatically once the installation is complete.)"

  activate: ->
    return if atom.config.get 'uber-juno.disable'
    @configSetup()
    packages.setup ->
      atom.config.set 'uber-juno.disable', true

  defaultConfig:
    'tool-bar.position': 'Left'
    'julia-client.enableMenu': true
    'julia-client.enableToolBar': true
    'editor.scrollPastEnd': true
    'autocomplete-plus.confirmCompletion': "tab always, enter when suggestion explicitly selected"

  configSetup: ->
    for k, v of @defaultConfig
      atom.config.set k, v
    @setupPath()

  setupPath: ->
    current = atom.config.get 'julia-client.juliaPath'
    return if current? and current isnt 'julia'
    pathfinder.juliaShell().then (valid) ->
      if not valid
        pathfinder.getpath().then (p) ->
          if p?
            atom.config.set 'julia-client.juliaPath', p
            atom.notifications.addInfo "We found Julia on your system",
              detail: """
                Juno is configured to boot Julia from:
                  #{p}
                This path can be changed from Julia → Settings.
                """
<commit_msg>update for new settings structure in julia-client<commit_after>packages = require './packages'
pathfinder = require './path'

module.exports =
  config:
    disable:
      type: 'boolean'
      default: false
      description: "Don't run installation when Atom boots. (This option is set automatically once the installation is complete.)"

  activate: ->
    return if atom.config.get 'uber-juno.disable'
    @configSetup()
    packages.setup ->
      atom.config.set 'uber-juno.disable', true

  defaultConfig:
    'tool-bar.position': 'Left'
    'julia-client.uiOptions.enableMenu': true
    'julia-client.uiOptions.enableToolBar': true
    'editor.scrollPastEnd': true
    'autocomplete-plus.confirmCompletion': "tab always, enter when suggestion explicitly selected"

  configSetup: ->
    for k, v of @defaultConfig
      atom.config.set k, v
    @setupPath()

  setupPath: ->
    current = atom.config.get 'julia-client.juliaPath'
    return if current? and current isnt 'julia'
    pathfinder.juliaShell().then (valid) ->
      if not valid
        pathfinder.getpath().then (p) ->
          if p?
            atom.config.set 'julia-client.juliaPath', p
            atom.notifications.addInfo "We found Julia on your system",
              detail: """
                Juno is configured to boot Julia from:
                  #{p}
                This path can be changed from Julia → Settings.
                """

{'fraction_non_alphanumeric': 0.10652797704447632, 'fraction_numerical': 0.0, 'mean_word_length': 2.4095354523227384, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1417153', 'n_tokens_mistral': 810, 'n_tokens_neox': 789, 'n_words': 236}