General formatting & minor refactors
This commit is contained in:
parent
daef19ba64
commit
3a23ff56cd
7 changed files with 22 additions and 22 deletions
|
@ -297,7 +297,9 @@ savehist file."
|
||||||
(def-package! ws-butler
|
(def-package! ws-butler
|
||||||
:after-call (after-find-file)
|
:after-call (after-find-file)
|
||||||
:config
|
:config
|
||||||
(nconc ws-butler-global-exempt-modes '(special-mode comint-mode term-mode eshell-mode))
|
(setq ws-butler-global-exempt-modes
|
||||||
|
(append ws-butler-global-exempt-modes
|
||||||
|
'(special-mode comint-mode term-mode eshell-mode)))
|
||||||
(ws-butler-global-mode))
|
(ws-butler-global-mode))
|
||||||
|
|
||||||
(provide 'core-editor)
|
(provide 'core-editor)
|
||||||
|
|
|
@ -8,8 +8,7 @@
|
||||||
|
|
||||||
;; stop copying each visual state move to the clipboard:
|
;; 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
|
||||||
;; Most of this code grokked from:
|
;; grokked from: http://stackoverflow.com/questions/15873346/elisp-rename-macro
|
||||||
;; http://stackoverflow.com/questions/15873346/elisp-rename-macro
|
|
||||||
(advice-add #'evil-visual-update-x-selection :override #'ignore)
|
(advice-add #'evil-visual-update-x-selection :override #'ignore)
|
||||||
|
|
||||||
(defmacro set-env! (&rest _vars)
|
(defmacro set-env! (&rest _vars)
|
||||||
|
|
|
@ -372,7 +372,8 @@ frame's window-system, the theme will be reloaded.")
|
||||||
;; frames, however. There's always `doom/reload-theme' if you need it!
|
;; frames, however. There's always `doom/reload-theme' if you need it!
|
||||||
(defun doom|reload-theme-in-frame-maybe (frame)
|
(defun doom|reload-theme-in-frame-maybe (frame)
|
||||||
"Reloads the theme in new daemon or tty frames."
|
"Reloads the theme in new daemon or tty frames."
|
||||||
(when (and (framep frame)
|
(when (and doom-theme
|
||||||
|
(framep frame)
|
||||||
(not (eq doom-last-window-system (framep-on-display frame))))
|
(not (eq doom-last-window-system (framep-on-display frame))))
|
||||||
(with-selected-frame frame
|
(with-selected-frame frame
|
||||||
(load-theme doom-theme t))
|
(load-theme doom-theme t))
|
||||||
|
|
|
@ -22,8 +22,8 @@
|
||||||
:init
|
:init
|
||||||
(set-company-backend! 'elixir-mode '(alchemist-company company-yasnippet))
|
(set-company-backend! 'elixir-mode '(alchemist-company company-yasnippet))
|
||||||
:config
|
:config
|
||||||
;; Alchemist doesn't use hook symbols to add these backends, so we have to use
|
;; Alchemist doesn't use hook symbols to add these backends, so we have to
|
||||||
;; the entire closure to get rid of it.
|
;; use the entire closure to get rid of it.
|
||||||
(let ((fn (byte-compile (lambda () (add-to-list (make-local-variable 'company-backends) 'alchemist-company)))))
|
(let ((fn (byte-compile (lambda () (add-to-list (make-local-variable 'company-backends) 'alchemist-company)))))
|
||||||
(remove-hook 'alchemist-mode-hook fn)
|
(remove-hook 'alchemist-mode-hook fn)
|
||||||
(remove-hook 'alchemist-iex-mode-hook fn)))
|
(remove-hook 'alchemist-iex-mode-hook fn)))
|
||||||
|
|
|
@ -249,7 +249,7 @@
|
||||||
:n "se" #'skewer-html-eval-tag))
|
:n "se" #'skewer-html-eval-tag))
|
||||||
|
|
||||||
;; `npm-mode'
|
;; `npm-mode'
|
||||||
(map! (:after npm-mode
|
(map! :after npm-mode
|
||||||
:map npm-mode-keymap
|
:map npm-mode-keymap
|
||||||
:localleader
|
:localleader
|
||||||
:n "nn" #'npm-mode-npm-init
|
:n "nn" #'npm-mode-npm-init
|
||||||
|
@ -259,7 +259,7 @@
|
||||||
:n "nu" #'npm-mode-npm-uninstall
|
:n "nu" #'npm-mode-npm-uninstall
|
||||||
:n "nl" #'npm-mode-npm-list
|
:n "nl" #'npm-mode-npm-list
|
||||||
:n "nr" #'npm-mode-npm-run
|
:n "nr" #'npm-mode-npm-run
|
||||||
:n "nv" #'npm-mode-visit-project-file))
|
:n "nv" #'npm-mode-visit-project-file)
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;; Projects
|
;; Projects
|
||||||
|
|
|
@ -87,7 +87,7 @@ available.")
|
||||||
(setq evil-magit-state 'normal
|
(setq evil-magit-state 'normal
|
||||||
evil-magit-use-z-for-folds t)
|
evil-magit-use-z-for-folds t)
|
||||||
:config
|
:config
|
||||||
(define-key! magit-mode-map
|
(define-key! magit-mode-map ; replaced by z1, z2, z3, etc
|
||||||
(kbd "M-1") nil
|
(kbd "M-1") nil
|
||||||
(kbd "M-2") nil
|
(kbd "M-2") nil
|
||||||
(kbd "M-3") nil
|
(kbd "M-3") nil
|
||||||
|
|
|
@ -249,7 +249,7 @@ Currently available functions:
|
||||||
concat (if (eq idx len) "\"};" "\",\n")))
|
concat (if (eq idx len) "\"};" "\",\n")))
|
||||||
'xpm t :ascent 'center)))))
|
'xpm t :ascent 'center)))))
|
||||||
|
|
||||||
(defun +modeline-build-path (&optional path)
|
(defun +modeline-build-path (path)
|
||||||
"Construct the file path for the `+modeline-buffer-id' segment using
|
"Construct the file path for the `+modeline-buffer-id' segment using
|
||||||
`+mdoeline-buffer-path-function'. If the buffer has no `buffer-file-name', just
|
`+mdoeline-buffer-path-function'. If the buffer has no `buffer-file-name', just
|
||||||
use `buffer-name'."
|
use `buffer-name'."
|
||||||
|
@ -433,9 +433,7 @@ Meant for `+modeline-buffer-path-function'."
|
||||||
:on-hooks (find-file-hook after-save-hook after-revert-hook)
|
:on-hooks (find-file-hook after-save-hook after-revert-hook)
|
||||||
:init (propertize "%b" 'face 'doom-modeline-buffer-file)
|
:init (propertize "%b" 'face 'doom-modeline-buffer-file)
|
||||||
:faces t
|
:faces t
|
||||||
(if buffer-file-name
|
(+modeline-build-path (buffer-file-name (buffer-base-buffer))))
|
||||||
(+modeline-build-path (buffer-file-name (buffer-base-buffer)))
|
|
||||||
(propertize "%b" 'face 'doom-modeline-buffer-file)))
|
|
||||||
|
|
||||||
(def-modeline-segment! +modeline-buffer-directory
|
(def-modeline-segment! +modeline-buffer-directory
|
||||||
(let ((face (if (active) 'doom-modeline-buffer-path)))
|
(let ((face (if (active) 'doom-modeline-buffer-path)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue