General cleanup

This commit is contained in:
Henrik Lissner 2016-05-24 22:15:44 -04:00
parent 2052fbba1c
commit 185ba75292
18 changed files with 793 additions and 704 deletions

View file

@ -27,7 +27,6 @@
;; NOTE: Doesn't look pretty outside of emacs-mac
(use-package company-quickhelp
:when (featurep 'mac)
:after company
:config (company-quickhelp-mode +1))

View file

@ -12,21 +12,22 @@
(setq shackle-rules
`(;; Util
("^\\*.+-Profiler-Report .+\\*$" :align below :size 0.3 :regexp t)
("*esup*" :align below :size 30 :noselect t)
("*minor-modes*" :align below :size 0.5 :noselect t)
("*esup*" :align below :size 30 :noselect t)
("*minor-modes*" :align below :size 0.5 :noselect t)
;; Emacs
("*Apropos*" :align below :size 0.3)
("*Backtrace*" :align below :size 25 :noselect t)
("*Completions*" :align below :size 20 :noselect t)
("*Help*" :align below :size 16 :select t)
("*Messages*" :align below :size 15 :select t)
("*Warnings*" :align below :size 10 :noselect t)
(compilation-mode :align below :size 15 :noselect t)
(eww-mode :align below :size 30 :select t)
("*Pp Eval Output*" :align below :size 0.3)
("*Apropos*" :align below :size 0.3)
("*Backtrace*" :align below :size 25 :noselect t)
("*Completions*" :align below :size 20 :noselect t)
("*Help*" :align below :size 16 :select t)
("*Messages*" :align below :size 15 :select t)
("*Warnings*" :align below :size 10 :noselect t)
(compilation-mode :align below :size 15 :noselect t)
(eww-mode :align below :size 30 :select t)
;; vcs
("*vc-diff*" :align below :size 15 :noselect t)
("*vc-change-log*" :align below :size 15 :select t)
(vc-annotate-mode :same t)))
("*vc-diff*" :align below :size 15 :noselect t)
("*vc-change-log*" :align below :size 15 :select t)
(vc-annotate-mode :same t)))
(defvar doom-popup-windows '()
"A list of windows that have been opened via shackle. Do not touch this!")

View file

@ -1,13 +1,13 @@
;;; core-ui.el --- interface & mode-line config
(defconst doom-fringe-size 3 "Default fringe width")
(defconst doom-fringe-size '3 "Default fringe width")
;; y/n instead of yes/no
(fset 'yes-or-no-p 'y-or-n-p)
(setq-default
indicate-buffer-boundaries nil ; don't show where buffer starts/ends
indicate-empty-lines nil ; show empty lines
indicate-empty-lines nil ; don't show empty lines
fringes-outside-margins t ; switches order of fringe and margin
;; Keep cursors and highlights in current window only
cursor-in-non-selected-windows nil
@ -52,6 +52,7 @@
(set-frame-font doom-default-font t)
(set-face-attribute 'default t :font doom-current-font)
;; standardize fringe width
(fringe-mode doom-fringe-size)
(push `(left-fringe . ,doom-fringe-size) default-frame-alist)
(push `(right-fringe . ,doom-fringe-size) default-frame-alist)
;; Default frame size on startup

View file

@ -44,8 +44,6 @@ automatically renamed to the project name.")
wg-list-display-decor-previous-left ""
wg-list-display-decor-previous-right "")
(add-hook 'emacs-startup-hook 'workgroups-mode)
:config
;; Remember fixed workgroup names between sessions
(push 'doom-wg-names savehist-additional-variables)
@ -72,7 +70,11 @@ automatically renamed to the project name.")
(defalias 'doom:switch-to-tab 'doom:switch-to-workgroup-at-index)
(defalias 'doom:switch-to-tab-left 'wg-switch-to-workgroup-left)
(defalias 'doom:switch-to-tab-right 'wg-switch-to-workgroup-right)
(defalias 'doom:switch-to-tab-last 'wg-switch-to-previous-workgroup))
(defalias 'doom:switch-to-tab-last 'wg-switch-to-previous-workgroup)
(add-hook! emacs-startup
(workgroups-mode +1)
(wg-create-workgroup wg-first-wg-name)))
(provide 'core-workgroups)
;;; core-workgroups.el ends here

View file

@ -9,7 +9,7 @@
;; doom|... A hook
;; doom*... An advising function
;; doom.... Custom prefix commands
;; ...! Macro or shortcut alias
;; ...! Macro, shortcut alias or subst defun
;;
;;; Autoloaded functions are in {core,modules}/defuns/defuns-*.el
@ -93,11 +93,12 @@
;; Populate the load-path manually; cask shouldn't be an internal dependency
(setq load-path
(! (defun --subdirs (path &optional include-self)
(! (defsubst --subdirs (path &optional include-self)
(let ((result (if include-self (list path) (list))))
(dolist (file (ignore-errors (directory-files path t "^[^.]" t)))
(when (file-directory-p file)
(push file result)))
(mapc (lambda (file)
(when (file-directory-p file)
(push file result)))
(ignore-errors (directory-files path t "^[^.]" t)))
result))
(append (list doom-private-dir)
(--subdirs doom-core-dir t)

View file

@ -51,5 +51,12 @@
(evil-visual-state)
(evil-goto-mark ?\]))
;;;###autoload
(defun doom/delete-forward-word ()
"Delete the word in front of the cursor."
(interactive)
(evil-forward-word)
(evil-delete-backward-word))
(provide 'defuns-editor)
;;; defuns-editor.el ends here

View file

@ -181,5 +181,11 @@ spaces on either side of the point if so. Resorts to
(align-regexp beg end
(concat "\\(\\s-*\\)" (rxt-pcre-to-elisp regexp)) 1 1)))
;;;###autoload
(defun doom/static-reindent ()
"Reindent without moving cursor."
(interactive)
(save-excursion (call-interactively 'evil-indent)))
(provide 'defuns-whitespace)
;;; defuns-whitespace.el ends here