Starting cleaning configuration.

This commit is contained in:
jgrogan 2024-05-31 08:59:32 +01:00
parent ccea64cca2
commit c67f889c79

View file

@ -5,10 +5,13 @@
(menu-bar-mode -1) (menu-bar-mode -1)
(tool-bar-mode -1) (tool-bar-mode -1)
(set-fringe-mode 10)
(scroll-bar-mode -1)
(setq auto-save-file-name-transforms (setq auto-save-file-name-transforms
`((".*" ,(concat user-emacs-directory "auto-save/") t))) `((".*" ,(concat user-emacs-directory "auto-save/") t)))
(setq backup-directory-alist '(("" . "~/.emacs.d/emacs-backup"))) (setq backup-directory-alist '(("" . "~/.emacs.d/emacs-backup")))
(setq vc-follow-symlinks t)
;; Slightly nicer theme ;; Slightly nicer theme
(set-face-attribute 'default nil :font "Menlo" :height 130) (set-face-attribute 'default nil :font "Menlo" :height 130)
@ -19,8 +22,9 @@
;; Set up package repos ;; Set up package repos
(require 'package) (require 'package)
(add-to-list 'package-archives (setq package-archives '(("melpa" . "https://melpa.org/packages/")
'("melpa-stable" . "https://stable.melpa.org/packages/")) ("org" . "https://orgmode.org/elpa/")
("elpa" . "https://elpa.gnu.org/packages/")))
(package-initialize) (package-initialize)
(unless package-archive-contents (unless package-archive-contents
(package-refresh-contents)) (package-refresh-contents))
@ -142,8 +146,7 @@
(with-eval-after-load 'winum (with-eval-after-load 'winum
(define-key winum-keymap (kbd "M-0") #'treemacs-select-window)) (define-key winum-keymap (kbd "M-0") #'treemacs-select-window))
:hook (emacs-startup . treemacs) :hook (emacs-startup . treemacs)
:config :config (progn
(progn
(setq treemacs-collapse-dirs (if treemacs-python-executable 3 0) (setq treemacs-collapse-dirs (if treemacs-python-executable 3 0)
treemacs-deferred-git-apply-delay 0.5 treemacs-deferred-git-apply-delay 0.5
treemacs-directory-name-transformer #'identity treemacs-directory-name-transformer #'identity
@ -226,9 +229,6 @@
("C-x t C-t" . treemacs-find-file) ("C-x t C-t" . treemacs-find-file)
("C-x t M-t" . treemacs-find-tag))) ("C-x t M-t" . treemacs-find-tag)))
(use-package treemacs-evil
:after (treemacs evil))
(use-package treemacs-all-the-icons (use-package treemacs-all-the-icons
:after (treemacs all-the-icons)) :after (treemacs all-the-icons))
@ -239,5 +239,55 @@
:hook (dired-mode . treemacs-icons-dired-enable-once) :hook (dired-mode . treemacs-icons-dired-enable-once)
:after (treemacs)) :after (treemacs))
(use-package treemacs-magit (defun efs/org-mode-setup ()
:after (treemacs magit)) (org-indent-mode)
(variable-pitch-mode 1)
(visual-line-mode 1))
;; Org Mode Configuration ------------------------------------------------------
(defun efs/org-font-setup ()
;; Replace list hyphen with dot
(font-lock-add-keywords 'org-mode
'(("^ *\\([-]\\) "
(0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•"))))))
;; Set faces for heading levels
(dolist (face '((org-level-1 . 1.2)
(org-level-2 . 1.1)
(org-level-3 . 1.05)
(org-level-4 . 1.0)
(org-level-5 . 1.1)
(org-level-6 . 1.1)
(org-level-7 . 1.1)
(org-level-8 . 1.1)))
(set-face-attribute (car face) nil :font "Cantarell" :weight 'regular :height (cdr face)))
;; Ensure that anything that should be fixed-pitch in Org files appears that way
(set-face-attribute 'org-block nil :foreground nil :inherit 'fixed-pitch)
(set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch))
(set-face-attribute 'org-table nil :inherit '(shadow fixed-pitch))
(set-face-attribute 'org-verbatim nil :inherit '(shadow fixed-pitch))
(set-face-attribute 'org-special-keyword nil :inherit '(font-lock-comment-face fixed-pitch))
(set-face-attribute 'org-meta-line nil :inherit '(font-lock-comment-face fixed-pitch))
(set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch))
(use-package org
:hook (org-mode . efs/org-mode-setup)
:config
(setq org-ellipsis " ▾")
(efs/org-font-setup))
(use-package org-bullets
:after org
:hook (org-mode . org-bullets-mode)
:custom
(org-bullets-bullet-list '("◉" "○" "●" "○" "●" "○" "●")))
(defun efs/org-mode-visual-fill ()
(setq visual-fill-column-width 100
visual-fill-column-center-text t)
(visual-fill-column-mode 1))
(use-package visual-fill-column
:hook (org-mode . efs/org-mode-visual-fill))