| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164 |
- ;; Requires:
- ;; aspell - Spell checking
- ;; xclip - Copy/Paste
- ;; Optional:
- ;; gocode - Go auto complete
- ;; Enable loading my custom config files
- ;; Added by Package.el. This must come before configurations of
- ;; installed packages. Don't delete this line. If you don't want it,
- ;; just comment it out by adding a semicolon to the start of the line.
- ;; You may delete these explanatory comments.
- (package-initialize)
- (add-to-list 'load-path "~/.emacs.d/configs/")
- ;; ----------- Default Variables -----------
- ;; Global variables
- (defvar backup-directory (concat user-emacs-directory "backups"))
- (unless (file-exists-p backup-directory)
- (make-directory backup-directory))
- (setq-default inhibit-startup-screen t
- column-number-mode t
- scroll-error-top-bottom t
- show-paren-delay 0.25
- tab-width 4
- indent-tabs-mode nil
- backup-directory-alist `(("." . ,backup-directory))
- delete-old-versions t)
- ;; (global-linum-mode)
- ;; Delete selected text when typing (normal editor behavior)
- (delete-selection-mode t)
- ;; ------------- Keybindings -------------
- (require 'smart-home)
- (global-set-key (kbd "C-c /") 'comment-or-uncomment-region)
- (global-set-key (kbd "C-c C-k") 'compile)
- (global-set-key (kbd "M-<left>") 'backward-list)
- (global-set-key (kbd "M-<right>") 'forward-list)
- (global-set-key (kbd "M-<up>") 'racket-backward-up-list)
- ;; Can't seem to find forward-down-list.
- ;; Not very important since I would rarely use it anyway
- ;;(global-set-key (kbd "M-<down>") '?)
- (global-set-key (kbd "M-<delete>") 'kill-sexp)
- ;; ----------- Package Managing -----------
- (require 'package-loader)
- ;; ---------- Color Themes ----------
- ;; TODO: Fix warning underline to always be orange/yellow
- ;; Update: Seems it always takes the color of the foreground.
- ;; Also seems to ignore most properties. (e.g. overline, underline,
- ;; strike-though, etc.) Maybe it's an xterm problem?
- (use-package color-theme
- :config
- (color-theme-initialize)
- (load-theme 'Thomas-Experiement t))
- ;; ---------- Use X11 clipboard -----------
- (use-package xclip
- :if (executable-find "xclip")
- :init
- (add-to-list 'load-path "~/.emacs.d/elpa/xclip-1.4/")
- :config
- (xclip-mode 1))
- ;; --------- Parentheses Matching ---------
- (show-paren-mode)
- (use-package highlight-parentheses
- :init
- (define-globalized-minor-mode global-highlight-parentheses-mode
- highlight-parentheses-mode
- (lambda ()
- (highlight-parentheses-mode t)))
- :config
- (global-highlight-parentheses-mode t))
- ;; Use built-in pairing if available.
- ;; Otherwise install substitute
- (if (version<= "24.4" emacs-version)
- (electric-pair-mode)
- (use-package autopair
- :config
- (autopair-global-mode)))
- ;; ------------ xTerm Mouse ------------
- ;; Disable because it became annoying, sounds cool though.
- (use-package mouse
- :disabled
- :config
- (xterm-mouse-mode t))
- ;; ---------- Auto-complete -----------
- (use-package company
- :init
- (add-hook 'after-init-hook 'global-company-mode)
- :config
- (setq
- company-minimum-prefix-length 2
- ;; company-idle-delay nil
- ;; company-show-numbers t
- ;; company-tooltip-limit 20
- ;; company-dabbrev-downcase nil
- )
- ;; :bind ("C-;" . company-complete-common)
- )
- ;; ---------- Syntax Checking -----------
- (use-package flycheck
- :config
- (setq flycheck-check-syntax-automatically '(mode-enabled idle-change save)))
- ;; ----------- Scala Mode -----------
- (require 'scala)
- ;; ------------ Web Mode ------------
- (require 'web)
- ;; ------------ Git Mode ------------
- ;; TODO: make resolving merge conflicts hotkeys not use "^"
- ;; TODO: Conflict resolution theme is unreadable
- (when (version<= "24.4" emacs-version)
- (use-package magit
- :bind ("C-x g" . magit-status)))
- ;; ----------- Rust Mode ------------
- (require 'rust)
- ;; ----------- Go Mode -------------
- (require 'go)
- ;; ----------- i3 Support ----------
- (use-package i3wm
- :disabled
- :if (equal (getenv "DESKTOP_SESSION") "i3"))
- ;; --------- Racket Mode ----------
- (use-package racket-mode)
- ;; ---------- C# Mode -------------
- (use-package csharp-mode
- :if (version<= "24.4" emacs-version))
- ;; ------- Markdown Mode ----------
- (when (version<= "24.4" emacs-version)
- (use-package markdown-mode))
- ;; ---- StackOverflow Client ------
- (require 'stackoverflow)
- ;; -------- Spellcheck ------------
- (require 'spellcheck)
- ;; -------- REST Client ---------
- (require 'rest-client)
- ;; ------- Highlight TODO -------
- (require 'todo)
- ;; ---- Printer Integration -----
- (require 'printer)
|