<commit_before>;; Add hooks to the major-mode this is called from.
;; Should be just major-modes for programming.

;; Ad this hook for all programming languages.
(defun my-programming-hooks ()
  (linum-mode 1)
  (setq-default indent-tabs-mode nil) ;; Spaces, not tabs!
  (setq tab-width (default-value 'tab-width))
  (when (derived-mode-p 'java)
    (ggtags-mode 1))
  (use-package column-marker
    :ensure t
    :config
    (column-marker-1 80))
  (use-package column-enforce-mode
    :ensure t
    :config
    (column-enforce-mode 1))
  (use-package aggressive-indent
    :ensure t
    :init
    (global-aggressive-indent-mode 1))
  (use-package origami
    :ensure t
    :bind (("C-<tab>" . origami-recursively-toggle-node)
           ("C-<iso-lefttab>" . origami-toggle-all-nodes))
    :init
    (global-origami-mode 1)))

;; Key for jumping from begining to end parens and brackets.
;; <backtab> is Shift-tab
(global-set-key (kbd "<backtab>") 'match-paren)

(defun my/create-newline-format (&rest _ignored)
  ;; Usage: (sp-local-pair '(c-mode)
  ;;                       "{" nil :post-handlers
  ;;                       '((my/create-newline-format "RET")))
  (interactive)<commit_msg>column-marker package no longer available.<commit_after>;; Add hooks to the major-mode this is called from.
;; Should be just major-modes for programming.

;; Ad this hook for all programming languages.
(defun my-programming-hooks ()
  (linum-mode 1)
  (setq-default indent-tabs-mode nil) ;; Spaces, not tabs!
  (setq tab-width (default-value 'tab-width))
  (when (derived-mode-p 'java)
    (ggtags-mode 1))
  (use-package column-enforce-mode
    :ensure t
    :config
    (column-enforce-mode 1))
  (use-package aggressive-indent
    :ensure t
    :init
    (global-aggressive-indent-mode 1))
  (use-package origami
    :ensure t
    :bind (("C-<tab>" . origami-recursively-toggle-node)
           ("C-<iso-lefttab>" . origami-toggle-all-nodes))
    :init
    (global-origami-mode 1)))

;; Key for jumping from begining to end parens and brackets.
;; <backtab> is Shift-tab
(global-set-key (kbd "<backtab>") 'match-paren)

(defun my/create-newline-format (&rest _ignored)
  ;; Usage: (sp-local-pair '(c-mode)
  ;;                       "{" nil :post-handlers
  ;;                       '((my/create-newline-format "RET")))
  (interactive)
{'fraction_non_alphanumeric': 0.14763948497854076, 'fraction_numerical': 0.005579399141630901, 'mean_word_length': 2.8338815789473686, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '395989', 'n_tokens_mistral': 825, 'n_tokens_neox': 785, 'n_words': 204}