<commit_before>import * as React from 'react'
import * as CodeMirror from 'codemirror'

// Required for us to be able to customize the foreground color of selected text
import 'codemirror/addon/selection/mark-selection'

// Autocompletion plugin
import 'codemirror/addon/hint/show-hint'
import {
  Doc,
  EditorChangeLinkedList,
  Editor,
  EditorConfiguration,
  LineHandle,
} from 'codemirror'

if (__DARWIN__) {
  // This has to be required to support the `simple` scrollbar style.
  require('codemirror/addon/scroll/simplescrollbars')
}

interface ICodeMirrorHostProps {
  /**
   * An optional class name for the wrapper element around the
   * CodeMirror component
   */
  readonly className?: string

  /** The text contents for the editor */
  readonly value: string | Doc

  /** Any CodeMirror specific settings */
  readonly options?: EditorConfiguration

  /** Callback for diff to control whether selection is enabled */
  readonly isSelectionEnabled?: () => boolean

  /** Callback for when CodeMirror renders (or re-renders) a line */
  readonly onRenderLine?: (
    cm: Editor,
    line: LineHandle,
    elem: HTMLElement
  ) => void

  /** Callback for when CodeMirror has completed a batch of changes to the editor */<commit_msg>Bring in the search plugin<commit_after>import * as React from 'react'
import * as CodeMirror from 'codemirror'

// Required for us to be able to customize the foreground color of selected text
import 'codemirror/addon/selection/mark-selection'

// Autocompletion plugin
import 'codemirror/addon/hint/show-hint'
import {
  Doc,
  EditorChangeLinkedList,
  Editor,
  EditorConfiguration,
  LineHandle,
} from 'codemirror'

if (__DARWIN__) {
  // This has to be required to support the `simple` scrollbar style.
  require('codemirror/addon/scroll/simplescrollbars')
}

require('codemirror/addon/search/search')

interface ICodeMirrorHostProps {
  /**
   * An optional class name for the wrapper element around the
   * CodeMirror component
   */
  readonly className?: string

  /** The text contents for the editor */
  readonly value: string | Doc

  /** Any CodeMirror specific settings */
  readonly options?: EditorConfiguration

  /** Callback for diff to control whether selection is enabled */
  readonly isSelectionEnabled?: () => boolean

  /** Callback for when CodeMirror renders (or re-renders) a line */
  readonly onRenderLine?: (
    cm: Editor,
    line: LineHandle,
    elem: HTMLElement
  ) => void

  /** Callback for when CodeMirror has completed a batch of changes to the editor */
{'fraction_non_alphanumeric': 0.08837391987431265, 'fraction_numerical': 0.0, 'mean_word_length': 3.8606870229007635, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '6870489', 'n_tokens_mistral': 736, 'n_tokens_neox': 708, 'n_words': 263}