<commit_before>(my/install-package 'yasnippet)

(use-package yasnippet
    :diminish (yas-minor-mode . " $")
    :mode (("emacs.+/snippets/" . snippet-mode))
    :pre-load (progn
        ;; Fix yasnippet keymaps so they only work in insert mode (why they
        ;; had to make this so complicated I don't know); must be defined
        ;; BEFORE we include yasnippet.
        (defvar yas-minor-mode-map
          (let ((map (make-sparse-keymap)))
            (evil-define-key 'insert map [(tab)]     'yas-expand)
            (evil-define-key 'insert map (kbd "TAB") 'yas-expand)
            (evil-define-key 'insert map "\C-c&\C-s" 'yas-insert-snippet)
            (evil-define-key 'insert map "\C-c&\C-n" 'yas-new-snippet)
            (evil-define-key 'insert map "\C-c&\C-v" 'yas-visit-snippet-file)
            map)))
    :config
    (progn
      ;; Only load personal snippets
      (setq yas-snippet-dirs `(,my/snippets-dir))

      (yas-reload-all))
    :init
    (progn
      (add-hook 'prog-mode-hook 'yas-minor-mode)
      (add-hook 'org-mode-hook 'yas-minor-mode)))

;;
(provide 'init-snippets)<commit_msg>Enable yas-minor-mode in snippet-mode<commit_after>(my/install-package 'yasnippet)

(use-package yasnippet
    :diminish (yas-minor-mode . " $")
    :mode (("emacs.+/snippets/" . snippet-mode))
    :pre-load (progn
        ;; Fix yasnippet keymaps so they only work in insert mode (why they
        ;; had to make this so complicated I don't know); must be defined
        ;; BEFORE we include yasnippet.
        (defvar yas-minor-mode-map
          (let ((map (make-sparse-keymap)))
            (evil-define-key 'insert map [(tab)]     'yas-expand)
            (evil-define-key 'insert map (kbd "TAB") 'yas-expand)
            (evil-define-key 'insert map "\C-c&\C-s" 'yas-insert-snippet)
            (evil-define-key 'insert map "\C-c&\C-n" 'yas-new-snippet)
            (evil-define-key 'insert map "\C-c&\C-v" 'yas-visit-snippet-file)
            map)))
    :config
    (progn
      ;; Only load personal snippets
      (setq yas-snippet-dirs `(,my/snippets-dir))

      (yas-reload-all))
    :init
    (progn
      (add-hook 'prog-mode-hook 'yas-minor-mode)
      (add-hook 'snippet-mode-hook 'yas-minor-mode)
      (add-hook 'org-mode-hook 'yas-minor-mode)))

;;
(provide 'init-snippets)
{'fraction_non_alphanumeric': 0.15844155844155844, 'fraction_numerical': 0.0, 'mean_word_length': 2.2595204513399154, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4972061', 'n_tokens_mistral': 885, 'n_tokens_neox': 830, 'n_words': 187}