General cleanup
This commit is contained in:
parent
eb9defe2e7
commit
42e6b0913d
18 changed files with 164 additions and 162 deletions
14
Cask
14
Cask
|
@ -21,6 +21,7 @@
|
||||||
|
|
||||||
;; OSX --- core/core-os-osx.el
|
;; OSX --- core/core-os-osx.el
|
||||||
(depends-on "dash-at-point")
|
(depends-on "dash-at-point")
|
||||||
|
(depends-on "applescript-mode")
|
||||||
(depends-on "exec-path-from-shell")
|
(depends-on "exec-path-from-shell")
|
||||||
(depends-on "openwith")
|
(depends-on "openwith")
|
||||||
|
|
||||||
|
@ -119,11 +120,6 @@
|
||||||
|
|
||||||
|
|
||||||
;;;; MODULES ;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;; MODULES ;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; Apple -- modules/module-apple.el
|
|
||||||
(depends-on "applescript-mode")
|
|
||||||
(depends-on "swift-mode")
|
|
||||||
(depends-on "company-sourcekit")
|
|
||||||
|
|
||||||
;; C/C++ -- modules/module-cc.el
|
;; C/C++ -- modules/module-cc.el
|
||||||
(depends-on "cmake-mode")
|
(depends-on "cmake-mode")
|
||||||
(depends-on "company-irony")
|
(depends-on "company-irony")
|
||||||
|
@ -191,6 +187,7 @@
|
||||||
;; Lisp -- modules/module-lisp.el
|
;; Lisp -- modules/module-lisp.el
|
||||||
(depends-on "highlight-quoted")
|
(depends-on "highlight-quoted")
|
||||||
(depends-on "slime")
|
(depends-on "slime")
|
||||||
|
(depends-on "auto-compile")
|
||||||
|
|
||||||
;; Lua -- modules/module-lua.el
|
;; Lua -- modules/module-lua.el
|
||||||
(depends-on "company-lua")
|
(depends-on "company-lua")
|
||||||
|
@ -235,6 +232,10 @@
|
||||||
;; Shell -- modules/module-sh.el
|
;; Shell -- modules/module-sh.el
|
||||||
(depends-on "company-shell" :git "https://github.com/Alexander-Miller/company-shell")
|
(depends-on "company-shell" :git "https://github.com/Alexander-Miller/company-shell")
|
||||||
|
|
||||||
|
;; Swift -- modules/module-swift.el
|
||||||
|
(depends-on "swift-mode")
|
||||||
|
(depends-on "company-sourcekit")
|
||||||
|
|
||||||
;; Text modes -- modules/module-text.el
|
;; Text modes -- modules/module-text.el
|
||||||
(depends-on "markdown-mode")
|
(depends-on "markdown-mode")
|
||||||
(depends-on "markdown-toc")
|
(depends-on "markdown-toc")
|
||||||
|
@ -247,13 +248,12 @@
|
||||||
(depends-on "pug-mode" :git "https://github.com/hlissner/pug-mode")
|
(depends-on "pug-mode" :git "https://github.com/hlissner/pug-mode")
|
||||||
|
|
||||||
|
|
||||||
;;;; ORGANIZATIONAL/WRITING ;;;;;;;;;;;;
|
;;;; Experimental ;;;;;;;;;;;;
|
||||||
;; Org -- modules/module-org.el
|
;; Org -- modules/module-org.el
|
||||||
(depends-on "org-plus-contrib")
|
(depends-on "org-plus-contrib")
|
||||||
(depends-on "org-bullets")
|
(depends-on "org-bullets")
|
||||||
(depends-on "ob-go" :git "https://github.com/pope/ob-go")
|
(depends-on "ob-go" :git "https://github.com/pope/ob-go")
|
||||||
(depends-on "ob-http")
|
(depends-on "ob-http")
|
||||||
|
|
||||||
;; Org Notebook -- modules/module-org-notebook.el
|
;; Org Notebook -- modules/module-org-notebook.el
|
||||||
(depends-on "org-download")
|
(depends-on "org-download")
|
||||||
(depends-on "ox-pandoc")
|
(depends-on "ox-pandoc")
|
||||||
|
|
66
bootstrap.el
66
bootstrap.el
|
@ -1,42 +1,40 @@
|
||||||
;;; bootstrap.el
|
;;; bootstrap.el
|
||||||
(eval-when-compile (require 'cl-lib))
|
|
||||||
|
|
||||||
|
(defalias '! 'eval-when-compile)
|
||||||
|
;; For benchmarking
|
||||||
|
(defconst emacs-start-time (current-time))
|
||||||
|
(defconst emacs-end-time nil)
|
||||||
;; Global constants
|
;; Global constants
|
||||||
(eval-and-compile
|
(defconst doom-default-theme 'wombat)
|
||||||
(defconst emacs-start-time (current-time))
|
(defconst doom-terminal-theme 'wombat)
|
||||||
(defconst emacs-end-time nil)
|
(defconst doom-default-font nil)
|
||||||
|
|
||||||
(defconst doom-default-theme 'wombat)
|
(defconst doom-emacs-dir (! (expand-file-name "." user-emacs-directory)))
|
||||||
(defconst doom-terminal-theme 'wombat)
|
(defconst doom-core-dir (! (concat doom-emacs-dir "/core")))
|
||||||
(defconst doom-default-font nil)
|
(defconst doom-modules-dir (! (concat doom-emacs-dir "/modules")))
|
||||||
|
(defconst doom-private-dir (! (concat doom-emacs-dir "/private")))
|
||||||
(defconst doom-emacs-dir (expand-file-name "." user-emacs-directory))
|
(defconst doom-packages-dir (! (concat doom-emacs-dir "/.cask/" emacs-version "/elpa")))
|
||||||
(defconst doom-core-dir (concat doom-emacs-dir "/core"))
|
(defconst doom-script-dir (! (concat doom-emacs-dir "/scripts")))
|
||||||
(defconst doom-modules-dir (concat doom-emacs-dir "/modules"))
|
(defconst doom-ext-dir (! (concat doom-emacs-dir "/ext")))
|
||||||
(defconst doom-private-dir (concat doom-emacs-dir "/private"))
|
(defconst doom-snippet-dirs (! (list (concat doom-private-dir "/snippets")
|
||||||
(defconst doom-packages-dir (concat doom-emacs-dir "/.cask/" emacs-version "/elpa"))
|
(concat doom-private-dir "/templates"))))
|
||||||
(defconst doom-script-dir (concat doom-emacs-dir "/scripts"))
|
;; Hostname and emacs version-based elisp temp directories
|
||||||
(defconst doom-ext-dir (concat doom-emacs-dir "/ext"))
|
(defconst doom-temp-dir (! (format "%s/cache/%s/%s.%s"
|
||||||
(defconst doom-snippet-dirs (list (concat doom-private-dir "/snippets")
|
|
||||||
(concat doom-private-dir "/templates")))
|
|
||||||
;; Hostname and emacs version-based elisp temp directories
|
|
||||||
(defconst doom-temp-dir (format "%s/cache/%s/%s.%s"
|
|
||||||
doom-private-dir (system-name)
|
doom-private-dir (system-name)
|
||||||
emacs-major-version emacs-minor-version))
|
emacs-major-version emacs-minor-version)))
|
||||||
|
|
||||||
(defconst IS-MAC (eq system-type 'darwin))
|
(defconst IS-MAC (! (eq system-type 'darwin)))
|
||||||
(defconst IS-LINUX (eq system-type 'gnu/linux))
|
(defconst IS-LINUX (! (eq system-type 'gnu/linux)))
|
||||||
(defconst IS-WINDOWS (eq system-type 'windows-nt)))
|
(defconst IS-WINDOWS (! (eq system-type 'windows-nt)))
|
||||||
|
|
||||||
(eval-when-compile
|
(defvar doom--load-path load-path)
|
||||||
(defvar doom--load-path load-path)
|
;; Helper for traversing subdirectories recursively
|
||||||
;; Helper for traversing subdirectories recursively
|
(defun --subdirs (path &optional include-self)
|
||||||
(defun --subdirs (path &optional include-self)
|
|
||||||
(let ((result (if include-self (list path) (list))))
|
(let ((result (if include-self (list path) (list))))
|
||||||
(dolist (file (ignore-errors (directory-files path t "^[^.]" t)))
|
(dolist (file (ignore-errors (directory-files path t "^[^.]" t)))
|
||||||
(when (file-directory-p file)
|
(when (file-directory-p file)
|
||||||
(push file result)))
|
(push file result)))
|
||||||
result)))
|
result))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
@ -57,16 +55,15 @@
|
||||||
file-name-handler-alist)
|
file-name-handler-alist)
|
||||||
;; Scan various folders to populate the load-paths
|
;; Scan various folders to populate the load-paths
|
||||||
(setq load-path
|
(setq load-path
|
||||||
(eval-when-compile
|
(! (append (list doom-private-dir)
|
||||||
(append (list doom-private-dir)
|
|
||||||
(--subdirs doom-core-dir t)
|
(--subdirs doom-core-dir t)
|
||||||
(--subdirs doom-modules-dir t)
|
(--subdirs doom-modules-dir t)
|
||||||
(--subdirs doom-packages-dir)
|
(--subdirs doom-packages-dir)
|
||||||
(--subdirs (expand-file-name "../bootstrap" doom-packages-dir))
|
(--subdirs (expand-file-name "../bootstrap" doom-packages-dir))
|
||||||
doom--load-path))
|
doom--load-path))
|
||||||
custom-theme-load-path
|
custom-theme-load-path
|
||||||
(append (list (expand-file-name "themes/" doom-private-dir))
|
(! (append (list (expand-file-name "themes/" doom-private-dir))
|
||||||
custom-theme-load-path))
|
custom-theme-load-path)))
|
||||||
|
|
||||||
(load "~/.emacs.local.el" t t)
|
(load "~/.emacs.local.el" t t)
|
||||||
(setq doom-current-theme (if (display-graphic-p) doom-default-theme doom-terminal-theme)
|
(setq doom-current-theme (if (display-graphic-p) doom-default-theme doom-terminal-theme)
|
||||||
|
@ -75,6 +72,9 @@
|
||||||
(when (display-graphic-p)
|
(when (display-graphic-p)
|
||||||
(require 'server)
|
(require 'server)
|
||||||
(unless (server-running-p)
|
(unless (server-running-p)
|
||||||
(server-start)))))
|
(server-start)))
|
||||||
|
;; Prevent any auto-displayed text + benchmarking
|
||||||
|
(advice-add 'display-startup-echo-area-message :override 'ignore)
|
||||||
|
(message "")))
|
||||||
|
|
||||||
;;; bootstrap.el ends here
|
;;; bootstrap.el ends here
|
||||||
|
|
|
@ -53,9 +53,7 @@
|
||||||
;; A simpler prompt: see `helm-global-prompt'
|
;; A simpler prompt: see `helm-global-prompt'
|
||||||
(advice-add 'helm :filter-args 'doom*helm-replace-prompt)
|
(advice-add 'helm :filter-args 'doom*helm-replace-prompt)
|
||||||
;; Hide mode-line in helm windows
|
;; Hide mode-line in helm windows
|
||||||
(advice-add 'helm-display-mode-line :override 'doom*helm-hide-header)
|
(advice-add 'helm-display-mode-line :override 'doom*helm-hide-header))
|
||||||
|
|
||||||
(after! yasnippet (push 'helm-alive-p yas-dont-activate)))
|
|
||||||
|
|
||||||
(use-package helm-mode
|
(use-package helm-mode
|
||||||
:after helm
|
:after helm
|
||||||
|
|
|
@ -8,15 +8,13 @@
|
||||||
;; Prefixes: Command = M, Alt = A
|
;; Prefixes: Command = M, Alt = A
|
||||||
mac-command-modifier 'meta
|
mac-command-modifier 'meta
|
||||||
mac-option-modifier 'alt
|
mac-option-modifier 'alt
|
||||||
|
|
||||||
;; sane trackpad/mouse scroll settings
|
;; sane trackpad/mouse scroll settings
|
||||||
mac-redisplay-dont-reset-vscroll t
|
mac-redisplay-dont-reset-vscroll t
|
||||||
mac-mouse-wheel-smooth-scroll nil
|
mac-mouse-wheel-smooth-scroll nil
|
||||||
mouse-wheel-scroll-amount '(5 ((shift) . 2)) ; one line at a time
|
mouse-wheel-scroll-amount '(5 ((shift) . 2)) ; one line at a time
|
||||||
mouse-wheel-progressive-speed nil ; don't accelerate scrolling
|
mouse-wheel-progressive-speed nil ; don't accelerate scrolling
|
||||||
|
|
||||||
;;; NOTE Meaningless to railwaycat's emacs-mac build
|
|
||||||
;; Curse Lion and its sudden but inevitable fullscreen mode!
|
;; Curse Lion and its sudden but inevitable fullscreen mode!
|
||||||
|
;; NOTE Meaningless to railwaycat's emacs-mac build
|
||||||
ns-use-native-fullscreen nil
|
ns-use-native-fullscreen nil
|
||||||
;; Don't open files from the workspace in a new frame
|
;; Don't open files from the workspace in a new frame
|
||||||
ns-pop-up-frames nil)
|
ns-pop-up-frames nil)
|
||||||
|
@ -55,6 +53,14 @@
|
||||||
(defmacro def-docset! (mode docset)
|
(defmacro def-docset! (mode docset)
|
||||||
`(add-hook! ,mode (setq-local dash-at-point-docset ,docset))))
|
`(add-hook! ,mode (setq-local dash-at-point-docset ,docset))))
|
||||||
|
|
||||||
|
(use-package applescript-mode :mode "\\.applescript$")
|
||||||
|
|
||||||
|
(def-project-type! lb6 "lb6"
|
||||||
|
:match "\\.lb\\(action\\|ext\\)/.+$"
|
||||||
|
:build (lambda ()
|
||||||
|
(awhen (f-traverse-upwards (lambda (f) (f-ext? f "lbaction")))
|
||||||
|
(shell-command (format "open '%s'" it)))))
|
||||||
|
|
||||||
(after! evil
|
(after! evil
|
||||||
;; On OSX, stop copying each visual state move to the clipboard:
|
;; On OSX, stop copying each visual state move to the clipboard:
|
||||||
;; https://bitbucket.org/lyro/evil/issue/336/osx-visual-state-copies-the-region-on
|
;; https://bitbucket.org/lyro/evil/issue/336/osx-visual-state-copies-the-region-on
|
||||||
|
|
54
core/core-vars.el
Normal file
54
core/core-vars.el
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
;;; core-vars.el
|
||||||
|
|
||||||
|
(defcustom doom-unreal-buffers
|
||||||
|
'("^ ?\\*.+" image-mode dired-mode reb-mode messages-buffer-mode
|
||||||
|
tabulated-list-mode comint-mode magit-mode)
|
||||||
|
"A list of regexps or modes whose buffers are considered unreal, and will be
|
||||||
|
ignored when using `doom:next-real-buffer' and `doom:previous-real-buffer' (or
|
||||||
|
killed by `doom/kill-unreal-buffers', or after `doom/kill-real-buffer')."
|
||||||
|
:group 'doom
|
||||||
|
:type '(repeat (choice (regexp :tag "Buffer name regexps")
|
||||||
|
(symbol :tag "Major mode"))))
|
||||||
|
|
||||||
|
(defcustom doom-ignore-buffers
|
||||||
|
'("*Completions*" "*Compile-Log*" "*inferior-lisp*" "*Fuzzy Completions*"
|
||||||
|
"*Apropos*" "*Help*" "*cvs*" "*Buffer List*" "*Ibuffer*" "*NeoTree*"
|
||||||
|
"*NeoTree*" "*esh command on file*" "*WoMan-Log*" "*compilation*"
|
||||||
|
"*use-package*" "*quickrun*" "*eclim: problems*" "*Flycheck errors*"
|
||||||
|
"*popwin-dummy*"
|
||||||
|
;; Helm
|
||||||
|
"*helm*" "*helm recentf*" "*helm projectile*" "*helm imenu*"
|
||||||
|
"*helm company*" "*helm buffers*" "*Helm Css SCSS*" "*helm-ag*"
|
||||||
|
"*helm-ag-edit*" "*Helm Swoop*" "*helm M-x*" "*helm mini*"
|
||||||
|
"*Helm Completions*" "*Helm Find Files*" "*helm mu*" "*helm mu contacts*"
|
||||||
|
"*helm-mode-describe-variable*" "*helm-mode-describe-function*"
|
||||||
|
;; Org
|
||||||
|
"*Org todo*" "*Org Links*" "*Agenda Commands*")
|
||||||
|
"List of buffer names to ignore when using `winner-undo', or `winner-redo'"
|
||||||
|
:group 'doom
|
||||||
|
:type '(repeat string))
|
||||||
|
|
||||||
|
(defcustom doom-cleanup-processes-alist
|
||||||
|
'(("pry" . ruby-mode)
|
||||||
|
("irb" . ruby-mode)
|
||||||
|
("ipython" . python-mode))
|
||||||
|
"An alist of (process-name . major-mode), that `doom:cleanup-processes' checks
|
||||||
|
before killing processes. If there are no buffers with matching major-modes, it
|
||||||
|
gets killed."
|
||||||
|
:group 'doom
|
||||||
|
:type '(repeat (cons (string :tag "Process name")
|
||||||
|
(symbol :tag "Associated major mode"))))
|
||||||
|
|
||||||
|
(defcustom doom-project-root-files
|
||||||
|
'(".git" ".hg" ".svn" ".project" "local.properties" "project.properties"
|
||||||
|
"rebar.config" "project.clj" "SConstruct" "pom.xml" "build.sbt"
|
||||||
|
"build.gradle" "Gemfile" "requirements.txt" "tox.ini" "package.json"
|
||||||
|
"gulpfile.js" "Gruntfile.js" "bower.json" "composer.json" "Cargo.toml"
|
||||||
|
"mix.exs")
|
||||||
|
"A list of files that count as 'project files', which determine whether a
|
||||||
|
folder is the root of a project or not."
|
||||||
|
:group 'doom
|
||||||
|
:type '(repeat string))
|
||||||
|
|
||||||
|
(provide 'core-vars)
|
||||||
|
;;; core-vars.el ends here
|
|
@ -43,7 +43,9 @@
|
||||||
;; Strip out whitespace before a line selection
|
;; Strip out whitespace before a line selection
|
||||||
(add-hook 'yas-before-expand-snippet-hook 'doom|yas-before-expand)
|
(add-hook 'yas-before-expand-snippet-hook 'doom|yas-before-expand)
|
||||||
;; Fix previous hook persisting yas-selected-text between expansions
|
;; Fix previous hook persisting yas-selected-text between expansions
|
||||||
(add-hook 'yas-after-exit-snippet-hook 'doom|yas-after-expand))
|
(add-hook 'yas-after-exit-snippet-hook 'doom|yas-after-expand)
|
||||||
|
;; Suppress yasnippet with helm
|
||||||
|
(after! helm (push 'helm-alive-p yas-dont-activate)))
|
||||||
|
|
||||||
(use-package auto-yasnippet
|
(use-package auto-yasnippet
|
||||||
:commands (aya-create aya-expand aya-open-line aya-persist-snippet)
|
:commands (aya-create aya-expand aya-open-line aya-persist-snippet)
|
||||||
|
|
76
core/core.el
76
core/core.el
|
@ -14,12 +14,12 @@
|
||||||
;;; Autoloaded functions are in {core,modules}/defuns/defuns-*.el
|
;;; Autoloaded functions are in {core,modules}/defuns/defuns-*.el
|
||||||
|
|
||||||
;; UTF-8 please
|
;; UTF-8 please
|
||||||
|
(set-charset-priority 'unicode)
|
||||||
(setq locale-coding-system 'utf-8) ; pretty
|
(setq locale-coding-system 'utf-8) ; pretty
|
||||||
(set-terminal-coding-system 'utf-8) ; pretty
|
(set-terminal-coding-system 'utf-8) ; pretty
|
||||||
(set-keyboard-coding-system 'utf-8) ; pretty
|
(set-keyboard-coding-system 'utf-8) ; pretty
|
||||||
(set-selection-coding-system 'utf-8) ; please
|
(set-selection-coding-system 'utf-8) ; please
|
||||||
(prefer-coding-system 'utf-8) ; with sugar on top
|
(prefer-coding-system 'utf-8) ; with sugar on top
|
||||||
(set-charset-priority 'unicode)
|
|
||||||
(setq default-process-coding-system '(utf-8-unix . utf-8-unix))
|
(setq default-process-coding-system '(utf-8-unix . utf-8-unix))
|
||||||
|
|
||||||
(setq-default major-mode 'text-mode)
|
(setq-default major-mode 'text-mode)
|
||||||
|
@ -43,7 +43,6 @@
|
||||||
ediff-window-setup-function 'ediff-setup-windows-plain ; no extra frames
|
ediff-window-setup-function 'ediff-setup-windows-plain ; no extra frames
|
||||||
enable-recursive-minibuffers nil ; no minibufferception
|
enable-recursive-minibuffers nil ; no minibufferception
|
||||||
idle-update-delay 2 ; update a little less often
|
idle-update-delay 2 ; update a little less often
|
||||||
inhibit-startup-echo-area-message "hlissner" ; username shuts up emacs
|
|
||||||
ring-bell-function 'ignore ; silence of the bells!
|
ring-bell-function 'ignore ; silence of the bells!
|
||||||
save-interprogram-paste-before-kill nil
|
save-interprogram-paste-before-kill nil
|
||||||
sentence-end-double-space nil
|
sentence-end-double-space nil
|
||||||
|
@ -67,63 +66,25 @@
|
||||||
undo-tree-history-directory-alist `(("." . ,(concat doom-temp-dir "/undo/"))))
|
undo-tree-history-directory-alist `(("." . ,(concat doom-temp-dir "/undo/"))))
|
||||||
|
|
||||||
|
|
||||||
;;
|
|
||||||
;; Variables
|
|
||||||
;;
|
|
||||||
|
|
||||||
(defvar doom-unreal-buffers
|
|
||||||
'("^ ?\\*.+\\*" image-mode dired-mode reb-mode messages-buffer-mode)
|
|
||||||
"A list of regexps or modes whose buffers are considered unreal, and will be
|
|
||||||
ignored when using `doom:next-real-buffer' and `doom:previous-real-buffer' (or
|
|
||||||
killed by `doom/kill-unreal-buffers', or after `doom/kill-real-buffer').")
|
|
||||||
|
|
||||||
(defvar doom-ignore-buffers
|
|
||||||
'("*Completions*" "*Compile-Log*" "*inferior-lisp*" "*Fuzzy Completions*"
|
|
||||||
"*Apropos*" "*Help*" "*cvs*" "*Buffer List*" "*Ibuffer*" "*NeoTree*"
|
|
||||||
"*NeoTree*" "*esh command on file*" "*WoMan-Log*" "*compilation*"
|
|
||||||
"*use-package*" "*quickrun*" "*eclim: problems*" "*Flycheck errors*"
|
|
||||||
"*popwin-dummy*"
|
|
||||||
;; Helm
|
|
||||||
"*helm*" "*helm recentf*" "*helm projectile*" "*helm imenu*"
|
|
||||||
"*helm company*" "*helm buffers*" "*Helm Css SCSS*" "*helm-ag*"
|
|
||||||
"*helm-ag-edit*" "*Helm Swoop*" "*helm M-x*" "*helm mini*"
|
|
||||||
"*Helm Completions*" "*Helm Find Files*" "*helm mu*" "*helm mu contacts*"
|
|
||||||
"*helm-mode-describe-variable*" "*helm-mode-describe-function*"
|
|
||||||
;; Org
|
|
||||||
"*Org todo*" "*Org Links*" "*Agenda Commands*")
|
|
||||||
"List of buffer names to ignore when using `winner-undo', or `winner-redo'")
|
|
||||||
|
|
||||||
(defvar doom-cleanup-processes-alist
|
|
||||||
'(("pry" . ruby-mode)
|
|
||||||
("irb" . ruby-mode)
|
|
||||||
("ipython" . python-mode))
|
|
||||||
"An alist of (process-name . major-mode), that `doom:cleanup-processes' checks
|
|
||||||
before killing processes. If there are no buffers with matching major-modes, it
|
|
||||||
gets killed.")
|
|
||||||
|
|
||||||
(defvar doom-project-root-files
|
|
||||||
'(".git" ".hg" ".svn" ".project" "local.properties" "project.properties"
|
|
||||||
"rebar.config" "project.clj" "SConstruct" "pom.xml" "build.sbt"
|
|
||||||
"build.gradle" "Gemfile" "requirements.txt" "tox.ini" "package.json"
|
|
||||||
"gulpfile.js" "Gruntfile.js" "bower.json" "composer.json" "Cargo.toml"
|
|
||||||
"mix.exs")
|
|
||||||
"A list of files that count as 'project files', which determine whether a
|
|
||||||
folder is the root of a project or not.")
|
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;; Libraries
|
;; Libraries
|
||||||
;;
|
;;
|
||||||
|
|
||||||
(require 'f)
|
(defgroup doom nil
|
||||||
(require 'dash)
|
"Emacs for the stubborn martian vimmer."
|
||||||
(require 's)
|
:prefix "doom")
|
||||||
|
|
||||||
(require 'core-defuns)
|
(eval-and-compile
|
||||||
(unless (require 'autoloads nil t)
|
(require 'f)
|
||||||
|
(require 'dash)
|
||||||
|
(require 's)
|
||||||
|
|
||||||
|
(require 'core-vars)
|
||||||
|
(require 'core-defuns)
|
||||||
|
(unless (require 'autoloads nil t)
|
||||||
(doom-reload-autoloads)
|
(doom-reload-autoloads)
|
||||||
(unless (require 'autoloads nil t)
|
(unless (require 'autoloads nil t)
|
||||||
(error "Autoloads couldn't be loaded or generated!")))
|
(error "Autoloads couldn't be loaded or generated!"))))
|
||||||
|
|
||||||
(autoload 'use-package "use-package" "" nil 'macro)
|
(autoload 'use-package "use-package" "" nil 'macro)
|
||||||
|
|
||||||
|
@ -182,17 +143,12 @@ enable multiple minor modes for the same regexp.")
|
||||||
|
|
||||||
(add-hook 'find-file-hook 'doom|enable-minor-mode-maybe)
|
(add-hook 'find-file-hook 'doom|enable-minor-mode-maybe)
|
||||||
|
|
||||||
(add-hook! after-init
|
;;
|
||||||
|
(add-hook! emacs-startup
|
||||||
;; We add this to `after-init-hook' to allow errors to stop it
|
;; We add this to `after-init-hook' to allow errors to stop it
|
||||||
(defadvice save-buffers-kill-emacs (around no-query-kill-emacs activate)
|
(defadvice save-buffers-kill-emacs (around no-query-kill-emacs activate)
|
||||||
"Prevent annoying \"Active processes exist\" query when you quit Emacs."
|
"Prevent annoying \"Active processes exist\" query when you quit Emacs."
|
||||||
(cl-flet ((process-list ())) ad-do-it))
|
(cl-flet ((process-list ())) ad-do-it)))
|
||||||
|
|
||||||
;; Prevent any auto-displayed text...
|
|
||||||
(advice-add 'display-startup-echo-area-message :override 'ignore)
|
|
||||||
(setq emacs-end-time (float-time (time-subtract (current-time) emacs-start-time)))
|
|
||||||
(doom-mode-init)
|
|
||||||
(message ""))
|
|
||||||
|
|
||||||
(provide 'core)
|
(provide 'core)
|
||||||
;;; core.el ends here
|
;;; core.el ends here
|
||||||
|
|
|
@ -171,7 +171,7 @@ left, create a scratch buffer."
|
||||||
(if (or (= realc 0)
|
(if (or (= realc 0)
|
||||||
(and (= realc 1) (eq (car real-buffers) (current-buffer))))
|
(and (= realc 1) (eq (car real-buffers) (current-buffer))))
|
||||||
(progn
|
(progn
|
||||||
(doom|update-scratch-buffer-cwd)
|
(doom|update-scratch-buffer)
|
||||||
(switch-to-buffer doom-buffer-name)
|
(switch-to-buffer doom-buffer-name)
|
||||||
(message "Nowhere to go"))
|
(message "Nowhere to go"))
|
||||||
(funcall move-func)
|
(funcall move-func)
|
||||||
|
@ -179,7 +179,7 @@ left, create a scratch buffer."
|
||||||
(let ((current-buffer (current-buffer)))
|
(let ((current-buffer (current-buffer)))
|
||||||
(cond ((or (eq current-buffer start-buffer)
|
(cond ((or (eq current-buffer start-buffer)
|
||||||
(>= i max))
|
(>= i max))
|
||||||
(doom|update-scratch-buffer-cwd)
|
(doom|update-scratch-buffer)
|
||||||
(switch-to-buffer doom-buffer-name)
|
(switch-to-buffer doom-buffer-name)
|
||||||
(setq continue nil))
|
(setq continue nil))
|
||||||
((not (memq current-buffer real-buffers))
|
((not (memq current-buffer real-buffers))
|
||||||
|
@ -251,9 +251,9 @@ buffers regardless of project."
|
||||||
(interactive "<!><a>")
|
(interactive "<!><a>")
|
||||||
(doom-kill-buffers (doom/get-matching-buffers pattern (doom/get-buffers (not bang)))))
|
(doom-kill-buffers (doom/get-matching-buffers pattern (doom/get-buffers (not bang)))))
|
||||||
|
|
||||||
;;;###autoload (autoload 'doom:send-to-scratch-or-org "defuns-buffers" nil t)
|
;;;###autoload (autoload 'doom:scratch-or-org "defuns-buffers" nil t)
|
||||||
(evil-define-operator doom:send-to-scratch-or-org (&optional beg end bang)
|
(evil-define-operator doom:scratch-or-org (&optional beg end bang)
|
||||||
"Send a selection to the scratch buffer. If BANG, then send it to org-capture instead."
|
"Send a selection to the scratch buffer. If BANG, use org-capture instead."
|
||||||
:move-point nil
|
:move-point nil
|
||||||
:type inclusive
|
:type inclusive
|
||||||
(interactive "<r><!>")
|
(interactive "<r><!>")
|
||||||
|
@ -267,11 +267,10 @@ buffers regardless of project."
|
||||||
(buffer-name doom-buffer-name))
|
(buffer-name doom-buffer-name))
|
||||||
(doom/popup-buffer buffer-name)
|
(doom/popup-buffer buffer-name)
|
||||||
(with-current-buffer buffer-name
|
(with-current-buffer buffer-name
|
||||||
(when project-dir
|
(erase-buffer)
|
||||||
(cd project-dir))
|
(doom|update-scratch-buffer)
|
||||||
(if text (insert text))
|
(if text (insert text))
|
||||||
(funcall mode))
|
(funcall mode))))))
|
||||||
))))
|
|
||||||
|
|
||||||
;;;###autoload (autoload 'doom:cd "defuns-buffers" nil t)
|
;;;###autoload (autoload 'doom:cd "defuns-buffers" nil t)
|
||||||
(evil-define-command doom:cd (dir)
|
(evil-define-command doom:cd (dir)
|
||||||
|
@ -284,7 +283,7 @@ buffers regardless of project."
|
||||||
(defun doom/kill-all-buffers-do-not-remember ()
|
(defun doom/kill-all-buffers-do-not-remember ()
|
||||||
"Kill all buffers so that workgroups2 will wipe its current session."
|
"Kill all buffers so that workgroups2 will wipe its current session."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((confirm-kill-emacs nil))
|
(let (confirm-kill-emacs)
|
||||||
(mapc 'kill-buffer (doom/get-buffers))
|
(mapc 'kill-buffer (doom/get-buffers))
|
||||||
(kill-this-buffer)
|
(kill-this-buffer)
|
||||||
(delete-other-windows)
|
(delete-other-windows)
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
;;; defuns-git.el
|
;;; defuns-git.el
|
||||||
|
|
||||||
;;;### (autoload 'doom:git-remote-browse "defuns-git" nil t)
|
;;;###autoload (autoload 'doom:git-remote-browse "defuns-git" nil t)
|
||||||
(evil-define-command doom:git-remote-browse (&optional bang)
|
(evil-define-command doom:git-remote-browse (&optional bang)
|
||||||
"Open the website for the current (or specified) version controlled FILE. If BANG,
|
"Open the website for the current (or specified) version controlled FILE. If
|
||||||
then use hub to do it."
|
BANG, then use hub to do it."
|
||||||
(interactive "<!>")
|
(interactive "<!>")
|
||||||
(let (url)
|
(let (url)
|
||||||
(condition-case err
|
(condition-case err
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
(defun doom/wg-projectile-switch-project ()
|
(defun doom/wg-projectile-switch-project ()
|
||||||
(let ((project-root (doom/project-root)))
|
(let ((project-root (doom/project-root)))
|
||||||
(doom:workgroup-new nil (file-name-nondirectory (directory-file-name project-root)) t)
|
(doom:workgroup-new nil (file-name-nondirectory (directory-file-name project-root)) t)
|
||||||
(doom|update-scratch-buffer-cwd project-root)
|
(doom|update-scratch-buffer project-root)
|
||||||
(when (featurep 'neotree)
|
(when (featurep 'neotree)
|
||||||
(neotree-projectile-action))))
|
(neotree-projectile-action))))
|
||||||
|
|
||||||
|
|
1
init.el
1
init.el
|
@ -29,7 +29,6 @@
|
||||||
;;; License: MIT
|
;;; License: MIT
|
||||||
|
|
||||||
(load (concat user-emacs-directory "bootstrap.el"))
|
(load (concat user-emacs-directory "bootstrap.el"))
|
||||||
;;
|
|
||||||
|
|
||||||
(defconst doom-default-theme 'doom-one)
|
(defconst doom-default-theme 'doom-one)
|
||||||
(defconst doom-terminal-theme 'doom-dark)
|
(defconst doom-terminal-theme 'doom-dark)
|
||||||
|
|
|
@ -24,11 +24,10 @@
|
||||||
:lighter " BIG"
|
:lighter " BIG"
|
||||||
:global t
|
:global t
|
||||||
(doom/load-font (if big-mode big-mode-font doom-default-font))
|
(doom/load-font (if big-mode big-mode-font doom-default-font))
|
||||||
(setq-default powerline-height
|
(setq-default
|
||||||
(if big-mode
|
powerline-height
|
||||||
big-mode-modeline-height
|
(if big-mode big-mode-modeline-height big-mode--powerline-height)
|
||||||
big-mode--powerline-height))
|
line-spacing
|
||||||
(setq-default line-spacing
|
|
||||||
(if big-mode big-mode-line-spacing big-mode--line-spacing)))
|
(if big-mode big-mode-line-spacing big-mode--line-spacing)))
|
||||||
|
|
||||||
(provide 'extra-demo)
|
(provide 'extra-demo)
|
||||||
|
|
|
@ -13,12 +13,10 @@
|
||||||
(sp-local-pair "if" nil :actions :rem)
|
(sp-local-pair "if" nil :actions :rem)
|
||||||
(sp-local-pair "while" nil :actions :rem)
|
(sp-local-pair "while" nil :actions :rem)
|
||||||
(sp-local-pair "function" nil :actions :rem)
|
(sp-local-pair "function" nil :actions :rem)
|
||||||
|
|
||||||
(sp-local-pair "then " " end")
|
(sp-local-pair "then " " end")
|
||||||
(sp-local-pair "do " " end")
|
(sp-local-pair "do " " end")
|
||||||
(sp-local-pair "then" "end" :when '(("RET")) :post-handlers '("||\n[i]"))
|
(sp-local-pair "then" "end" :when '(("RET")) :post-handlers '("||\n[i]"))
|
||||||
(sp-local-pair "do" "end" :when '(("RET")) :post-handlers '("||\n[i]"))
|
(sp-local-pair "do" "end" :when '(("RET")) :post-handlers '("||\n[i]"))
|
||||||
|
|
||||||
;; block functions
|
;; block functions
|
||||||
(sp-local-pair "function" "end" :when '(sp-point-after-bol-p) :post-handlers '(" |\n[i]"))
|
(sp-local-pair "function" "end" :when '(sp-point-after-bol-p) :post-handlers '(" |\n[i]"))
|
||||||
;; inline functions
|
;; inline functions
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
(def-docset! python-mode "py,py3,python")
|
(def-docset! python-mode "py,py3,python")
|
||||||
(def-version-cmd! python-mode "python --version 2>&1 | cut -d' ' -f2")
|
(def-version-cmd! python-mode "python --version 2>&1 | cut -d' ' -f2")
|
||||||
(def-repl! python-mode doom/inf-python)
|
(def-repl! python-mode doom/inf-python)
|
||||||
|
|
||||||
(define-key python-mode-map (kbd "DEL") nil)) ; interferes with smartparens
|
(define-key python-mode-map (kbd "DEL") nil)) ; interferes with smartparens
|
||||||
|
|
||||||
(use-package anaconda-mode
|
(use-package anaconda-mode
|
||||||
|
|
|
@ -4,9 +4,7 @@
|
||||||
:mode (("\\.\\(ba\\|z\\)sh$" . sh-mode)
|
:mode (("\\.\\(ba\\|z\\)sh$" . sh-mode)
|
||||||
("/\\.?z\\(sh\\(/.*\\|$\\)\\|profile\\|log\\(in\\|out\\)\\|sh\\(rc\\|env\\)\\)$" . sh-mode)
|
("/\\.?z\\(sh\\(/.*\\|$\\)\\|profile\\|log\\(in\\|out\\)\\|sh\\(rc\\|env\\)\\)$" . sh-mode)
|
||||||
("/\\.?bash\\(/.*\\|rc\\|_profile\\)$" . sh-mode))
|
("/\\.?bash\\(/.*\\|rc\\|_profile\\)$" . sh-mode))
|
||||||
:init
|
:init (add-hook! sh-mode '(flycheck-mode doom|sh-extra-font-lock-activate))
|
||||||
(add-hook! sh-mode
|
|
||||||
'(flycheck-mode doom|sh-extra-font-lock-activate))
|
|
||||||
:config
|
:config
|
||||||
(def-company-backend! sh-mode (shell))
|
(def-company-backend! sh-mode (shell))
|
||||||
(def-electric! sh-mode :words ("else" "elif" "fi" "done"))
|
(def-electric! sh-mode :words ("else" "elif" "fi" "done"))
|
||||||
|
|
|
@ -10,31 +10,27 @@
|
||||||
markdown-enable-math t
|
markdown-enable-math t
|
||||||
markdown-make-gfm-checkboxes-buttons t
|
markdown-make-gfm-checkboxes-buttons t
|
||||||
markdown-gfm-additional-languages '("sh"))
|
markdown-gfm-additional-languages '("sh"))
|
||||||
|
|
||||||
:config
|
:config
|
||||||
(map! :map markdown-mode-map
|
(map! :map markdown-mode-map
|
||||||
"<backspace>" nil
|
"<backspace>" nil
|
||||||
"<M-left>" nil
|
"<M-left>" nil
|
||||||
"<M-right>" nil
|
"<M-right>" nil
|
||||||
|
|
||||||
;; Assumes you have a markdown renderer plugin in chrome
|
|
||||||
:nv "M-r" (λ! (doom-open-with "Google Chrome"))
|
|
||||||
|
|
||||||
"M-*" 'markdown-insert-list-item
|
"M-*" 'markdown-insert-list-item
|
||||||
"M-b" 'markdown-insert-bold
|
"M-b" 'markdown-insert-bold
|
||||||
"M-i" 'markdown-insert-italic
|
"M-i" 'markdown-insert-italic
|
||||||
"M-`" 'doom/markdown-insert-del
|
"M-`" 'doom/markdown-insert-del
|
||||||
|
;; Assumes you have a markdown renderer plugin in chrome
|
||||||
|
:nv "M-r" (λ! (doom-open-with "Google Chrome"))
|
||||||
|
;; TODO: Make context sensitive
|
||||||
|
:n "[p" 'markdown-promote
|
||||||
|
:n "]p" 'markdown-demote
|
||||||
|
:i "M--" 'markdown-insert-hr
|
||||||
(:localleader
|
(:localleader
|
||||||
:nv "i" 'markdown-insert-image
|
:nv "i" 'markdown-insert-image
|
||||||
:nv "l" 'markdown-insert-link
|
:nv "l" 'markdown-insert-link
|
||||||
:nv "L" 'markdown-insert-reference-link-dwim
|
:nv "L" 'markdown-insert-reference-link-dwim
|
||||||
:nv "b" 'markdown-preview)
|
:nv "b" 'markdown-preview)))
|
||||||
|
|
||||||
;; TODO: Make context sensitive
|
|
||||||
:n "[p" 'markdown-promote
|
|
||||||
:n "]p" 'markdown-demote
|
|
||||||
|
|
||||||
:i "M--" 'markdown-insert-hr))
|
|
||||||
|
|
||||||
(use-package markdown-toc :after markdown-mode)
|
(use-package markdown-toc :after markdown-mode)
|
||||||
|
|
||||||
|
|
|
@ -38,10 +38,8 @@
|
||||||
(map! :map web-mode-map
|
(map! :map web-mode-map
|
||||||
"M-/" 'web-mode-comment-or-uncomment
|
"M-/" 'web-mode-comment-or-uncomment
|
||||||
:n "M-r" 'doom/web-refresh-browser
|
:n "M-r" 'doom/web-refresh-browser
|
||||||
|
|
||||||
:n "za" 'web-mode-fold-or-unfold
|
:n "za" 'web-mode-fold-or-unfold
|
||||||
(:localleader :n "t" 'web-mode-element-rename)
|
(:localleader :n "t" 'web-mode-element-rename)
|
||||||
|
|
||||||
:nv "]a" 'web-mode-attribute-next
|
:nv "]a" 'web-mode-attribute-next
|
||||||
:nv "[a" 'web-mode-attribute-previous
|
:nv "[a" 'web-mode-attribute-previous
|
||||||
:nv "]t" 'web-mode-tag-next
|
:nv "]t" 'web-mode-tag-next
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
(ex! "repl" 'doom:repl) ; invoke or send to repl
|
(ex! "repl" 'doom:repl) ; invoke or send to repl
|
||||||
(ex! "t[mux]" 'doom:tmux) ; send to tmux
|
(ex! "t[mux]" 'doom:tmux) ; send to tmux
|
||||||
(ex! "tcd" 'doom:tmux-cd) ; cd to default-directory in tmux
|
(ex! "tcd" 'doom:tmux-cd) ; cd to default-directory in tmux
|
||||||
(ex! "x" 'doom:send-to-scratch-or-org)
|
(ex! "x" 'doom:scratch-or-org)
|
||||||
;; GIT
|
;; GIT
|
||||||
(ex! "ga[dd]" 'doom/vcs-stage-hunk)
|
(ex! "ga[dd]" 'doom/vcs-stage-hunk)
|
||||||
(ex! "gbr[owse]" 'doom:git-remote-browse) ; show file in github/gitlab
|
(ex! "gbr[owse]" 'doom:git-remote-browse) ; show file in github/gitlab
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue