<commit_before>'use babel';

import { CompositeDisposable } from 'atom';
import colorNamer from 'color-namer';

export default {

  selection: "",

  activate(state) {
    // Events subscribed to in atom's system can be easily cleaned up with a CompositeDisposable
    this.subscriptions = new CompositeDisposable();

    // Register command that toggles this view
    this.subscriptions.add(atom.commands.add('atom-workspace', {
      'name-that-color:name-selection': () => this.nameSelection()
    }));
    
    atom.workspace.observeTextEditors((editor) => {
      editor.observeSelections((selection) => {
        this.selection = selection;
      })
    })    
  },
  
  nameSelection() {<commit_msg>bind to active pane<commit_after>'use babel';

import { CompositeDisposable } from 'atom';
import colorNamer from 'color-namer';

export default {

  selection: "",

  activate(state) {
    // Events subscribed to in atom's system can be easily cleaned up with a CompositeDisposable
    this.subscriptions = new CompositeDisposable();

    // Register command that toggles this view
    this.subscriptions.add(atom.commands.add('atom-workspace', {
      'name-that-color:name-selection': () => this.nameSelection()
    }));
    
    atom.workspace.observeActivePaneItem((editor) => {
      editor.observeSelections((selection) => {
        this.selection = selection;
      })
    })
  },
  
  nameSelection() {
{'fraction_non_alphanumeric': 0.12561750176429076, 'fraction_numerical': 0.0, 'mean_word_length': 3.3496932515337425, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '317699', 'n_tokens_mistral': 422, 'n_tokens_neox': 408, 'n_words': 93}