Minor QOL changes
This commit is contained in:
parent
7ad3ae5195
commit
f374b1a6ab
63
init.el
63
init.el
|
|
@ -5,6 +5,10 @@
|
||||||
(scroll-bar-mode 0)
|
(scroll-bar-mode 0)
|
||||||
(column-number-mode 1)
|
(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
|
;; Set custom tab width here
|
||||||
(defvar custom-tab-width 8)
|
(defvar custom-tab-width 8)
|
||||||
|
|
||||||
|
|
@ -22,6 +26,10 @@
|
||||||
(setq frame-inhibit-implied-resize t)
|
(setq frame-inhibit-implied-resize t)
|
||||||
(setq frame-resize-pixelwise 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
|
;; Ensure that tabs are default over spaces
|
||||||
(setq-default tab-width custom-tab-width)
|
(setq-default tab-width custom-tab-width)
|
||||||
(setq tab-width custom-tab-width)
|
(setq tab-width custom-tab-width)
|
||||||
|
|
@ -45,20 +53,33 @@
|
||||||
|
|
||||||
;; Clipboard config
|
;; Clipboard config
|
||||||
(setopt select-active-regions nil)
|
(setopt select-active-regions nil)
|
||||||
(setopt select-enable-clipboard 't)
|
(setq select-enable-clipboard t) ; Syncs Emacs 'kill' with system clipboard
|
||||||
(setopt select-enable-primary nil)
|
(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)
|
(setopt interprogram-cut-function #'gui-select-text)
|
||||||
|
|
||||||
;; Midnight Mode
|
;; Midnight Mode
|
||||||
; Automatically clean up old unused buffers
|
; Automatically clean up old unused buffers
|
||||||
(midnight-mode 1)
|
(midnight-mode 1)
|
||||||
|
|
||||||
;; Emacs client configuration
|
;; Font configuration
|
||||||
|
; Global font
|
||||||
(set-frame-font "MesloLGL Nerd Font 20")
|
(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)
|
(add-hook 'after-make-frame-functions #'(lambda (frame)
|
||||||
(select-frame frame)
|
(select-frame frame)
|
||||||
(client-config)))
|
(client-config)))
|
||||||
|
|
@ -147,10 +168,17 @@
|
||||||
|
|
||||||
|
|
||||||
;; Org Mode Config
|
;; 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:
|
;For Org-Agenda, you can set a location of your Org Agenda file here. Set Agenda Directory:
|
||||||
(use-package org
|
(use-package org
|
||||||
:ensure (:wait t)
|
;:ensure (:wait t)
|
||||||
|
:ensure nil
|
||||||
:demand t
|
:demand t
|
||||||
:after evil
|
:after evil
|
||||||
:hook
|
:hook
|
||||||
|
|
@ -158,7 +186,10 @@
|
||||||
:bind
|
:bind
|
||||||
(:map org-agenda-mode-map
|
(:map org-agenda-mode-map
|
||||||
("C-j" . evil-next-line)
|
("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
|
:config
|
||||||
(setq org-agenda-files '("~/Nextcloud/Agenda"))
|
(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:
|
;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 org-agenda-skip-scheduled-if-done nil)
|
||||||
(setq agenda-skip-deadline-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
|
; For Org Pomodoro notification sound
|
||||||
(use-package sound-wav
|
(use-package sound-wav
|
||||||
|
|
@ -319,7 +354,7 @@
|
||||||
(use-package orderless
|
(use-package orderless
|
||||||
:ensure t
|
:ensure t
|
||||||
:custom
|
:custom
|
||||||
(completion-styles '(orderless basic))
|
(completion-styles '(orderless flex basic))
|
||||||
(completion-category-overrides '((file (styles partial-completion))))
|
(completion-category-overrides '((file (styles partial-completion))))
|
||||||
(completion-pcm-leading-wildcard t)) ;; Emacs 31: partial-completion behaves like substring
|
(completion-pcm-leading-wildcard t)) ;; Emacs 31: partial-completion behaves like substring
|
||||||
|
|
||||||
|
|
@ -460,11 +495,13 @@
|
||||||
(auth-source-pass-enable))
|
(auth-source-pass-enable))
|
||||||
|
|
||||||
;; Mu4e Mail Config
|
;; Mu4e Mail Config
|
||||||
(if (executable-find "mu")
|
(when (executable-find "mu")
|
||||||
(use-package mu4e
|
(use-package mu4e
|
||||||
:ensure nil
|
:ensure nil
|
||||||
:after auth-source-pass
|
:after (auth-source-pass consult)
|
||||||
:config
|
:config
|
||||||
|
(define-key global-map [remap mu4e-search-narrow] 'consult-line)
|
||||||
|
|
||||||
(setq mu4e-mu-binary (executable-find "mu"))
|
(setq mu4e-mu-binary (executable-find "mu"))
|
||||||
|
|
||||||
;; This is set to 't' to avoid mail syncing issues when using mbsync
|
;; This is set to 't' to avoid mail syncing issues when using mbsync
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue