General cleanup
This commit is contained in:
parent
ef9b59197a
commit
82fa5d977a
11 changed files with 60 additions and 55 deletions
|
@ -262,9 +262,9 @@
|
||||||
;; behave more like vim (or how I like it).
|
;; behave more like vim (or how I like it).
|
||||||
|
|
||||||
;; Line-wise mouse selection on margin
|
;; Line-wise mouse selection on margin
|
||||||
(global-set-key (kbd "<left-margin> <down-mouse-1>") 'doom/mouse-drag-line)
|
(map! "<left-margin> <down-mouse-1>" 'doom/mouse-drag-line
|
||||||
(global-set-key (kbd "<left-margin> <mouse-1>") 'doom/mouse-select-line)
|
"<left-margin> <mouse-1>" 'doom/mouse-select-line
|
||||||
(global-set-key (kbd "<left-margin> <drag-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'
|
;; Restores "dumb" indentation to the tab key. This rustles a lot of peoples'
|
||||||
;; jimmies, apparently, but it's how I like it.
|
;; 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 backward-delete-char-untabify] 'doom/deflate-space-maybe
|
||||||
:i [remap newline] 'doom/newline-and-indent
|
:i [remap newline] 'doom/newline-and-indent
|
||||||
;; Smarter move-to-beginning-of-line
|
;; 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
|
;; Restore bash-esque keymaps in insert mode; C-w and C-a already exist
|
||||||
:i "C-e" 'doom/move-to-eol
|
:i "C-e" 'doom/move-to-eol
|
||||||
:i "C-u" 'doom/backward-kill-to-bol-and-indent
|
:i "C-u" 'doom/backward-kill-to-bol-and-indent
|
||||||
|
|
|
@ -159,7 +159,9 @@
|
||||||
(markdown-mode prog-mode scss-mode web-mode conf-mode)
|
(markdown-mode prog-mode scss-mode web-mode conf-mode)
|
||||||
'nlinum-mode)
|
'nlinum-mode)
|
||||||
(add-hook! 'nlinum-mode-hook
|
(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
|
:config
|
||||||
;; Calculate line number column width
|
;; Calculate line number column width
|
||||||
(add-hook! nlinum-mode
|
(add-hook! nlinum-mode
|
||||||
|
|
66
core/core.el
66
core/core.el
|
@ -13,7 +13,6 @@
|
||||||
;;
|
;;
|
||||||
;;; Autoloaded functions are in {core,modules}/defuns/defuns-*.el
|
;;; Autoloaded functions are in {core,modules}/defuns/defuns-*.el
|
||||||
|
|
||||||
;; Paths
|
|
||||||
(defalias '! 'eval-when-compile)
|
(defalias '! 'eval-when-compile)
|
||||||
|
|
||||||
(defconst doom-emacs-dir (! (expand-file-name user-emacs-directory)))
|
(defconst doom-emacs-dir (! (expand-file-name user-emacs-directory)))
|
||||||
|
@ -28,6 +27,37 @@
|
||||||
emacs-major-version emacs-minor-version))
|
emacs-major-version emacs-minor-version))
|
||||||
"Hostname and emacs-version-based elisp temp directories")
|
"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
|
;; UTF-8 please
|
||||||
(set-charset-priority 'unicode)
|
(set-charset-priority 'unicode)
|
||||||
(setq locale-coding-system 'utf-8) ; pretty
|
(setq locale-coding-system 'utf-8) ; pretty
|
||||||
|
@ -39,7 +69,7 @@
|
||||||
|
|
||||||
;; Premature optimization for faster startup
|
;; Premature optimization for faster startup
|
||||||
(setq-default gc-cons-threshold 4388608
|
(setq-default gc-cons-threshold 4388608
|
||||||
gc-cons-percentage 0.4
|
gc-cons-percentage 0.3
|
||||||
major-mode 'text-mode)
|
major-mode 'text-mode)
|
||||||
|
|
||||||
;; stop package.el from being annoying. I rely solely on Cask.
|
;; stop package.el from being annoying. I rely solely on Cask.
|
||||||
|
@ -85,41 +115,13 @@
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;; Load path
|
;; Bootstrap
|
||||||
;;
|
|
||||||
|
|
||||||
(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
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
(autoload 'use-package "use-package" "" nil 'macro)
|
||||||
(require 'f)
|
(require 'f)
|
||||||
(require 'dash)
|
(require 'dash)
|
||||||
(require 's)
|
(require 's)
|
||||||
|
|
||||||
(autoload 'use-package "use-package" "" nil 'macro)
|
|
||||||
(require 'core-vars)
|
(require 'core-vars)
|
||||||
(require 'core-defuns)
|
(require 'core-defuns)
|
||||||
(unless (require 'autoloads nil t)
|
(unless (require 'autoloads nil t)
|
||||||
|
|
2
init.el
2
init.el
|
@ -71,7 +71,7 @@
|
||||||
module-php ; making php less painful to work with
|
module-php ; making php less painful to work with
|
||||||
module-processing ; pretty prototypes
|
module-processing ; pretty prototypes
|
||||||
module-python ; beautiful is better than ugly
|
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-ruby ; 1.step do {|i| p "Ruby is #{i&1==0?'love':'life'}"}
|
||||||
module-rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
|
module-rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
|
||||||
module-scala ; Java, but good
|
module-scala ; Java, but good
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
;;; module-csharp.el
|
;;; module-csharp.el --- -*- no-byte-compile: t; -*-
|
||||||
|
|
||||||
(use-package csharp-mode
|
(use-package csharp-mode
|
||||||
:mode "\\.cs$"
|
:mode "\\.cs$"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
;;; module-eshell.el
|
;;; module-eshell.el --- -*- no-byte-compile: t; -*-
|
||||||
|
|
||||||
(use-package eshell
|
(use-package eshell
|
||||||
:when IS-WINDOWS
|
:when IS-WINDOWS
|
||||||
|
|
|
@ -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-init t)
|
||||||
(add-hook 'org-load-hook 'doom|org-keybinds t)
|
(add-hook 'org-load-hook 'doom|org-keybinds t)
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
|
|
||||||
(use-package php-extras
|
(use-package php-extras
|
||||||
:after php-mode
|
:after php-mode
|
||||||
|
:init (add-hook 'php-mode-hook 'turn-on-eldoc-mode)
|
||||||
:config
|
:config
|
||||||
(defun php-extras-company-setup ()) ;; company will set up itself
|
(defun php-extras-company-setup ()) ;; company will set up itself
|
||||||
;; Generate php-extras documentation and completion asynchronously
|
;; Generate php-extras documentation and completion asynchronously
|
||||||
|
@ -43,7 +44,7 @@
|
||||||
|
|
||||||
(use-package php-refactor-mode
|
(use-package php-refactor-mode
|
||||||
:after php-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
|
:config
|
||||||
(mapc (lambda (x)
|
(mapc (lambda (x)
|
||||||
(let ((command-name (car x))
|
(let ((command-name (car x))
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
henrik@lissner.net
|
henrik@lissner.net @lissner.net
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
========================================
|
========================================
|
||||||
////////////////////////////////////////
|
////////////////////////////////////////
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
:m "M-8" (λ! (doom:switch-to-tab 7))
|
:m "M-8" (λ! (doom:switch-to-tab 7))
|
||||||
:m "M-9" (λ! (doom:switch-to-tab 8))
|
:m "M-9" (λ! (doom:switch-to-tab 8))
|
||||||
(:when IS-MAC
|
(: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-left>" 'backward-word
|
||||||
"<A-right>" 'forward-word
|
"<A-right>" 'forward-word
|
||||||
"A-SPC" 'just-one-space
|
"A-SPC" 'just-one-space
|
||||||
|
@ -250,7 +250,7 @@
|
||||||
;; evil-matchit
|
;; evil-matchit
|
||||||
:m "%" 'evilmi-jump-items
|
:m "%" 'evilmi-jump-items
|
||||||
|
|
||||||
;; hide-show
|
;; hide-show/evil-matchit
|
||||||
:m [tab] (λ! (if (ignore-errors (hs-already-hidden-p))
|
:m [tab] (λ! (if (ignore-errors (hs-already-hidden-p))
|
||||||
(hs-toggle-hiding)
|
(hs-toggle-hiding)
|
||||||
(call-interactively 'evilmi-jump-items)))
|
(call-interactively 'evilmi-jump-items)))
|
||||||
|
@ -310,14 +310,14 @@
|
||||||
|
|
||||||
;;; Insert mode hacks
|
;;; Insert mode hacks
|
||||||
;; Textmate-esque newlines
|
;; Textmate-esque newlines
|
||||||
:i "<backspace>" 'backward-delete-char-untabify
|
:i "<backspace>" 'delete-backward-char
|
||||||
:i "<M-backspace>" 'doom/backward-kill-to-bol-and-indent
|
:i "<M-backspace>" 'doom/backward-kill-to-bol-and-indent
|
||||||
:i "<C-return>" 'evil-ret-and-indent
|
:i "<C-return>" 'evil-ret-and-indent
|
||||||
;; Emacsien motions for insert mode
|
;; Emacsien motions for insert mode
|
||||||
:i "C-b" 'backward-word
|
:i "C-b" 'backward-word
|
||||||
:i "C-f" 'forward-word
|
:i "C-f" 'forward-word
|
||||||
;; escape from insert mode (more responsive than using key-chord-define)
|
;; 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
|
;; Common unicode characters
|
||||||
(map! :i "A-o" (λ! (insert "ø"))
|
(map! :i "A-o" (λ! (insert "ø"))
|
||||||
|
|
|
@ -375,7 +375,7 @@
|
||||||
(--color-name-to-rgb color2))))
|
(--color-name-to-rgb color2))))
|
||||||
|
|
||||||
(custom-theme-set-variables
|
(custom-theme-set-variables
|
||||||
'doom-one
|
'doom-dark
|
||||||
`(vc-annotate-color-map
|
`(vc-annotate-color-map
|
||||||
'((20 . ,green)
|
'((20 . ,green)
|
||||||
(40 . ,(--color-blend yellow green (/ 1.0 3)))
|
(40 . ,(--color-blend yellow green (/ 1.0 3)))
|
||||||
|
@ -390,11 +390,11 @@
|
||||||
(220 . ,(--color-blend red magenta (/ 1.0 3)))
|
(220 . ,(--color-blend red magenta (/ 1.0 3)))
|
||||||
(240 . ,(--color-blend red magenta (/ 2.0 3)))
|
(240 . ,(--color-blend red magenta (/ 2.0 3)))
|
||||||
(260 . ,red)
|
(260 . ,red)
|
||||||
(280 . ,(--color-blend grey-l red (/ 1.0 4)))
|
(280 . ,(--color-blend grey-2 red (/ 1.0 4)))
|
||||||
(300 . ,(--color-blend grey-l red (/ 2.0 4)))
|
(300 . ,(--color-blend grey-2 red (/ 2.0 4)))
|
||||||
(320 . ,(--color-blend grey-l red (/ 3.0 4)))
|
(320 . ,(--color-blend grey-2 red (/ 3.0 4)))
|
||||||
(340 . ,grey-l)
|
(340 . ,grey-2)
|
||||||
(360 . ,grey-l)))
|
(360 . ,grey-2)))
|
||||||
`(vc-annotate-very-old-color nil)
|
`(vc-annotate-very-old-color nil)
|
||||||
`(vc-annotate-background ,black)))
|
`(vc-annotate-background ,black)))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue