diff options
Diffstat (limited to '')
-rw-r--r-- | init.el | 7 | ||||
-rw-r--r-- | myinit.org | 238 |
2 files changed, 127 insertions, 118 deletions
@@ -27,11 +27,14 @@ ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(company-show-quick-access t nil nil "Customized with use-package company") + '(display-line-numbers-type 'relative) + '(display-time-mode t) '(package-selected-packages - '(deft cider org-roam org yasnippet-snippets which-key vterm use-package rainbow-delimiters pdf-tools paredit notmuch magit ledger-mode gruvbox-theme flycheck expand-region evil elpy elfeed-score diminish counsel cmake-mode browse-kill-ring beacon auto-package-update amx ace-window ace-jump-mode))) + '(deft cider org-roam org yasnippet-snippets which-key vterm use-package rainbow-delimiters pdf-tools paredit notmuch magit ledger-mode gruvbox-theme flycheck expand-region evil elpy elfeed-score diminish counsel cmake-mode browse-kill-ring beacon auto-package-update amx ace-window ace-jump-mode)) + '(tool-bar-mode nil)) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. - ) + '(default ((t (:family "Hack" :foundry "SRC" :slant normal :weight normal :height 120 :width normal))))) @@ -1,137 +1,143 @@ #+BEGIN_SRC emacs-lisp -;; -*- lexical-binding: t; -*- + ;; -*- lexical-binding: t; -*- -;; yulqen's Emacs Configuration + ;; yulqen's Emacs Configuration -;; Copyright (C) yulqen + ;; Copyright (C) yulqen #+END_SRC * Startup ** Early Init #+BEGIN_SRC emacs-lisp -;; -*- lexical-binding: t; -*- + ;; -*- lexical-binding: t; -*- -;; Garbage collection -(setq gc-cons-percentage 0.6) + ;; Garbage collection + (setq gc-cons-percentage 0.6) -;; MISC optimizations -(setq idle-update-delay 1.0) -(setq-default bidi-display-reordering 'left-to-right - bidi-paragraph-direction 'left-to-right) -(setq-default cursor-in-non-selected-windows nil) -(setq hightlight-nonselected-windows nil) -(setq fast-but-imprecise-scrolling t) -(setq inhibit-compacting-font-caches t) -(menu-bar-mode 0) + ;; MISC optimizations + (setq idle-update-delay 1.0) + (setq-default bidi-display-reordering 'left-to-right + bidi-paragraph-direction 'left-to-right) + (setq-default cursor-in-non-selected-windows nil) + (setq hightlight-nonselected-windows nil) + (setq fast-but-imprecise-scrolling t) + (setq inhibit-compacting-font-caches t) + (menu-bar-mode 1) #+END_SRC #+begin_src emacs-lisp -(add-hook 'org-mode-hook 'visual-line-mode) + (add-hook 'org-mode-hook 'visual-line-mode) #+end_src #+begin_src emacs-lisp -;; turn off flycheck-mode -(add-hook 'org-mode-hook (lambda () flycheck-mode -1)) + ;; turn off flycheck-mode + (add-hook 'org-mode-hook (lambda () flycheck-mode -1)) #+end_src * Fundamentals #+BEGIN_SRC emacs-lisp - (setq user-full-name "Matthew Lemon" - user-mail-address "matt@matthewlemon.com") - - (defun establish-machine () - (let ((sys (system-name))) - (if (string= sys "archdesk") - (setq mrl/computer 'desktop) - (setq mrl/computer 'laptop)))) - - (establish-machine) - - (setq inhibit-startup-message 1) - (scroll-bar-mode -1) - (tool-bar-mode -1) - (tooltip-mode -1) - (set-fringe-mode 10) - - (put 'narrow-to-defun 'disabled nil) - (put 'narrow-to-page 'disabled nil) - (put 'narrow-to-region 'disabled nil) - - ;; we don't want the old buffer list! - (global-unset-key (kbd "C-x C-b")) - - ;; Put backups in /tmp where they belong - (setq backup-directory-alist - `((".*" . ,temporary-file-directory))) - (setq auto-save-file-name-transforms - `((".*" ,temporary-file-directory t))) - - ;; recursively copy by default - (setq dired-recursive-copies 'always) - - ;; y or n instead of yes or no - (fset 'yes-or-no-p 'y-or-n-p) - - ;; auto revert files - (global-auto-revert-mode t) - - ;; BACKUPS/LOCKFILES -------- - ;; Don't generate backups or lockfiles. - (setq create-lockfiles nil - make-backup-files nil - ;; But in case the user does enable it, some sensible defaults: - version-control t ; number each backup file - backup-by-copying t ; instead of renaming current file (clobbers links) - delete-old-versions t ; clean up after itself - kept-old-versions 5 - kept-new-versions 5 - backup-directory-alist (list (cons "." (concat user-emacs-directory "backup/")))) - - ;; Display the current time - (display-time-mode t) - - (setq visible-bell t) - - ;; (set-face-attribute 'default t :font "Hack-10") - (set-face-attribute 'default nil :font "-SRC-Hack-normal-normal-normal-*-26-*-*-*-m-0-iso10646-1") - - (use-package gruber-darker-theme - :ensure t - :config - (load-theme 'gruber-darker t)) - - (setq display-line-numbers-type `relative) - (setq undo-limit 8000000) ; raise limit to 80Mb - (setq truncate-string-ellipsis "…") ; better than using dots - (setq scroll-preserve-screen-position 'always) ; experimental - (setq scroll-margin 3) ; bit of space - - - ;; calendar proper Monday start - (setq calendar-week-start-day 1) - (setq calendar-date-style (quote european)) - - ;; Handling tabs (for programming) - (setq-default tab-width 2) - (setq-default tab-width 2 indent-tabs-mode nil) - (setq-default indent-tabs-mode nil) - (setq js-indent-level 2) - (setq python-indent 2) - (setq css-indent-offset 2) - (add-hook 'sh-mode-hook - (lambda () - (setq sh-basic-offset 2 - sh-indentation 2))) - (setq web-mode-markup-indent-offset 2) - - ;; Highlight matching parens - (show-paren-mode t) - - ;; Stop C-z suspending emacs - (global-set-key (kbd "C-z") 'nil) - - ;; encoding - (prefer-coding-system 'utf-8) - (setq coding-system-for-read 'utf-8) - (setq coding-system-for-write 'utf-8) + (setq user-full-name "Matthew Lemon" + user-mail-address "matt@matthewlemon.com") + + (defun establish-machine () + (let ((sys (system-name))) + (if (string= sys "archdesk") + (setq mrl/computer 'desktop) + (setq mrl/computer 'laptop)))) + + (establish-machine) + + (setq inhibit-startup-message 1) + (scroll-bar-mode -1) + (tool-bar-mode -1) + (tooltip-mode -1) + (set-fringe-mode 10) + + (put 'narrow-to-defun 'disabled nil) + (put 'narrow-to-page 'disabled nil) + (put 'narrow-to-region 'disabled nil) + + ;; we don't want the old buffer list! + (global-unset-key (kbd "C-x C-b")) + + ;; Put backups in /tmp where they belong + (setq backup-directory-alist + `((".*" . ,temporary-file-directory))) + (setq auto-save-file-name-transforms + `((".*" ,temporary-file-directory t))) + + ;; recursively copy by default + (setq dired-recursive-copies 'always) + + ;; y or n instead of yes or no + (fset 'yes-or-no-p 'y-or-n-p) + + ;; auto revert files + (global-auto-revert-mode t) + + ;; BACKUPS/LOCKFILES -------- + ;; Don't generate backups or lockfiles. + (setq create-lockfiles nil + make-backup-files nil + ;; But in case the user does enable it, some sensible defaults: + version-control t ; number each backup file + backup-by-copying t ; instead of renaming current file (clobbers links) + delete-old-versions t ; clean up after itself + kept-old-versions 5 + kept-new-versions 5 + backup-directory-alist (list (cons "." (concat user-emacs-directory "backup/")))) + + ;; Display the current time + (display-time-mode t) + + (setq visible-bell t) + + ;; font + (cond + ((string-equal (system-name) "archdesk") + (when (member "Hack" (font-family-list)) + (add-to-list 'default-frame-alist '(font . "Hack-14")))) + ((string-equal (system-name) "pop_os") + (when (member "Hack" (font-family-list)) + (add-to-list 'default-frame-alist '(font . "Hack-10"))))) + + (use-package gruber-darker-theme + :ensure t + :config + (load-theme 'gruber-darker t)) + + (setq display-line-numbers-type `relative) + (setq undo-limit 8000000) ; raise limit to 80Mb + (setq truncate-string-ellipsis "…") ; better than using dots + (setq scroll-preserve-screen-position 'always) ; experimental + (setq scroll-margin 3) ; bit of space + + + ;; calendar proper Monday start + (setq calendar-week-start-day 1) + (setq calendar-date-style (quote european)) + + ;; Handling tabs (for programming) + (setq-default tab-width 2) + (setq-default tab-width 2 indent-tabs-mode nil) + (setq-default indent-tabs-mode nil) + (setq js-indent-level 2) + (setq python-indent 2) + (setq css-indent-offset 2) + (add-hook 'sh-mode-hook + (lambda () + (setq sh-basic-offset 2 + sh-indentation 2))) + (setq web-mode-markup-indent-offset 2) + + ;; Highlight matching parens + (show-paren-mode t) + + ;; Stop C-z suspending emacs + (global-set-key (kbd "C-z") 'nil) + + ;; encoding + (prefer-coding-system 'utf-8) + (setq coding-system-for-read 'utf-8) + (setq coding-system-for-write 'utf-8) #+END_SRC * Packages ** yasnippet |