Minor QOL changes

This commit is contained in:
Curt Spark 2026-03-25 10:55:24 +00:00
parent 7ad3ae5195
commit f374b1a6ab
1 changed files with 50 additions and 13 deletions

63
init.el
View File

@ -5,6 +5,10 @@
(scroll-bar-mode 0)
(column-number-mode 1)
;; Word wrapping
(global-visual-line-mode 1)
(setq-default visual-line-fringe-indicators '(left-curly-arrow right-curly-arrow))
;; Set custom tab width here
(defvar custom-tab-width 8)
@ -22,6 +26,10 @@
(setq frame-inhibit-implied-resize t)
(setq frame-resize-pixelwise t)
;; Paren matching
(setq show-paren-context-when-offscreen 'overlay)
(show-paren-mode 1)
;; Ensure that tabs are default over spaces
(setq-default tab-width custom-tab-width)
(setq tab-width custom-tab-width)
@ -45,20 +53,33 @@
;; Clipboard config
(setopt select-active-regions nil)
(setopt select-enable-clipboard 't)
(setopt select-enable-primary nil)
(setq select-enable-clipboard t) ; Syncs Emacs 'kill' with system clipboard
(setq select-enable-primary t) ; Syncs with the primary selection (middle-click)
(setq save-interprogram-paste-before-kill t) ; Save existing clipboard to kill ring before overwriting
(setopt interprogram-cut-function #'gui-select-text)
;; Midnight Mode
; Automatically clean up old unused buffers
(midnight-mode 1)
;; Emacs client configuration
;; Font configuration
; Global font
(set-frame-font "MesloLGL Nerd Font 20")
(setq default-frame-alist '((font . "MesloLGL Nerd Font 20")))
(defun client-config ()
(scroll-bar-mode 0))
; Buffer fonts
(defun set-buffer-local-font ()
"Set font for normal buffers."
(face-remap-add-relative 'default :height 260))
(add-hook 'prog-mode-hook #'set-buffer-local-font)
(add-hook 'text-mode-hook #'set-buffer-local-font)
; Emacsclient new frame fonts
(setq default-frame-alist '((font . "MesloLGL Nerd Font 20")))
;; Emacsclient Configuration
(defun client-config ()
"Ran on new emacslient frame creations."
(scroll-bar-mode 0))
(add-hook 'after-make-frame-functions #'(lambda (frame)
(select-frame frame)
(client-config)))
@ -147,10 +168,17 @@
;; Org Mode Config
;Agenda
; Agenda
(defun org-agenda-toggle-day-view ()
"Toggle between daily and weekly view in org agenda."
(interactive)
(if (eq org-agenda-current-span 'day)
(org-agenda-week-view)
(org-agenda-day-view)))
;For Org-Agenda, you can set a location of your Org Agenda file here. Set Agenda Directory:
(use-package org
:ensure (:wait t)
;:ensure (:wait t)
:ensure nil
:demand t
:after evil
:hook
@ -158,7 +186,10 @@
:bind
(:map org-agenda-mode-map
("C-j" . evil-next-line)
("C-k" . evil-previous-line))
("C-k" . evil-previous-line)
("d" . org-agenda-toggle-day-view)
:map evil-normal-state-map
("U" . undo-redo))
:config
(setq org-agenda-files '("~/Nextcloud/Agenda"))
;This is will integrate the Calendar/Diary into Org-Agenda, so you can get access to dates on public holidays etc. Set diary to true:
@ -172,7 +203,11 @@
(setq org-agenda-skip-scheduled-if-done nil)
(setq agenda-skip-deadline-if-done nil)
(setq org-startup-folded t))
;Fold settings
;Org Mode historically used overlays to hide text, but newer versions moved toward text properties for better performance in large files. This change occasionally causes "stuck" visibility where sub-headers remain hidden until the parent is fully cycled.
(setq org-fold-core-style 'overlays)
(setq org-startup-folded t)
(setq org-hide-emphasis-markers nil))
; For Org Pomodoro notification sound
(use-package sound-wav
@ -319,7 +354,7 @@
(use-package orderless
:ensure t
:custom
(completion-styles '(orderless basic))
(completion-styles '(orderless flex basic))
(completion-category-overrides '((file (styles partial-completion))))
(completion-pcm-leading-wildcard t)) ;; Emacs 31: partial-completion behaves like substring
@ -460,11 +495,13 @@
(auth-source-pass-enable))
;; Mu4e Mail Config
(if (executable-find "mu")
(when (executable-find "mu")
(use-package mu4e
:ensure nil
:after auth-source-pass
:after (auth-source-pass consult)
:config
(define-key global-map [remap mu4e-search-narrow] 'consult-line)
(setq mu4e-mu-binary (executable-find "mu"))
;; This is set to 't' to avoid mail syncing issues when using mbsync