General cleanup

This commit is contained in:
Henrik Lissner 2016-05-26 18:51:39 -04:00
parent ef9b59197a
commit 82fa5d977a
11 changed files with 60 additions and 55 deletions

View File

@ -262,9 +262,9 @@
;; behave more like vim (or how I like it).
;; Line-wise mouse selection on margin
(global-set-key (kbd "<left-margin> <down-mouse-1>") 'doom/mouse-drag-line)
(global-set-key (kbd "<left-margin> <mouse-1>") 'doom/mouse-select-line)
(global-set-key (kbd "<left-margin> <drag-mouse-1>") 'doom/mouse-select-line)
(map! "<left-margin> <down-mouse-1>" 'doom/mouse-drag-line
"<left-margin> <mouse-1>" 'doom/mouse-select-line
"<left-margin> <drag-mouse-1>" 'doom/mouse-select-line)
;; Restores "dumb" indentation to the tab key. This rustles a lot of peoples'
;; jimmies, apparently, but it's how I like it.
@ -283,7 +283,7 @@
:i [remap backward-delete-char-untabify] 'doom/deflate-space-maybe
:i [remap newline] 'doom/newline-and-indent
;; Smarter move-to-beginning-of-line
:i [remap move-beginning-of-line] 'doom/move-to-bol
:i [remap move-beginning-of-line] 'doom/move-to-bol
;; Restore bash-esque keymaps in insert mode; C-w and C-a already exist
:i "C-e" 'doom/move-to-eol
:i "C-u" 'doom/backward-kill-to-bol-and-indent

View File

@ -159,7 +159,9 @@
(markdown-mode prog-mode scss-mode web-mode conf-mode)
'nlinum-mode)
(add-hook! 'nlinum-mode-hook
(add-hook 'post-command-hook 'doom|nlinum-hl-line nil t))
(if nlinum-mode-hook
(add-hook 'post-command-hook 'doom|nlinum-hl-line nil t)
(remove-hook 'post-command-hook 'doom|nlinum-hl-line t)))
:config
;; Calculate line number column width
(add-hook! nlinum-mode

View File

@ -13,7 +13,6 @@
;;
;;; Autoloaded functions are in {core,modules}/defuns/defuns-*.el
;; Paths
(defalias '! 'eval-when-compile)
(defconst doom-emacs-dir (! (expand-file-name user-emacs-directory)))
@ -28,6 +27,37 @@
emacs-major-version emacs-minor-version))
"Hostname and emacs-version-based elisp temp directories")
;;
;; Load path
;;
(defvar doom--load-path load-path
"Initial `load-path'; so we don't clobber it on consecutive reloads.")
;; Populate the load-path manually; cask shouldn't be an internal dependency
(setq load-path
(! (defsubst --subdirs (path &optional include-self)
(let ((result (if include-self (list path) (list))))
(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)
(--subdirs doom-modules-dir t)
(--subdirs doom-packages-dir)
(--subdirs (expand-file-name "../bootstrap" doom-packages-dir))
doom--load-path))
custom-theme-load-path
(! (append (list (expand-file-name "themes/" doom-private-dir))
custom-theme-load-path)))
;;
;; Core configuration
;;
;; UTF-8 please
(set-charset-priority 'unicode)
(setq locale-coding-system 'utf-8) ; pretty
@ -39,7 +69,7 @@
;; Premature optimization for faster startup
(setq-default gc-cons-threshold 4388608
gc-cons-percentage 0.4
gc-cons-percentage 0.3
major-mode 'text-mode)
;; stop package.el from being annoying. I rely solely on Cask.
@ -85,41 +115,13 @@
;;
;; Load path
;;
(defvar doom--load-path load-path
"Initial `load-path'; so we don't clobber it on consecutive reloads.")
;; Populate the load-path manually; cask shouldn't be an internal dependency
(setq load-path
(! (defsubst --subdirs (path &optional include-self)
(let ((result (if include-self (list path) (list))))
(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)
(--subdirs doom-modules-dir t)
(--subdirs doom-packages-dir)
(--subdirs (expand-file-name "../bootstrap" doom-packages-dir))
doom--load-path))
custom-theme-load-path
(! (append (list (expand-file-name "themes/" doom-private-dir))
custom-theme-load-path)))
;;
;; Libraries
;; Bootstrap
;;
(autoload 'use-package "use-package" "" nil 'macro)
(require 'f)
(require 'dash)
(require 's)
(autoload 'use-package "use-package" "" nil 'macro)
(require 'core-vars)
(require 'core-defuns)
(unless (require 'autoloads nil t)

View File

@ -71,7 +71,7 @@
module-php ; making php less painful to work with
module-processing ; pretty prototypes
module-python ; beautiful is better than ugly
module-rest ; GET /a/life?please=1&top=cherry
module-rest ; Emacs as a service
module-ruby ; 1.step do {|i| p "Ruby is #{i&1==0?'love':'life'}"}
module-rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
module-scala ; Java, but good

View File

@ -1,4 +1,4 @@
;;; module-csharp.el
;;; module-csharp.el --- -*- no-byte-compile: t; -*-
(use-package csharp-mode
:mode "\\.cs$"

View File

@ -1,4 +1,4 @@
;;; module-eshell.el
;;; module-eshell.el --- -*- no-byte-compile: t; -*-
(use-package eshell
:when IS-WINDOWS

View File

@ -1,4 +1,4 @@
;;; module-org.el
;;; module-org.el --- -*- no-byte-compile: t; -*-
(add-hook 'org-load-hook 'doom|org-init t)
(add-hook 'org-load-hook 'doom|org-keybinds t)

View File

@ -29,6 +29,7 @@
(use-package php-extras
:after php-mode
:init (add-hook 'php-mode-hook 'turn-on-eldoc-mode)
:config
(defun php-extras-company-setup ()) ;; company will set up itself
;; Generate php-extras documentation and completion asynchronously
@ -43,7 +44,7 @@
(use-package php-refactor-mode
:after php-mode
:init (add-hook! php-mode '(turn-on-eldoc-mode php-refactor-mode))
:init (add-hook 'php-mode-hook 'php-refactor-mode)
:config
(mapc (lambda (x)
(let ((command-name (car x))

View File

@ -1,4 +1,4 @@
henrik@lissner.net
henrik@lissner.net @lissner.net
----------------------------------------
========================================
////////////////////////////////////////

View File

@ -46,7 +46,7 @@
:m "M-8" (λ! (doom:switch-to-tab 7))
:m "M-9" (λ! (doom:switch-to-tab 8))
(:when IS-MAC
"<M-backspace>" 'doom/backward-kill-to-bol-and-indent
"<M-backspace>" 'doom/backward-kill-to-bol-and-indent
"<A-left>" 'backward-word
"<A-right>" 'forward-word
"A-SPC" 'just-one-space
@ -250,7 +250,7 @@
;; evil-matchit
:m "%" 'evilmi-jump-items
;; hide-show
;; hide-show/evil-matchit
:m [tab] (λ! (if (ignore-errors (hs-already-hidden-p))
(hs-toggle-hiding)
(call-interactively 'evilmi-jump-items)))
@ -310,14 +310,14 @@
;;; Insert mode hacks
;; Textmate-esque newlines
:i "<backspace>" 'backward-delete-char-untabify
:i "<M-backspace>" 'doom/backward-kill-to-bol-and-indent
:i "<C-return>" 'evil-ret-and-indent
:i "<backspace>" 'delete-backward-char
:i "<M-backspace>" 'doom/backward-kill-to-bol-and-indent
:i "<C-return>" 'evil-ret-and-indent
;; Emacsien motions for insert mode
:i "C-b" 'backward-word
:i "C-f" 'forward-word
;; escape from insert mode (more responsive than using key-chord-define)
:irv "C-g" 'evil-normal-state)
:irv "C-g" 'evil-normal-state)
;; Common unicode characters
(map! :i "A-o" (λ! (insert "ø"))

View File

@ -375,7 +375,7 @@
(--color-name-to-rgb color2))))
(custom-theme-set-variables
'doom-one
'doom-dark
`(vc-annotate-color-map
'((20 . ,green)
(40 . ,(--color-blend yellow green (/ 1.0 3)))
@ -390,11 +390,11 @@
(220 . ,(--color-blend red magenta (/ 1.0 3)))
(240 . ,(--color-blend red magenta (/ 2.0 3)))
(260 . ,red)
(280 . ,(--color-blend grey-l red (/ 1.0 4)))
(300 . ,(--color-blend grey-l red (/ 2.0 4)))
(320 . ,(--color-blend grey-l red (/ 3.0 4)))
(340 . ,grey-l)
(360 . ,grey-l)))
(280 . ,(--color-blend grey-2 red (/ 1.0 4)))
(300 . ,(--color-blend grey-2 red (/ 2.0 4)))
(320 . ,(--color-blend grey-2 red (/ 3.0 4)))
(340 . ,grey-2)
(360 . ,grey-2)))
`(vc-annotate-very-old-color nil)
`(vc-annotate-background ,black)))