|
@@ -0,0 +1,165 @@
|
|
|
|
+;;; Packages
|
|
|
|
+;; Bootstrap Straight Package Manager
|
|
|
|
+(defvar bootstrap-version)
|
|
|
|
+(let ((bootstrap-file
|
|
|
|
+ (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
|
|
|
|
+ (bootstrap-version 5))
|
|
|
|
+ (unless (file-exists-p bootstrap-file)
|
|
|
|
+ (with-current-buffer
|
|
|
|
+ (url-retrieve-synchronously
|
|
|
|
+ "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
|
|
|
|
+ 'silent 'inhibit-cookies)
|
|
|
|
+ (goto-char (point-max))
|
|
|
|
+ (eval-print-last-sexp)))
|
|
|
|
+ (load bootstrap-file nil 'nomessage))
|
|
|
|
+
|
|
|
|
+;; packages to install and load
|
|
|
|
+(straight-use-package 'auto-complete)
|
|
|
|
+(straight-use-package '(nano-theme :type git :host github
|
|
|
|
+ :repo "rougier/nano-theme"))
|
|
|
|
+(straight-use-package
|
|
|
|
+ '(slime-company :type git :host github :repo "anwyn/slime-company"))
|
|
|
|
+(straight-use-package 'sublimity)
|
|
|
|
+(straight-use-package 'dashboard)
|
|
|
|
+(straight-use-package 'all-the-icons)
|
|
|
|
+(straight-use-package 'neotree)
|
|
|
|
+(straight-use-package 'rust-mode)
|
|
|
|
+(straight-use-package 'powerline)
|
|
|
|
+(straight-use-package 'markdown-mode)
|
|
|
|
+(straight-use-package 'moe-theme)
|
|
|
|
+(straight-use-package 'ample-theme)
|
|
|
|
+(straight-use-package 'slime)
|
|
|
|
+(straight-use-package 'ac-slime)
|
|
|
|
+(straight-use-package 'evil)
|
|
|
|
+(straight-use-package 'dimmer)
|
|
|
|
+(straight-use-package 'magit)
|
|
|
|
+(straight-use-package 'diff-hl)
|
|
|
|
+(straight-use-package 'powerline-evil)
|
|
|
|
+(straight-use-package 'rainbow-delimiters)
|
|
|
|
+
|
|
|
|
+(require 'rainbow-delimiters)
|
|
|
|
+(add-hook 'prog-mode-hook #'rainbow-delimiters-mode)
|
|
|
|
+
|
|
|
|
+;; Git stuff
|
|
|
|
+(require 'magit)
|
|
|
|
+(require 'diff-hl)
|
|
|
|
+(global-diff-hl-mode)
|
|
|
|
+(add-hook 'magit-pre-refresh-hook 'diff-hl-magit-pre-refresh)
|
|
|
|
+(add-hook 'magit-post-refresh-hook 'diff-hl-magit-post-refresh)
|
|
|
|
+(diff-hl-margin-mode t)
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+(require 'dimmer)
|
|
|
|
+(setq dimmer-fraction 0.4)
|
|
|
|
+(dimmer-mode t)
|
|
|
|
+
|
|
|
|
+;; always enable ido mode
|
|
|
|
+(require 'ido)
|
|
|
|
+(ido-mode t)
|
|
|
|
+
|
|
|
|
+(require 'evil)
|
|
|
|
+(evil-mode 1)
|
|
|
|
+
|
|
|
|
+;; Enable tab behavior like vi
|
|
|
|
+(straight-use-package '(evil-tabs :type git :host github
|
|
|
|
+ :repo "krisajenkins/evil-tabs"))
|
|
|
|
+(require 'evil-tabs)
|
|
|
|
+(global-evil-tabs-mode t)
|
|
|
|
+
|
|
|
|
+(require 'auto-complete)
|
|
|
|
+(global-auto-complete-mode t)
|
|
|
|
+
|
|
|
|
+(require 'slime)
|
|
|
|
+(require 'ac-slime)
|
|
|
|
+(slime-setup '(slime-fancy ac-slime))
|
|
|
|
+(add-hook 'slime-mode-hook 'set-up-slime-ac)
|
|
|
|
+(add-hook 'slime-repl-mode-hook 'set-up-slime-ac)
|
|
|
|
+(eval-after-load "auto-complete"
|
|
|
|
+ '(add-to-list 'ac-modes 'slime-repl-mode))
|
|
|
|
+
|
|
|
|
+(require 'markdown-mode)
|
|
|
|
+
|
|
|
|
+(require 'powerline)
|
|
|
|
+(powerline-default-theme)
|
|
|
|
+;; Better powerline support for evil mode
|
|
|
|
+(require 'powerline-evil)
|
|
|
|
+
|
|
|
|
+(require 'neotree)
|
|
|
|
+(global-set-key [f8] 'neotree-toggle)
|
|
|
|
+
|
|
|
|
+(require 'dashboard)
|
|
|
|
+(dashboard-setup-startup-hook)
|
|
|
|
+
|
|
|
|
+(require 'all-the-icons)
|
|
|
|
+
|
|
|
|
+(require 'sublimity)
|
|
|
|
+(require 'sublimity-scroll)
|
|
|
|
+(require 'sublimity-map) ;; experimental
|
|
|
|
+(require 'sublimity-attractive)
|
|
|
|
+(setq sublimity-scroll-weight 10
|
|
|
|
+ sublimity-scroll-drift-length 5)
|
|
|
|
+(setq sublimity-map-size 30)
|
|
|
|
+(setq sublimity-map-fraction 0.3)
|
|
|
|
+(setq sublimity-map-text-scale -5)
|
|
|
|
+(sublimity-map-set-delay nil)
|
|
|
|
+(setq sublimity-attractive-centering-width nil)
|
|
|
|
+
|
|
|
|
+(setq backup-directory-alist
|
|
|
|
+ `((".*" . ,temporary-file-directory)))
|
|
|
|
+(setq auto-save-file-name-transforms
|
|
|
|
+ `((".*" ,temporary-file-directory t)))
|
|
|
|
+
|
|
|
|
+;;; Generic options for all OSs
|
|
|
|
+; Smooth mouse scroll a bit
|
|
|
|
+(setq mouse-wheel-scroll-amount '(1 ((shift) . 1) ((control) . nil)))
|
|
|
|
+(setq mouse-wheel-progressive-speed nil)
|
|
|
|
+
|
|
|
|
+;; normal home/end behavior
|
|
|
|
+(global-set-key (kbd "<home>") 'beginning-of-line)
|
|
|
|
+(global-set-key (kbd "<end>") 'end-of-line)
|
|
|
|
+
|
|
|
|
+;;; erc config
|
|
|
|
+(setq erc-nick "speskk")
|
|
|
|
+
|
|
|
|
+;; Allow M-up / M-down behavior to switch windows
|
|
|
|
+(windmove-default-keybindings 'meta)
|
|
|
|
+
|
|
|
|
+(display-time-mode t)
|
|
|
|
+(display-line-numbers-mode t)
|
|
|
|
+
|
|
|
|
+;; Load for macOS
|
|
|
|
+;;; Slime/etc
|
|
|
|
+(if (eq system-type 'darwin)
|
|
|
|
+ (progn
|
|
|
|
+ (setq inferior-lisp-program "/opt/homebrew/bin/sbcl")
|
|
|
|
+ (load (expand-file-name "~/.local/opt/quicklisp/slime-helper.el"))
|
|
|
|
+ (load "/Users/swatson/.emacs.d/.erc-auth.el")
|
|
|
|
+ ;; Font/themes/etc
|
|
|
|
+ (load "/Users/swatson/Repos/dotfiles/emacs/mac-load/customs.el")
|
|
|
|
+
|
|
|
|
+ ;; Custom Commands
|
|
|
|
+ (defun connect-to-libera-erc () (interactive)
|
|
|
|
+ (erc :server "irc.libera.chat" :port "6667"
|
|
|
|
+ :nick "speskk" :password *libera-chat*))
|
|
|
|
+
|
|
|
|
+ ;; Easily set cua mode on/off so that I don't have to
|
|
|
|
+ ;; use shift+insert for paste on mac
|
|
|
|
+ (global-set-key (kbd "C-c c") 'cua-mode)
|
|
|
|
+ ;; Graphic Display
|
|
|
|
+ (if (display-graphic-p)
|
|
|
|
+ (progn
|
|
|
|
+ (load-theme 'nano t)
|
|
|
|
+ (nano-dark)))))
|
|
|
|
+
|
|
|
|
+;; Load for Windows10
|
|
|
|
+(if (eq system-type 'windows-nt)
|
|
|
|
+ (progn
|
|
|
|
+ (setq visible-bell 1)
|
|
|
|
+ (add-to-list 'default-frame-alist '(font . "Lucida Console" ))
|
|
|
|
+ (set-face-attribute 'default t :font "Lucida Console" )))
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+;; Load for Linux
|
|
|
|
+
|
|
|
|
+;; Load for Linux Term
|
|
|
|
+
|