about summary refs log tree commit diff
path: root/tools/emacs/init/settings.el
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-12-14T11·31+0000
committerVincent Ambo <tazjin@google.com>2019-12-14T11·31+0000
commitb938d716ff20d6d9f093626db1ac0d0d3f97976e (patch)
tree335dab321bdbb2159d776fdf6ad33cfb6714a0c9 /tools/emacs/init/settings.el
parent00129e06b2b4968a2e988c177c8d6650120aa278 (diff)
parent15c61c0beebeb2d9645ac7cd3736d21fe286dd3a (diff)
merge(emacs): Merge (unrelated) emacs.d history into tools/emacs r/129
Diffstat (limited to 'tools/emacs/init/settings.el')
-rw-r--r--tools/emacs/init/settings.el65
1 files changed, 65 insertions, 0 deletions
diff --git a/tools/emacs/init/settings.el b/tools/emacs/init/settings.el
new file mode 100644
index 000000000000..2e4dedc0a535
--- /dev/null
+++ b/tools/emacs/init/settings.el
@@ -0,0 +1,65 @@
+(require 'prescient)
+(require 'ivy-prescient)
+(require 'uniquify)
+(require 'ivy-pass)
+
+;; Make ivy go!
+(ivy-mode 1)
+(counsel-mode 1)
+
+(setq ivy-use-virtual-buffers t)
+(setq enable-recursive-minibuffers t)
+
+;; Enable support for prescient in ivy & configure it
+(ivy-prescient-mode)
+(prescient-persist-mode)
+(add-to-list 'ivy-prescient-excluded-commands 'counsel-rg)
+
+;; Move files to trash when deleting
+(setq delete-by-moving-to-trash t)
+
+;; We don't live in the 80s, but we're also not a shitty web app.
+(setq gc-cons-threshold 20000000)
+
+(setq uniquify-buffer-name-style 'forward)
+
+; Fix some defaults
+(setq visible-bell nil
+      inhibit-startup-message t
+      color-theme-is-global t
+      sentence-end-double-space nil
+      shift-select-mode nil
+      uniquify-buffer-name-style 'forward
+      whitespace-style '(face trailing lines-tail tabs)
+      whitespace-line-column 80
+      default-directory "~"
+      fill-column 80
+      ediff-split-window-function 'split-window-horizontally)
+
+(add-to-list 'safe-local-variable-values '(lexical-binding . t))
+(add-to-list 'safe-local-variable-values '(whitespace-line-column . 80))
+
+(set-default 'indent-tabs-mode nil)
+
+;; UTF-8 please
+(setq locale-coding-system 'utf-8) ; pretty
+(set-terminal-coding-system 'utf-8) ; pretty
+(set-keyboard-coding-system 'utf-8) ; pretty
+(set-selection-coding-system 'utf-8) ; please
+(prefer-coding-system 'utf-8) ; with sugar on top
+
+;; Make emacs behave sanely (overwrite selected text)
+(delete-selection-mode 1)
+
+;; Keep your temporary files in tmp, emacs!
+(setq auto-save-file-name-transforms
+      `((".*" ,temporary-file-directory t)))
+(setq backup-directory-alist
+      `((".*" . ,temporary-file-directory)))
+
+(remove-hook 'kill-buffer-query-functions 'server-kill-buffer-query-function)
+
+;; Show time in 24h format
+(setq display-time-24hr-format t)
+
+(provide 'settings)