     startByDoubleClick:
       default: false
       description: """
-      [Experimental]: start by dounble click.
-      You can toggle this value by command `narrow:toggle-search-start-by-double-click`
-      """
+        [Experimental]: start by dounble click.
+        You can toggle this value by command `narrow:toggle-search-start-by-double-click`
+        """
   )
   AtomScan: newProviderConfig(
     caseSensitivityForSearchTerm:

      content.push "- `#{param}`"
    atom.notifications.addWarning content.join("\n"), dismissable: true

newProviderConfig = (otherProperties) ->
  properties =
    directionToOpen:
      default: 'inherit'
      enum: [
        'inherit'
        'right'
        'right:never-use-previous-adjacent-pane'
        'right:always-new-pane'
        'down'
        'down:never-use-previous-adjacent-pane'
        'down:always-new-pane'
      ]
    caseSensitivityForNarrowQuery:
      default: 'inherit'
      enum: ['inherit', 'smartcase', 'sensitive', 'insensitive']
    activateOnStart:
      default: 'always'
      enum: ['inherit', 'never', 'always', 'on-input']
    negateNarrowQueryByEndingExclamation: false
    autoPreview: true
    autoPreviewOnQueryChange: true
    closeOnConfirm: true
    revealOnStartCondition:
      default: 'always'
      enum: ['inherit', 'never', 'always', 'on-input']

  _.deepExtend(properties, otherProperties) if otherProperties?

  return {
    type: 'object'
    properties: complimentField(properties, true)
  }

module.exports = new Settings 'narrow',
  autoShiftReadOnlyOnMoveToItemArea:
    default: true
    description: "When cursor moved to item area automatically change to read-only mode"

  directionToOpen:
    default: 'right'
    enum: [

      'down:always-new-pane'
    ]
    description: "Where to open narrow-editor when open by split pane."
  caseSensitivityForNarrowQuery:
    default: 'smartcase'
    enum: ['smartcase', 'sensitive', 'insensitive']
    description: "Case sensitivity of your query in narrow-editor"
  activateOnStart:
    default: 'always'
    enum: ['never', 'always', 'on-input']
  confirmOnUpdateRealFile: true

inheritGlobalEnum = (name) ->
  default: 'inherit'
  enum: ['inherit', globalSettings[name].enum...]

# inhe
newProviderConfig = (otherProperties) ->
  properties =
    directionToOpen: inheritGlobalEnum('directionToOpen')
    caseSensitivityForNarrowQuery: inheritGlobalEnum('caseSensitivityForNarrowQuery')
    activateOnStart: inheritGlobalEnum('activateOnStart')
    revealOnStartCondition:
      default: 'always'
      enum: ['always', 'never', 'on-input']
    negateNarrowQueryByEndingExclamation: false
    autoPreview: true
    autoPreviewOnQueryChange: true
    closeOnConfirm: true

  _.deepExtend(properties, complimentField(otherProperties)) if otherProperties?

  return {
    type: 'object'
    collapsed: true
    properties: complimentField(properties, true)
  }

providerSettings =
  Scan: newProviderConfig(
    revealOnStartCondition: 'on-input'
    searchWholeWord:
      default: false
      description: """
        This provider is exceptional since it use first query as scan term.<br>
        You can toggle value per narrow-editor via `narrow-ui:toggle-search-whole-word`( `alt-cmd-w` )<br>
        """
    caseSensitivityForSearchTerm:
      default: 'smartcase'
      enum: ['smartcase', 'sensitive', 'insensitive']
      description: "Search term is first word of query, is used as search term"
  )
  Search: newProviderConfig(
    caseSensitivityForSearchTerm:
