Extra formatting, removal of whitespaces
This commit is contained in:
parent
d13f9d431d
commit
ed93fdfd94
62
init.el
62
init.el
|
|
@ -78,7 +78,7 @@
|
||||||
|
|
||||||
;; Package management setup
|
;; Package management setup
|
||||||
; Elpaca
|
; Elpaca
|
||||||
(unload-feature 'tramp t)
|
;(unload-feature 'tramp t)
|
||||||
(defvar elpaca-installer-version 0.11)
|
(defvar elpaca-installer-version 0.11)
|
||||||
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
|
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
|
||||||
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
|
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
|
||||||
|
|
@ -133,14 +133,14 @@
|
||||||
:ensure t
|
:ensure t
|
||||||
:init
|
:init
|
||||||
(gcmh-mode 1)
|
(gcmh-mode 1)
|
||||||
|
|
||||||
;; Ensure garbage collector does not run TOO frequently which causes random freezes
|
;; Ensure garbage collector does not run TOO frequently which causes random freezes
|
||||||
(defun gcmh-mode-optimisation-setup-hook ()
|
(defun gcmh-mode-optimisation-setup-hook ()
|
||||||
(setq gc-cons-threshold most-positive-fixnum))
|
(setq gc-cons-threshold most-positive-fixnum))
|
||||||
|
|
||||||
(defun gcmh-mode-optimisation-exit-hook ()
|
(defun gcmh-mode-optimisation-exit-hook ()
|
||||||
(setq gc-cons-threshold 800000))
|
(setq gc-cons-threshold 800000))
|
||||||
|
|
||||||
(add-hook 'minibuffer-setup-hook 'gcmh-mode-optimisation-setup-hook)
|
(add-hook 'minibuffer-setup-hook 'gcmh-mode-optimisation-setup-hook)
|
||||||
(add-hook 'minibuffer-exit-hook 'gcmh-mode-optimisation-exit-hook))
|
(add-hook 'minibuffer-exit-hook 'gcmh-mode-optimisation-exit-hook))
|
||||||
|
|
||||||
|
|
@ -153,10 +153,10 @@
|
||||||
|
|
||||||
(setq jit-lock-defer-time 0)
|
(setq jit-lock-defer-time 0)
|
||||||
(with-eval-after-load 'evil
|
(with-eval-after-load 'evil
|
||||||
(add-hook 'evil-insert-state-entry-hook
|
(add-hook 'evil-insert-state-entry-hook
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(setq jit-lock-defer-time 0.25)) nil t)
|
(setq jit-lock-defer-time 0.25)) nil t)
|
||||||
(add-hook 'evil-insert-state-exit-hook
|
(add-hook 'evil-insert-state-exit-hook
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(setq jit-lock-defer-time 0)) nil t))
|
(setq jit-lock-defer-time 0)) nil t))
|
||||||
|
|
||||||
|
|
@ -316,7 +316,7 @@
|
||||||
:ensure nil
|
:ensure nil
|
||||||
:custom
|
:custom
|
||||||
(tab-always-indent 'complete)
|
(tab-always-indent 'complete)
|
||||||
|
|
||||||
;; Enable context menu. `vertico-multiform-mode' adds a menu in the minibuffer
|
;; Enable context menu. `vertico-multiform-mode' adds a menu in the minibuffer
|
||||||
;; to switch display modes.
|
;; to switch display modes.
|
||||||
(context-menu-mode t)
|
(context-menu-mode t)
|
||||||
|
|
@ -329,7 +329,7 @@
|
||||||
;; Do not allow the cursor in the minibuffer prompt
|
;; Do not allow the cursor in the minibuffer prompt
|
||||||
(minibuffer-prompt-properties
|
(minibuffer-prompt-properties
|
||||||
'(read-only t cursor-intangible t face minibuffer-prompt)))
|
'(read-only t cursor-intangible t face minibuffer-prompt)))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;; Doom Theme
|
;; Doom Theme
|
||||||
|
|
@ -337,10 +337,10 @@
|
||||||
:ensure t
|
:ensure t
|
||||||
:config
|
:config
|
||||||
;; Global settings (defaults)
|
;; Global settings (defaults)
|
||||||
(setq
|
(setq
|
||||||
doom-themes-enable-bold t ; if nil, bold is universally disabled
|
doom-themes-enable-bold t ; if nil, bold is universally disabled
|
||||||
doom-themes-enable-italic t) ; if nil, italics is universally disabled
|
doom-themes-enable-italic t) ; if nil, italics is universally disabled
|
||||||
|
|
||||||
(load-theme 'doom-gruvbox-light t))
|
(load-theme 'doom-gruvbox-light t))
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -392,17 +392,17 @@
|
||||||
;; Corfu Autocomplete in buffer
|
;; Corfu Autocomplete in buffer
|
||||||
(use-package corfu
|
(use-package corfu
|
||||||
:ensure t
|
:ensure t
|
||||||
:hook
|
:hook
|
||||||
(prog-mode . corfu-mode)
|
(prog-mode . corfu-mode)
|
||||||
(html-ts-mode . corfu-mode)
|
(html-ts-mode . corfu-mode)
|
||||||
(css-ts-mode . corfu-mode)
|
(css-ts-mode . corfu-mode)
|
||||||
;; (shell-mode . corfu-mode)
|
;; (shell-mode . corfu-mode)
|
||||||
;; (eshell-mode . corfu-mode))
|
;; (eshell-mode . corfu-mode))
|
||||||
:config
|
:config
|
||||||
(setq
|
(setq
|
||||||
auto nil
|
auto nil
|
||||||
corfu-preselect 'first))
|
corfu-preselect 'first))
|
||||||
|
|
||||||
;;(global-corfu-mode)
|
;;(global-corfu-mode)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -431,7 +431,7 @@
|
||||||
(use-package eshell-z
|
(use-package eshell-z
|
||||||
:ensure t
|
:ensure t
|
||||||
:after tramp
|
:after tramp
|
||||||
:config
|
:config
|
||||||
(add-hook 'eshell-mode-hook
|
(add-hook 'eshell-mode-hook
|
||||||
(defun my-eshell-mode-hook ()
|
(defun my-eshell-mode-hook ()
|
||||||
(require 'eshell-z))))
|
(require 'eshell-z))))
|
||||||
|
|
@ -458,7 +458,7 @@
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(call-process "bash" nil '(t nil) nil "-ci" "alias")
|
(call-process "bash" nil '(t nil) nil "-ci" "alias")
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
|
|
||||||
; Bash aliases to exclude
|
; Bash aliases to exclude
|
||||||
(flush-lines "^alias magit\\|^alias oc\\|^alias z\\|^alias zi\\|^alias cd\\|^alias cdi\\|^alias sudo")
|
(flush-lines "^alias magit\\|^alias oc\\|^alias z\\|^alias zi\\|^alias cd\\|^alias cdi\\|^alias sudo")
|
||||||
|
|
||||||
|
|
@ -475,7 +475,7 @@
|
||||||
:init
|
:init
|
||||||
;; For `eat-eshell-mode'.
|
;; For `eat-eshell-mode'.
|
||||||
(add-hook 'eshell-load-hook #'eat-eshell-mode)
|
(add-hook 'eshell-load-hook #'eat-eshell-mode)
|
||||||
|
|
||||||
;; For `eat-eshell-visual-command-mode'.
|
;; For `eat-eshell-visual-command-mode'.
|
||||||
(add-hook 'eshell-load-hook #'eat-eshell-visual-command-mode))
|
(add-hook 'eshell-load-hook #'eat-eshell-visual-command-mode))
|
||||||
|
|
||||||
|
|
@ -505,10 +505,10 @@
|
||||||
:ensure nil
|
:ensure nil
|
||||||
:config
|
:config
|
||||||
(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
|
||||||
(setq mu4e-change-filenames-when-moving t)
|
(setq mu4e-change-filenames-when-moving t)
|
||||||
|
|
||||||
;; Refresh mail using isync every 10 minutes
|
;; Refresh mail using isync every 10 minutes
|
||||||
;(setq mu4e-update-interval (* 10 60))
|
;(setq mu4e-update-interval (* 10 60))
|
||||||
(setq mu4e-get-mail-command "mbsync -a")
|
(setq mu4e-get-mail-command "mbsync -a")
|
||||||
|
|
@ -520,7 +520,7 @@
|
||||||
;; Make sure plain text mails flow correctly for recipients
|
;; Make sure plain text mails flow correctly for recipients
|
||||||
(setq mu4e-compose-format-flowed t)
|
(setq mu4e-compose-format-flowed t)
|
||||||
|
|
||||||
;; Use completing read AKA vertico
|
;; Use completing read AKA vertico
|
||||||
(setq mu4e-completing-read-function 'completing-read)
|
(setq mu4e-completing-read-function 'completing-read)
|
||||||
|
|
||||||
(setq mu4e-contexts
|
(setq mu4e-contexts
|
||||||
|
|
@ -542,7 +542,7 @@
|
||||||
(mu4e-drafts-folder . "/work-cspark/Drafts")
|
(mu4e-drafts-folder . "/work-cspark/Drafts")
|
||||||
(mu4e-sent-folder . "/work-cspark/Sent Mail")
|
(mu4e-sent-folder . "/work-cspark/Sent Mail")
|
||||||
(mu4e-trash-folder . "/work-cspark/Trash")))
|
(mu4e-trash-folder . "/work-cspark/Trash")))
|
||||||
|
|
||||||
;; Services account
|
;; Services account
|
||||||
(make-mu4e-context
|
(make-mu4e-context
|
||||||
:name "B CSpark Services"
|
:name "B CSpark Services"
|
||||||
|
|
@ -560,7 +560,7 @@
|
||||||
(mu4e-drafts-folder . "/services-cspark/Drafts")
|
(mu4e-drafts-folder . "/services-cspark/Drafts")
|
||||||
(mu4e-sent-folder . "/services-cspark/Sent Mail")
|
(mu4e-sent-folder . "/services-cspark/Sent Mail")
|
||||||
(mu4e-trash-folder . "/services-cspark/Trash")))
|
(mu4e-trash-folder . "/services-cspark/Trash")))
|
||||||
|
|
||||||
;; Personal account
|
;; Personal account
|
||||||
(make-mu4e-context
|
(make-mu4e-context
|
||||||
:name "C CSpark Personal"
|
:name "C CSpark Personal"
|
||||||
|
|
@ -578,7 +578,7 @@
|
||||||
(mu4e-drafts-folder . "/personal-cspark/Drafts")
|
(mu4e-drafts-folder . "/personal-cspark/Drafts")
|
||||||
(mu4e-sent-folder . "/personal-cspark/Sent Mail")
|
(mu4e-sent-folder . "/personal-cspark/Sent Mail")
|
||||||
(mu4e-trash-folder . "/personal-cspark/Trash")))
|
(mu4e-trash-folder . "/personal-cspark/Trash")))
|
||||||
|
|
||||||
;; Tuxtank Services account
|
;; Tuxtank Services account
|
||||||
(make-mu4e-context
|
(make-mu4e-context
|
||||||
:name "D Tuxtank Services"
|
:name "D Tuxtank Services"
|
||||||
|
|
@ -596,15 +596,15 @@
|
||||||
(mu4e-drafts-folder . "/personal-tuxtank/Drafts")
|
(mu4e-drafts-folder . "/personal-tuxtank/Drafts")
|
||||||
(mu4e-sent-folder . "/personal-tuxtank/Sent Mail")
|
(mu4e-sent-folder . "/personal-tuxtank/Sent Mail")
|
||||||
(mu4e-trash-folder . "/personal-tuxtank/Trash")))))))
|
(mu4e-trash-folder . "/personal-tuxtank/Trash")))))))
|
||||||
|
|
||||||
|
|
||||||
;(setq mu4e-maildir-shortcuts
|
;(setq mu4e-maildir-shortcuts
|
||||||
; '(("/Gmail/Inbox" . ?i)
|
; '(("/Gmail/Inbox" . ?i)
|
||||||
; ("/Gmail/[Gmail]/Sent Mail" . ?s)
|
; ("/Gmail/[Gmail]/Sent Mail" . ?s)
|
||||||
; ("/Gmail/[Gmail]/Trash" . ?t)
|
; ("/Gmail/[Gmail]/Trash" . ?t)
|
||||||
; ("/Gmail/[Gmail]/Drafts" . ?d)
|
; ("/Gmail/[Gmail]/Drafts" . ?d)
|
||||||
; ("/Gmail/[Gmail]/All Mail" . ?a)))
|
; ("/Gmail/[Gmail]/All Mail" . ?a)))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;; Emacs everywhere - Use emacs for any text input
|
;; Emacs everywhere - Use emacs for any text input
|
||||||
|
|
@ -614,7 +614,7 @@
|
||||||
;; Parinfer mode - We will use conventional 2 spaces instead of tabs for lisp
|
;; Parinfer mode - We will use conventional 2 spaces instead of tabs for lisp
|
||||||
(use-package parinfer-rust-mode
|
(use-package parinfer-rust-mode
|
||||||
:ensure (:host github :repo "justinbarclay/parinfer-rust-mode")
|
:ensure (:host github :repo "justinbarclay/parinfer-rust-mode")
|
||||||
:hook (emacs-lisp-mode . (lambda()
|
:hook (emacs-lisp-mode . (lambda()
|
||||||
(setq-local tab-width 2)
|
(setq-local tab-width 2)
|
||||||
(indent-tabs-mode -1)
|
(indent-tabs-mode -1)
|
||||||
(parinfer-rust-mode))))
|
(parinfer-rust-mode))))
|
||||||
|
|
@ -653,7 +653,7 @@
|
||||||
(sql . ("https://github.com/m-novikov/tree-sitter-sql"))
|
(sql . ("https://github.com/m-novikov/tree-sitter-sql"))
|
||||||
(toml . ("https://github.com/tree-sitter/tree-sitter-toml"))
|
(toml . ("https://github.com/tree-sitter/tree-sitter-toml"))
|
||||||
(zig . ("https://github.com/GrayJack/tree-sitter-zig"))))
|
(zig . ("https://github.com/GrayJack/tree-sitter-zig"))))
|
||||||
|
|
||||||
:config ;; Credit to https://github.com/Nathan-Furnal/dotemacs/blob/df9b845563a84a927ff762e172334cf772253a44/init.el#L1154
|
:config ;; Credit to https://github.com/Nathan-Furnal/dotemacs/blob/df9b845563a84a927ff762e172334cf772253a44/init.el#L1154
|
||||||
(defun nf/treesit-install-all-languages ()
|
(defun nf/treesit-install-all-languages ()
|
||||||
"Install all languages specified by `treesit-language-source-alist'."
|
"Install all languages specified by `treesit-language-source-alist'."
|
||||||
|
|
@ -711,7 +711,7 @@
|
||||||
(css-mode . css-ts-mode)
|
(css-mode . css-ts-mode)
|
||||||
(js-mode . js-ts-mode)
|
(js-mode . js-ts-mode)
|
||||||
(javascript-mode . js-ts-mode)))
|
(javascript-mode . js-ts-mode)))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;; Programming treesit style config
|
;; Programming treesit style config
|
||||||
|
|
@ -757,7 +757,7 @@
|
||||||
|
|
||||||
;; LSP Configuration
|
;; LSP Configuration
|
||||||
(use-package eglot
|
(use-package eglot
|
||||||
:hook
|
:hook
|
||||||
(((
|
(((
|
||||||
bash-ts-mode
|
bash-ts-mode
|
||||||
c-ts-mode
|
c-ts-mode
|
||||||
|
|
@ -777,7 +777,7 @@
|
||||||
;; HTML Emmet Snippets
|
;; HTML Emmet Snippets
|
||||||
(use-package emmet-mode
|
(use-package emmet-mode
|
||||||
:ensure t
|
:ensure t
|
||||||
:hook
|
:hook
|
||||||
(typescript-ts-mode . emmet-mode)
|
(typescript-ts-mode . emmet-mode)
|
||||||
(tsx-ts-mode . emmet-mode)
|
(tsx-ts-mode . emmet-mode)
|
||||||
(html-ts-mode . emmet-mode)
|
(html-ts-mode . emmet-mode)
|
||||||
|
|
@ -811,4 +811,4 @@
|
||||||
;; If you edit it by hand, you could mess it up, so be careful.
|
;; If you edit it by hand, you could mess it up, so be careful.
|
||||||
;; Your init file should contain only one such instance.
|
;; Your init file should contain only one such instance.
|
||||||
;; If there is more than one, they won't work right.
|
;; If there is more than one, they won't work right.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue