refactor: add indentation/spacing to emacs org config

This commit is contained in:
Flinner Yuu 2025-05-22 15:37:31 +03:00
parent cf688ba700
commit 00dd3bdf71
Signed by: flinner
GPG Key ID: 95CE0DA7F0E58CA6
1 changed files with 1384 additions and 1381 deletions

View File

@ -63,7 +63,7 @@ straight
remove warning by use-package remove warning by use-package
#+begin_src emacs-lisp #+begin_src emacs-lisp
(custom-set-variables '(warning-suppress-types '((use-package)))) (custom-set-variables '(warning-suppress-types '((use-package))))
#+end_src #+end_src
* Basic Configuration * Basic Configuration
@ -158,7 +158,7 @@ run this hook:
Arabic fonts :) Arabic fonts :)
#+begin_src emacs-lisp #+begin_src emacs-lisp
(when window-system (set-fontset-font "fontset-default" '(#x600 . #x6ff) my/ui/arabicfont)) (when window-system (set-fontset-font "fontset-default" '(#x600 . #x6ff) my/ui/arabicfont))
#+end_src #+end_src
** Theme ** Theme
@ -174,6 +174,7 @@ The status line
:init (doom-modeline-mode 1) :init (doom-modeline-mode 1)
:config :config
(display-battery-mode 1) (display-battery-mode 1)
(setq doom-modeline-irc-stylize #'ignore); Fix sever lag https://github.com/seagle0128/doom-modeline/issues/297
:custom :custom
((doom-modeline-height 15) (doom-modeline-icon t))) ((doom-modeline-height 15) (doom-modeline-icon t)))
#+end_src #+end_src
@ -269,7 +270,7 @@ Self explanatory
** Org roam warning ** Org roam warning
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq org-roam-v2-ack t) ; anonying startup message (setq org-roam-v2-ack t) ; anonying startup message
#+end_src #+end_src
** Tab Width ** Tab Width
@ -292,8 +293,8 @@ should i really be commiting this? :>
"secrets:local"; keepassxc db "secrets:local"; keepassxc db
"~/.authinfo" "~/.authinfo"
"~/.netrc")) "~/.netrc"))
(require 'epa-file) (require 'epa-file)
(epa-file-enable) (epa-file-enable)
#+end_src #+end_src
* Help * Help
@ -571,7 +572,7 @@ Capture
*** Closing Brackets *** Closing Brackets
#+begin_src emacs-lisp #+begin_src emacs-lisp
)) ))
#+end_src #+end_src
** Evil ** Evil
@ -821,7 +822,7 @@ Ivy floating
** Which Key (Shows Next keys) ** Which Key (Shows Next keys)
slow loading! defer it slow loading! defer it
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package which-key (use-package which-key
:defer 10 :defer 10
:diminish which-key-mode :diminish which-key-mode
:config :config
@ -860,7 +861,7 @@ slow loading! defer it
*** lsp + yasnippet *** lsp + yasnippet
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defun my-backends () (defun my-backends ()
(set (make-local-variable 'company-backends) (set (make-local-variable 'company-backends)
'((company-capf ;; I think this must come first? '((company-capf ;; I think this must come first?
:with :with
@ -984,7 +985,7 @@ use-package
Capture Templates Capture Templates
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package doct (use-package doct
:ensure t :ensure t
;;recommended: defer until calling doct ;;recommended: defer until calling doct
:commands (doct)) :commands (doct))
@ -1035,7 +1036,7 @@ I now use olivetti mode, this code block is ignored!
*** org-bullets *** org-bullets
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package org-bullets (use-package org-bullets
:after org :after org
:hook (org-mode . org-bullets-mode) :hook (org-mode . org-bullets-mode)
:custom :custom
@ -1045,8 +1046,8 @@ I now use olivetti mode, this code block is ignored!
*** Latex *** Latex
scale inline scale inline
#+begin_src emacs-lisp #+begin_src emacs-lisp
; moved to use -package ; moved to use -package
; (setq org-format-latex-options (plist-put org-format-latex-options :scale 1.5)) ; (setq org-format-latex-options (plist-put org-format-latex-options :scale 1.5))
#+end_src #+end_src
** Babel ** Babel
@ -1354,7 +1355,7 @@ From: https://yiufung.net/post/anki-org/
*** COMMENT org-ql *** COMMENT org-ql
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package helm-org-ql :after org-ql) (use-package helm-org-ql :after org-ql)
#+end_src #+end_src
#+begin_src emacs-lisp #+begin_src emacs-lisp
@ -1716,8 +1717,8 @@ Lsp UI
*** Flycheck *** Flycheck
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package flycheck (use-package flycheck
:custom-face (flycheck-warning ((t (:underline (:color "#fabd2f" :style line :position line))))) :custom-face (flycheck-warning ((t (:underline (:color "#fabd2f" :style line :position line)))))
(flycheck-error ((t (:underline (:color "#fb4934" :style line :position line))))) (flycheck-error ((t (:underline (:color "#fb4934" :style line :position line)))))
(flycheck-info ((t (:underline (:color "#83a598" :style line :position line)))))) (flycheck-info ((t (:underline (:color "#83a598" :style line :position line))))))
#+end_src #+end_src
@ -1742,7 +1743,7 @@ Lsp UI
*** Debug *** Debug
Use the Debug Adapter Protocol for running tests and debugging Use the Debug Adapter Protocol for running tests and debugging
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package dap-mode (use-package dap-mode
:hook :hook
(lsp-mode . dap-mode) (lsp-mode . dap-mode)
(lsp-mode . dap-ui-mode)) (lsp-mode . dap-ui-mode))
@ -1786,7 +1787,7 @@ Magit TODOs!
(use-package git-gutter (use-package git-gutter
:hook (prog-mode . git-gutter-mode) :hook (prog-mode . git-gutter-mode)
:config :config
(setq git-gutter:update-interval 0.02)) (setq git-gutter:update-interval 2))
(use-package git-gutter-fringe (use-package git-gutter-fringe
:config :config
@ -2064,7 +2065,7 @@ Better Diff in header sizes
*** COMMENT Vue *** COMMENT Vue
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package vue-mode (use-package vue-mode
:hook (vue-mode . lsp) :hook (vue-mode . lsp)
:hook (vue-mode . prettier-js-mode)) :hook (vue-mode . prettier-js-mode))
#+end_src #+end_src
@ -2082,7 +2083,7 @@ Better Diff in header sizes
*** Scala *** Scala
Scala mode for highlighting, indents and motion commands Scala mode for highlighting, indents and motion commands
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package scala-mode (use-package scala-mode
:hook :hook
(scala-mode . flycheck-mode) (scala-mode . flycheck-mode)
(scala-mode . lsp) (scala-mode . lsp)
@ -2095,7 +2096,7 @@ Scala mode for highlighting, indents and motion commands
Sbt for sbt commands... Sbt for sbt commands...
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package sbt-mode (use-package sbt-mode
:commands sbt-start sbt-command :commands sbt-start sbt-command
:config :config
;; WORKAROUND: https://github.com/ensime/emacs-sbt-mode/issues/31 ;; WORKAROUND: https://github.com/ensime/emacs-sbt-mode/issues/31
@ -2253,13 +2254,13 @@ AucTex (Archived, =:tangle= set to =no=)
(add-to-list 'LaTeX-clean-intermediate-suffixes '"-figure[0-9]*\\.\\(pdf\\|md5\\|log\\|dpth\\|dep\\|run\\.xml\\)") (add-to-list 'LaTeX-clean-intermediate-suffixes '"-figure[0-9]*\\.\\(pdf\\|md5\\|log\\|dpth\\|dep\\|run\\.xml\\)")
(add-to-list 'LaTeX-clean-intermediate-suffixes '".auxlock") (add-to-list 'LaTeX-clean-intermediate-suffixes '".auxlock")
; (eval-after-load 'latex ; (eval-after-load 'latex
; `(dolist (face '((font-latex-sectioning-0-face . 3.0) ; \part ; `(dolist (face '((font-latex-sectioning-0-face . 3.0) ; \part
; (font-latex-sectioning-1-face . 2.5) ; \chapter ; (font-latex-sectioning-1-face . 2.5) ; \chapter
; (font-latex-sectioning-2-face . 2.0) ; \section ; (font-latex-sectioning-2-face . 2.0) ; \section
; (font-latex-sectioning-3-face . 1.5) ; \subsection ; (font-latex-sectioning-3-face . 1.5) ; \subsection
; (font-latex-sectioning-4-face . 1.5))) ; \subsubsection ; (font-latex-sectioning-4-face . 1.5))) ; \subsubsection
; (set-face-attribute (car face) nil :font my/ui/varfont :weight 'bold :height (cdr face)))) ; (set-face-attribute (car face) nil :font my/ui/varfont :weight 'bold :height (cdr face))))
;; to have the buffer refresh after compilation, ;; to have the buffer refresh after compilation,
;; very important so that PDFView refesh itself after comilation ;; very important so that PDFView refesh itself after comilation
@ -2277,12 +2278,12 @@ AucTex (Archived, =:tangle= set to =no=)
Custom functions (Archived, =:tangle= set to =no=) Custom functions (Archived, =:tangle= set to =no=)
#+begin_src emacs-lisp :tangle no #+begin_src emacs-lisp :tangle no
(defun try/latex-mode-setup () (defun try/latex-mode-setup ()
(require 'company-reftex) (require 'company-reftex)
(turn-on-reftex) (turn-on-reftex)
(require 'company-auctex) (require 'company-auctex)
(require 'company-math) (require 'company-math)
(setq-local company-backends (setq-local company-backends
(append '((company-reftex-labels company-reftex-citations) (append '((company-reftex-labels company-reftex-citations)
(company-math-symbols-unicode company-math-symbols-latex company-latex-commands) (company-math-symbols-unicode company-math-symbols-latex company-latex-commands)
@ -2536,7 +2537,7 @@ Unused, switched to =hledger=
#+end_src #+end_src
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package flycheck-hledger (use-package flycheck-hledger
:after (flycheck hledger-mode) :after (flycheck hledger-mode)
:demand t) :demand t)
@ -2644,7 +2645,7 @@ Unused, switched to =hledger=
tramp-file-name-regexp)) tramp-file-name-regexp))
(setq vc-handled-backends '(Git)) (setq vc-handled-backends '(Git))
;https://libredd.it/r/emacs/comments/320cvb/projectile_slows_tramp_mode_to_a_crawl_is_there_a/ ;https://libredd.it/r/emacs/comments/320cvb/projectile_slows_tramp_mode_to_a_crawl_is_there_a/
(add-hook 'find-file-hook (add-hook 'find-file-hook
(lambda () (lambda ()
(when (file-remote-p default-directory) (when (file-remote-p default-directory)
(setq-local projectile-mode-line "Projectile" (setq-local projectile-mode-line "Projectile"
@ -2676,7 +2677,7 @@ Unused, switched to =hledger=
#+end_src #+end_src
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package vterm-toggle) (use-package vterm-toggle)
#+end_src #+end_src
** Server ** Server
@ -2777,7 +2778,7 @@ Unused, switched to =hledger=
#+end_src #+end_src
* Elfeed org * Elfeed org
=;; (setq rmh-elfeed-org-files (list "~/Documents/private.el/elfeed.org"))= =;; (setq rmh-elfeed-org-files (list "~/Documents/private.el/elfeed.org"))=
** Elfeed-org ** Elfeed-org
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package elfeed-org (use-package elfeed-org
@ -2977,6 +2978,8 @@ I wrote that, neat isn't it? :P
:bind (:map circe-mode-map :bind (:map circe-mode-map
([remap counsel-projectile-find-file] . my/circe/helm-buffers)) ([remap counsel-projectile-find-file] . my/circe/helm-buffers))
) )
(use-package circe-notifications)
#+end_src #+end_src
#+begin_src emacs-lisp #+begin_src emacs-lisp
@ -3001,7 +3004,7 @@ I wrote that, neat isn't it? :P
*** znc stuff *** znc stuff
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defun circe-command-ZNC (what) (defun circe-command-ZNC (what)
"Send a message to ZNC incorporated by user '*status'." "Send a message to ZNC incorporated by user '*status'."
(circe-command-MSG "*status" what)) (circe-command-MSG "*status" what))
@ -3048,7 +3051,7 @@ I wrote that, neat isn't it? :P
;; ~/Maildir/Account0/{Inbox,Sent,Trash} ;; ~/Maildir/Account0/{Inbox,Sent,Trash}
;; ~/Maildir/Account1/{Inbox,Sent,Trash} ;; ~/Maildir/Account1/{Inbox,Sent,Trash}
;; where Account0 is context name ;; where Account0 is context name
(with-eval-after-load 'mu4e (with-eval-after-load 'mu4e
(defun my-make-mu4e-context (context-name full-name mail-address signature) (defun my-make-mu4e-context (context-name full-name mail-address signature)
"Return a mu4e context named CONTEXT-NAME with :match-func matching "Return a mu4e context named CONTEXT-NAME with :match-func matching
folder name CONTEXT-NAME in Maildir. The context's `user-mail-address', folder name CONTEXT-NAME in Maildir. The context's `user-mail-address',
@ -3108,7 +3111,7 @@ I wrote that, neat isn't it? :P
;; This is a sample, it doesn't get included in init.el ;; This is a sample, it doesn't get included in init.el
;; I put mine at location specified in the next code block ;; I put mine at location specified in the next code block
;; any number of email can be used ofc ;; any number of email can be used ofc
(with-eval-after-load 'mu4e (with-eval-after-load 'mu4e
(setq mu4e-contexts `( (setq mu4e-contexts `(
,(my-make-mu4e-context ,(my-make-mu4e-context
"maildir-context" "Full Name" "maildir-context" "Full Name"
@ -3121,7 +3124,7 @@ I wrote that, neat isn't it? :P
or don't include in git source :) or don't include in git source :)
#+begin_src emacs-lisp #+begin_src emacs-lisp
(with-eval-after-load 'mu4e (with-eval-after-load 'mu4e
(load "~/Documents/Passwords/mu4e-context.el")) (load "~/Documents/Passwords/mu4e-context.el"))
#+end_src #+end_src
@ -3132,7 +3135,7 @@ should only move to trash, not delete entirely from the server
#+begin_src emacs-lisp #+begin_src emacs-lisp
(with-eval-after-load 'mu4e (with-eval-after-load 'mu4e
(setf (alist-get 'trash mu4e-marks) (setf (alist-get 'trash mu4e-marks)
(list :char '("d" . "▼") (list :char '("d" . "▼")
:prompt "dtrash" :prompt "dtrash"
@ -3160,7 +3163,7 @@ Breaking change betweeen =mu4e-alert= and =mu= :(
I prefer text/plain, over everything >:) I prefer text/plain, over everything >:)
#+begin_src emacs-lisp #+begin_src emacs-lisp
(with-eval-after-load "mm-decode" (with-eval-after-load "mm-decode"
(add-to-list 'mm-discouraged-alternatives "text/richtext") (add-to-list 'mm-discouraged-alternatives "text/richtext")
(add-to-list 'mm-discouraged-alternatives "text/html")) (add-to-list 'mm-discouraged-alternatives "text/html"))
#+end_src #+end_src
@ -3239,7 +3242,7 @@ Only ask whether to reply to all if there are more than one recipients
* Buffers and Windows * Buffers and Windows
** COMMENT Workspaces (Persepective ** COMMENT Workspaces (Persepective
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package persp-mode (use-package persp-mode
:defer t :defer t
:config :config
(setq persp-keymap-prefix (kbd "SPC <tab>")) (setq persp-keymap-prefix (kbd "SPC <tab>"))