Last active
February 2, 2022 15:40
-
-
Save subnut/13b7eeeb03d2fbfc49f4b942f3dc39e4 to your computer and use it in GitHub Desktop.
Emacs config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Required fonts - | |
| Name | Usage | URL | | |
|-------------+--------------------+-----------------------------------------------| | |
| Victor Mono | default | https://github.com/rubjo/victor-mono | | |
| Roboto Mono | fixed-pitch | https://fonts.google.com/specimen/Roboto+Mono | | |
| Bitter | variable-pitch | https://fonts.google.com/specimen/Bitter | | |
| Lobster Two | org-document-title | https://fonts.google.com/specimen/Lobster+Two | | |
" | |
;; Enable MELPA | |
(require 'package) | |
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) | |
(package-initialize) | |
;; Config | |
(show-paren-mode) | |
;; (dolist (face '(default fixed-pitch)) | |
;; (set-face-attribute `,face nil :font "Roboto Mono-13:weight=thin")) | |
;; (set-face-attribute 'default nil :family "Victor Mono" :height 120) | |
(set-face-attribute 'default nil :family "Fantasque Sans Mono" :height 135) | |
(setq-default | |
cursor-type 'bar ;; Default cursor | |
truncate-lines t ;; Disable line wrap | |
require-final-newline t ;; For POSIX-compliance | |
show-trailing-whitespace t ;; Show trailing whitespace | |
cursor-in-non-selected-windows nil ;; No cursor in inactive windows | |
) | |
(setq | |
initial-major-mode 'org-mode ;; Start in Org mode | |
ring-bell-function 'ignore ;; Disable audible bells | |
confirm-nonexistent-file-or-buffer t ;; Confirm before opening a new file | |
completion-styles '(basic substring) ;; Stolen from rougier's NΛNO emacs | |
) | |
;; Disable show-trailing-whitespace in Calendar | |
(add-hook 'calendar-hook (lambda() (setq show-trailing-whitespace nil))) | |
;; Minimalism | |
(tooltip-mode -1) ;; No tooltips | |
(tool-bar-mode -1) ;; Hide tool bar | |
(menu-bar-mode -1) ;; Hide menu bar | |
(scroll-bar-mode -1) ;; Hide scrollbar | |
(setq | |
use-dialog-box nil | |
use-file-dialog nil | |
inhibit-startup-screen t | |
initial-scratch-message nil | |
;; pop-up-windows nil | |
) | |
;; God mode | |
(god-mode) | |
(global-set-key (kbd "<escape>") #'god-mode) | |
(add-to-list 'god-exempt-major-modes 'org-mode) ;; Exempt Org files | |
;; Update cursor according to mode | |
(defun set-cursor() | |
(setq cursor-type | |
(if god-local-mode 'box | |
(if overwrite-mode 'hbar | |
(default-value 'cursor-type))))) | |
(add-hook 'god-mode-enabled-hook 'set-cursor) | |
(add-hook 'god-mode-disabled-hook 'set-cursor) | |
(add-hook 'overwrite-mode-hook 'set-cursor) | |
;; Org mode | |
(require 'org) | |
(require 'use-package) | |
(use-package org-appear :hook (org-mode . org-appear-mode)) | |
(setq | |
org-appear-autolinks t | |
org-appear-autoentities t | |
;; org-appear-autokeywords t | |
) | |
(use-package org-bullets :hook (org-mode . org-bullets-mode)) | |
;; (setq org-bullets-face-name 'org-bullets-face) | |
(defface org-bullets-face | |
'((default :inherit 'variable-pitch :bold t :height 0.8 :foreground "#DDD")) | |
"Face for bullets shown by org-bullets-bullet-face") | |
(setq | |
org-bullets-bullet-list '("" "• " "• " "• " "• " "• " "• " "• ")) | |
;; org-bullets-bullet-list '("• ")) | |
;; org-bullets-bullet-list '("")) | |
;; Pretty Org table | |
(progn | |
(add-to-list 'load-path "~/Projects/emacs/org-pretty-table") | |
(require 'org-pretty-table) | |
;; (add-hook 'orgtbl-mode-hook (lambda () (org-pretty-table-mode))) | |
(add-hook 'org-mode-hook (lambda () (org-pretty-table-mode)))) | |
(add-hook 'org-mode-hook | |
(lambda() | |
(variable-pitch-mode t) | |
(toggle-word-wrap t))) | |
(setq | |
org-startup-folded t | |
org-pretty-entities t | |
org-startup-indented t | |
;; org-startup-numerated t | |
org-startup-truncated nil | |
org-hide-leading-stars t | |
org-return-follows-link t | |
org-src-fontify-natively t | |
;; org-support-shift-select t | |
org-hide-emphasis-markers t | |
org-startup-with-inline-images t | |
org-fontify-quote-and-verse-blocks t | |
org-hidden-keywords '(author date email subtitle title) | |
) | |
(setq org-num-face 'org-num-face) | |
(defface org-num-face | |
'((default | |
:family "Iosevka Curly" | |
:foreground "#CCC" | |
:height 0.9 | |
:weight semi-bold)) | |
"Face for org-num-mode numbering") | |
(set-face-attribute 'variable-pitch nil :family "Bitter") | |
(set-face-attribute 'fixed-pitch nil :family "Roboto Mono") | |
(set-face-attribute 'org-table nil :inherit 'default) | |
(set-face-attribute 'org-block nil :inherit 'default) | |
(set-face-attribute 'org-document-title nil :family "Lobster Two") | |
;; (set-face-attribute 'variable-pitch nil :height 1.1) | |
;; (set-face-attribute 'fixed-pitch nil :height 0.9) | |
(set-face-attribute 'org-block nil :height 0.9) | |
(set-face-attribute 'org-document-info nil :height 0.9) | |
(set-face-attribute 'org-document-title nil :height 2.0) | |
(set-face-attribute 'org-block-begin-line nil :height 0.8) | |
(set-face-attribute 'org-quote nil :height 1.3) | |
(load-theme 'dichromacy) | |
(set-face-attribute 'org-table nil :foreground "#88A") | |
(set-face-attribute 'org-block nil :background "#F8F8F8") | |
(set-face-attribute 'org-document-info nil :foreground "#444") | |
(set-face-attribute 'org-document-title nil :foreground "black") | |
(set-face-attribute 'org-block-begin-line nil :foreground "#E8E8E8") | |
(set-face-attribute 'org-quote nil :inherit 'variable-pitch :slant 'italic :weight 'semi-light) | |
(set-face-attribute 'org-document-info nil :inherit 'variable-pitch) | |
(set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch) | |
(set-face-attribute 'org-block-begin-line nil :inherit 'fixed-pitch) | |
(set-face-attribute 'org-meta-line nil :inherit 'org-block-begin-line) | |
(set-face-attribute 'org-level-1 nil :inherit 'variable-pitch) | |
(set-face-attribute 'org-level-1 nil | |
:foreground "#004" | |
:height 1.8) | |
(set-face-attribute 'org-level-8 nil :inherit 'org-level-7) | |
(set-face-attribute 'org-level-7 nil :inherit 'org-level-6) | |
(set-face-attribute 'org-level-6 nil :inherit 'org-level-5) | |
(set-face-attribute 'org-level-5 nil :inherit 'org-level-4 :underline t) | |
(set-face-attribute 'org-level-4 nil :inherit 'org-level-3) | |
(set-face-attribute 'org-level-3 nil :inherit 'org-level-2) | |
(set-face-attribute 'org-level-2 nil :inherit 'org-level-1) | |
(set-face-attribute 'org-level-8 nil :height 0.9) | |
(set-face-attribute 'org-level-7 nil :height 0.9) | |
(set-face-attribute 'org-level-6 nil :height 0.9) | |
(set-face-attribute 'org-level-5 nil :height 0.9) | |
(set-face-attribute 'org-level-4 nil :height 0.9) | |
(set-face-attribute 'org-level-3 nil :height 0.9) | |
(set-face-attribute 'org-level-2 nil :height 0.9) | |
;; Increase size of LaTeX fragment previews in Org mode | |
(require 'org) ;; Otherwise org-format-latex options is nil | |
(plist-put org-format-latex-options :scale 4) | |
;; Added by Custom | |
(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. | |
) | |
(custom-set-variables | |
;; custom-set-variables 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. | |
'(package-selected-packages '(org-bullets org-appear use-package god-mode))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment