Skip to content

Instantly share code, notes, and snippets.

@smook1980
Created September 26, 2020 16:27
Show Gist options
  • Save smook1980/6ba29cea27385e9178523c128e4b10e7 to your computer and use it in GitHub Desktop.
Save smook1980/6ba29cea27385e9178523c128e4b10e7 to your computer and use it in GitHub Desktop.
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
;; Place your private configuration here! Remember, you do not need to run 'doom
;; sync' after modifying this file!
;; Some functionality uses this to identify you, e.g. GPG configuration, email
;; clients, file templates and snippets.
(setq user-full-name "Shane Mook"
user-mail-address "[email protected]")
;; Doom exposes five (optional) variables for controlling fonts in Doom. Here
;; are the three important ones:
;;
;; + `doom-font'
;; + `doom-variable-pitch-font'
;; + `doom-big-font' -- used for `doom-big-font-mode'; use this for
;; presentations or streaming.
;;
;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd
;; font string. You generally only need these two:
;; (setq doom-font (font-spec :family "monospace" :size 12 :weight 'semi-light)
;; doom-variable-pitch-font (font-spec :family "sans" :size 13))
;;
(setq doom-font (font-spec :family "Hack Nerd Font" :size 12)
doom-big-font (font-spec :family "Hack Nerd Font" :size 18)
;; doom-variable-pitch-font (font-spec :family "Overpass" :size 24)
doom-serif-font (font-spec :family "Menlo" :weight 'light))
;; There are two ways to load a theme. Both assume the theme is installed and
;; available. You can either set `doom-theme' or manually load a theme with the
;; `load-theme' function. This is the default:
;; (setq doom-theme 'doom-palenight)
(setq doom-theme 'doom-spacegrey)
;; If you use `org' and don't want your org files in the default location below,
;; change `org-directory'. It must be set before org loads!
(setq org-directory "~/org/")
;; This determines the style of line numbers in effect. If set to `nil', line
;; numbers are disabled. For relative line numbers, set this to `relative'.
(setq display-line-numbers-type 'relative)
;; Here are some additional functions/macros that could help you configure Doom:
;;
;; - `load!' for loading external *.el files relative to this one
;; - `use-package!' for configuring packages
;; - `after!' for running code after a package has loaded
;; - `add-load-path!' for adding directories to the `load-path', relative to
;; this file. Emacs searches the `load-path' when you load packages with
;; `require' or `use-package'.
;; - `map!' for binding new keys
;;
;; To get information about any of these functions/macros, move the cursor over
;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k').
;; This will open documentation for it, including demos of how they are used.
;;
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
;; they are implemented.
(setq-default
doom-localleader-key ","
delete-by-moving-to-trash t ; Delete files to tras
tab-width 2 ; Set width for tab
uniquify-buffer-name-style 'forward ; Uniquify buffer name
window-combination-resize t ; take new window space from all other windows (not just current
x-stretch-cursor t ; Stretch cursor to the glyph widt
undo-limit 80000000 ; Raise undo-limit to 80M
evil-want-fine-undo t ; By default while in insert all changes are one big blob. Be more granula
auto-save-default t ; Nobody likes to loose work, I certainly don'
inhibit-compacting-font-caches t ; When there are lots of glyphs, keep them in memor
truncate-string-ellipsis "…") ; Unicode ellispis are nicer than "...", and also save /precious/ spac
(delete-selection-mode 1) ; Replace selection when inserting text
(display-time-mode 1) ; Enable time in the mode-line
(unless (equal "Battery status not available"
(battery))
(display-battery-mode 1)) ; On laptops it's nice to know how much power you have
(global-subword-mode 1)
;; Start in full-screen
(if (eq initial-window-system 'x) ; if started by emacs command or desktop file
(toggle-frame-maximized)
(toggle-frame-fullscreen))
;; Move save of emacs customized settings to it's own file...
(setq-default custom-file (expand-file-name ".custom.el" doom-private-dir))
(when (file-exists-p custom-file)
(load custom-file))
;; Prompt for buffer to load into new window-split
(setq evil-vsplit-window-right t
evil-split-window-below t)
(defadvice! prompt-for-buffer (&rest _)
:after '(evil-window-split evil-window-vsplit)
(+ivy/switch-buffer))
(setq +ivy-buffer-preview t)
;; Set default window mode
;; (setq-default major-mode 'org-mode)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment