<commit_before>;;; ui.el --- UI

;; Default font
(set-frame-font (font-spec :family "Source Code Pro Medium"))
(face-attr 'default :height 110)

(setq use-dialog-box nil)
(setq inhibit-startup-message t
      inihibit-startup-echo-area-message t)

;; Highlight parenthesis
(show-paren-mode 1)

;; Resize fringe
(fringe-mode '(4 . 4))

;; Line numbers
(add-hook 'prog-mode-hook 'display-line-numbers-mode)
(add-hook 'text-mode-hook 'display-line-numbers-mode)
(setq-default display-line-numbers-width-start t)

;; Highlight current line
(global-hl-line-mode +1)

;; Wrap column
(setq-default fill-column 80)

;; Whitespace stuff
(require 'whitespace)
(setq whitespace-line-column 80)
(setq whitespace-style '(
                         face
                         space-mark
                         tab-mark lines-tail
                         trailing
                         tabs
                         spaces))
(add-hook 'prog-mode-hook 'whitespace-mode)

;; Scrolling
(setq-default scroll-step 1)
(setq-default scroll-margin 0)
(setq-default scroll-conservatively 101)
(setq-default hscroll-margin 0)
(setq-default hscroll-step 1)

;; ediff settings
(winner-mode t)
(add-hook 'ediff-quit-hook #'winner-undo)
(add-hook 'ediff-prepare-buffer-hook #'show-all)
(setq-default ediff-split-window-function 'split-window-horizontally)
(setq-default ediff-merge-split-window-function 'split-window-horizontally)
(setq-default ediff-window-setup-function 'ediff-setup-windows-plain)

;; Always use "y or n"
(defalias 'yes-or-no-p 'y-or-n-p)

;; Tab stuff
(setq-default tab-width 4)
(setq-default indent-tabs-mode nil)
(defvaralias 'c-basic-offset 'tab-width)
(defvaralias 'cperl-indent-level 'tab-width)

;; Don't wrap lines
(add-hook 'prog-mode-hook 'toggle-truncate-lines)

(setq-default require-final-newline t)

;; Configure file backups
(setq backup-directory-alist '((".*" . "~/.emacs.d/.backups")))
(setq auto-save-file-name-transforms '((".*" "~/.emacs.d/.backups" t)))
(setq backup-by-copying t)
(setq delete-old-versions t)
(setq kept-new-versions 6)
(setq kept-old-versions 2)
(setq version-control t)

;; #Don't #create #lock #files
;; TODO: Doesn't work
(setq create-lockfiles nil)

;; Auto insert closing parenthesis, braces, etc
(electric-pair-mode 1)

;; Folding
(add-hook 'prog-mode-hook 'hs-minor-mode)

(defun doom-transparentize (color alpha)
  "Transparentize a COLOR (a hexidecimal string) by a coefficient
ALPHA (a float between 0 and 1)."
  (doom-blend (doom-color color) (doom-color 'bg) (- 1 alpha)))

;; Doom themes
(use-package doom-themes
  :straight t
  :init
  (setq doom-themes-enable-bold t)
  (setq doom-themes-enable-italic nil)
  :config
  (load-theme 'doom-solarized-light t)
  (face-attr 'fringe :background (doom-color 'bg))
  (face-attr 'whitespace-tab :background "inherit")
  (face-attr 'font-lock-comment-face :foreground (doom-lighten 'fg 0.15))
  (face-attr 'font-lock-doc-face :foreground (doom-lighten 'fg 0.15))<commit_msg>Make comments a little lighter<commit_after>;;; ui.el --- UI

;; Default font
(set-frame-font (font-spec :family "Source Code Pro Medium"))
(face-attr 'default :height 110)

(setq use-dialog-box nil)
(setq inhibit-startup-message t
      inihibit-startup-echo-area-message t)

;; Highlight parenthesis
(show-paren-mode 1)

;; Resize fringe
(fringe-mode '(4 . 4))

;; Line numbers
(add-hook 'prog-mode-hook 'display-line-numbers-mode)
(add-hook 'text-mode-hook 'display-line-numbers-mode)
(setq-default display-line-numbers-width-start t)

;; Highlight current line
(global-hl-line-mode +1)

;; Wrap column
(setq-default fill-column 80)

;; Whitespace stuff
(require 'whitespace)
(setq whitespace-line-column 80)
(setq whitespace-style '(
                         face
                         space-mark
                         tab-mark lines-tail
                         trailing
                         tabs
                         spaces))
(add-hook 'prog-mode-hook 'whitespace-mode)

;; Scrolling
(setq-default scroll-step 1)
(setq-default scroll-margin 0)
(setq-default scroll-conservatively 101)
(setq-default hscroll-margin 0)
(setq-default hscroll-step 1)

;; ediff settings
(winner-mode t)
(add-hook 'ediff-quit-hook #'winner-undo)
(add-hook 'ediff-prepare-buffer-hook #'show-all)
(setq-default ediff-split-window-function 'split-window-horizontally)
(setq-default ediff-merge-split-window-function 'split-window-horizontally)
(setq-default ediff-window-setup-function 'ediff-setup-windows-plain)

;; Always use "y or n"
(defalias 'yes-or-no-p 'y-or-n-p)

;; Tab stuff
(setq-default tab-width 4)
(setq-default indent-tabs-mode nil)
(defvaralias 'c-basic-offset 'tab-width)
(defvaralias 'cperl-indent-level 'tab-width)

;; Don't wrap lines
(add-hook 'prog-mode-hook 'toggle-truncate-lines)

(setq-default require-final-newline t)

;; Configure file backups
(setq backup-directory-alist '((".*" . "~/.emacs.d/.backups")))
(setq auto-save-file-name-transforms '((".*" "~/.emacs.d/.backups" t)))
(setq backup-by-copying t)
(setq delete-old-versions t)
(setq kept-new-versions 6)
(setq kept-old-versions 2)
(setq version-control t)

;; #Don't #create #lock #files
;; TODO: Doesn't work
(setq create-lockfiles nil)

;; Auto insert closing parenthesis, braces, etc
(electric-pair-mode 1)

;; Folding
(add-hook 'prog-mode-hook 'hs-minor-mode)

(defun doom-transparentize (color alpha)
  "Transparentize a COLOR (a hexidecimal string) by a coefficient
ALPHA (a float between 0 and 1)."
  (doom-blend (doom-color color) (doom-color 'bg) (- 1 alpha)))

;; Doom themes
(use-package doom-themes
  :straight t
  :init
  (setq doom-themes-enable-bold t)
  (setq doom-themes-enable-italic nil)
  :config
  (load-theme 'doom-solarized-light t)
  (face-attr 'fringe :background (doom-color 'bg))
  (face-attr 'whitespace-tab :background "inherit")
  (face-attr 'font-lock-comment-face :foreground (doom-lighten 'fg 0.25))
  (face-attr 'font-lock-doc-face :foreground (doom-lighten 'fg 0.25))
{'fraction_non_alphanumeric': 0.1494542401343409, 'fraction_numerical': 0.010411418975650713, 'mean_word_length': 3.4883195177091184, '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': '6670523', 'n_tokens_mistral': 2251, 'n_tokens_neox': 2120, 'n_words': 505}