Browse Source

default.el: Cleanup pass

master
Johnathan C Maudlin 2 years ago
parent
commit
52dca8925f
No account linked to committer's email address
1 changed files with 49 additions and 64 deletions
  1. 49
    64
      etc/emacs/default.el

+ 49
- 64
etc/emacs/default.el View File

@@ -4,6 +4,18 @@
;;; Startup
;;;

;; Inhibit things
(when (fboundp 'menu-bar-mode) (menu-bar-mode -1))
(when (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))
(when (fboundp 'tool-bar-mode) (tool-bar-mode -1))
(setq initial-scratch-message nil
inhibit-splash-screen t
inhibit-startup-buffer-menu t)

;; Load theme and set font face
(load-theme 'tango-dark)
(set-face-attribute 'default nil :family "Monospace" :height 96)

;; Force using UTF-8
(setq prefer-coding-system 'utf-8
set-default-coding-systems 'utf-8
@@ -21,20 +33,6 @@
(setenv "SHELL" (getenv "SHELL"))
(setenv "TERM" (getenv "TERM"))

;; Inhibit
(setq initial-scratch-message nil
inhibit-splash-screen t
inhibit-startup-buffer-menu t)

;; Inhibit loading toolbars as early as possible
(when (fboundp 'menu-bar-mode) (menu-bar-mode -1))
(when (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))
(when (fboundp 'tool-bar-mode) (tool-bar-mode -1))

;; Load theme and set font face
(load-theme 'tango-dark)
(set-face-attribute 'default nil :family "Monospace" :height 96)

;; Misc
(setq custom-file "~/.emacs.d/custom.el"
require-final-newline t
@@ -178,10 +176,11 @@
(use-package linum
:demand t
:config
(setq linum-delay t)
(add-hook 'lisp-mode-hook 'linum-mode)
(add-hook 'prog-mode-hook 'linum-mode)
(add-hook 'text-mode-hook 'linum-mode))
(add-hook 'text-mode-hook 'linum-mode)
(setq linum-delay t)
(global-visual-line-mode t))

(use-package no-littering
:demand t
@@ -200,10 +199,8 @@
(add-hook 'text-mode-hook 'rainbow-delimiters-mode))

(use-package server
:demand t
:bind ("C-x C-c" . server-stop)
:config (unless (server-running-p)(server-start))

(defun server-kill()
"Delete current Emacs server, then kill Emacs"
(interactive)
@@ -230,12 +227,12 @@
(add-hook 'markdown-mode-hook 'smartparens-mode)
(add-hook 'prog-mode-hook 'smartparens-mode)
(add-hook 'text-mode-hook 'smartparens-mode)

(setq sp-highlight-pair-overlay nil
sp-highlight-wrap-overlay nil
sp-highlight-wrap-tag-overlay nil))

(use-package swiper
:demand t
:bind ("C-s" . swiper))

(use-package undo-tree
@@ -252,32 +249,6 @@

(use-package circe
:config
(load "lui-logging" nil t)
(enable-lui-logging-globally)

(if (file-exists-p "~/.emacs.d/circe.el")
(load-file "~/.emacs.d/circe.el"))

(require 'circe-chanop)
(enable-circe-color-nicks)
(setf (cdr (assoc 'continuation fringe-indicator-alist)) nil)

;; (if (file-directory-p "~/.emacs/var/circe")
;; nil
;; (make-directory "~/.emacs.d/var/circe"))

(setq circe-default-part-message ""
circe-default-quit-message ""
circe-format-server-topic "*** Topic: {userhost}: {topic-diff}"
circe-reduce-lurker-spam t
circe-use-cycle-completion t
lui-fill-type nil
lui-flyspell-alist '((".*" "american"))
lui-flyspell-p t
lui-logging-directory "~/.emacs.d/var/circe"
lui-time-stamp-format "%H:%M:%S"
lui-time-stamp-position 'left-margin)

(defun my-circe-message-option-chanserv (nick user host command args)
(when (and (string= "ChanServ" nick)
(string-match "^\\[#.+?\\]" (cadr args)))
@@ -293,7 +264,27 @@
(setq fringes-outside-margins t
left-margin-width 9
word-wrap t
wrap-prefix ""))))
wrap-prefix "")))

(setq circe-default-part-message ""
circe-default-quit-message ""
circe-format-server-topic "*** Topic: {userhost}: {topic-diff}"
circe-reduce-lurker-spam t
circe-use-cycle-completion t
lui-fill-type nil
lui-flyspell-alist '((".*" "american"))
lui-flyspell-p t
lui-logging-directory "~/.emacs.d/var/circe"
lui-time-stamp-format "%H:%M:%S"
lui-time-stamp-position 'left-margin)

(load "lui-logging" nil t)
(enable-lui-logging-globally)
(require 'circe-chanop)
(enable-circe-color-nicks)
(setf (cdr (assoc 'continuation fringe-indicator-alist)) nil)
(if (file-exists-p "~/.emacs.d/circe.el")
(load-file "~/.emacs.d/circe.el")))

(use-package elfeed
:bind ("C-x w" . elfeed)
@@ -304,7 +295,6 @@
(load-file "~/.emacs.d/elfeed.el")))

(use-package eshell
:demand t
:config
(setq eshell-cmpl-cycle-completions nil
eshell-error-if-no-glob t
@@ -336,7 +326,6 @@
(eshell 'N)))

(use-package eww
:demand t
:config
(setq browse-url-browser-function 'eww-browse-url
shr-blocked-images "")
@@ -371,7 +360,6 @@
(use-package ranger)

(use-package scratch
:demand t
:config
(defun scratch-new()
"Open a new scratch buffer."
@@ -384,12 +372,12 @@
;;; Development
;;;

;;
(global-set-key (kbd "C-c c") 'comment-or-uncomment-region)

;;
;; Delete trailing whitespace on save
(add-hook 'before-save-hook 'delete-trailing-whitespace)

;; Comment or uncomment a region
(global-set-key (kbd "C-c c") 'comment-or-uncomment-region)

;; Allow C and C++ modes to read .h headers
(add-hook 'c-mode-hook
(lambda()
@@ -409,21 +397,24 @@
tab-width 2
show-paren-delay 0)

(global-visual-line-mode t)
;;
(show-paren-mode t)
(fset 'yes-or-no-p 'y-or-n-p)

(use-package company
:demand t
:config
(add-hook 'lisp-mode-hook 'company-mode)
(add-hook 'prog-mode-hook 'company-mode)
(add-hook 'text-mode-hook 'company-mode)

(setq company-tooltip-limit 20
company-idle-delay 0.3
company-echo-delay 0
company-begin-commands '(self-insert-command)))

(use-package company-ansible
:after (company ansible-vault))

(use-package company-emoji
:after (company))

@@ -483,9 +474,8 @@
(setq highlight-indent-guides-method 'character))

(use-package irony
:demand t
:config
(setq irony-additional-clang-options '("-std=c++14"))

(add-hook 'c++-mode-hook 'irony-mode)
(add-hook 'c-mode-hook 'irony-mode)
(add-hook 'objc-mode-hook 'irony-mode)
@@ -499,11 +489,10 @@
(use-package realgud)

(use-package rtags
:init
:config
(add-hook 'c-mode-hook 'rtags-start-process-unless-running)
(add-hook 'c++-mode-hook 'rtags-start-process-unless-running)
(add-hook 'objc-mode-hook 'rtags-start-process-unless-running)
:config
(setq rtags-autostart-diagnostics t
rtags-completions-enabled t
rtags-display-result-backend 'ivy)
@@ -519,11 +508,7 @@
(use-package ahk-mode)
(use-package android-mode)
(use-package angular-mode)

(use-package ansible-vault)
(use-package company-ansible
:after (company ansible-vault))

(use-package apache-mode)
(use-package cmake-mode)
(use-package coffee-mode)
@@ -546,10 +531,10 @@
(lambda()
(setq tab-width 4
indent-tabs-mode 1)

(set (make-local-variable 'company-backends)
'(company-go))
(company-mode t))))

;; (use-package go-eldoc
;; :after (go-mode)
;; :config (add-hook 'go-mode-hook 'go-eldoc-setup))

Loading…
Cancel
Save