General formatting & minor refactors

This commit is contained in:
Henrik Lissner 2018-09-02 17:18:31 +02:00
parent daef19ba64
commit 3a23ff56cd
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
7 changed files with 22 additions and 22 deletions

View file

@ -22,8 +22,8 @@
:init
(set-company-backend! 'elixir-mode '(alchemist-company company-yasnippet))
:config
;; Alchemist doesn't use hook symbols to add these backends, so we have to use
;; the entire closure to get rid of it.
;; Alchemist doesn't use hook symbols to add these backends, so we have to
;; use the entire closure to get rid of it.
(let ((fn (byte-compile (lambda () (add-to-list (make-local-variable 'company-backends) 'alchemist-company)))))
(remove-hook 'alchemist-mode-hook fn)
(remove-hook 'alchemist-iex-mode-hook fn)))

View file

@ -249,17 +249,17 @@
:n "se" #'skewer-html-eval-tag))
;; `npm-mode'
(map! (:after npm-mode
:map npm-mode-keymap
:localleader
:n "nn" #'npm-mode-npm-init
:n "ni" #'npm-mode-npm-install
:n "ns" #'npm-mode-npm-install-save
:n "nd" #'npm-mode-npm-install-save-dev
:n "nu" #'npm-mode-npm-uninstall
:n "nl" #'npm-mode-npm-list
:n "nr" #'npm-mode-npm-run
:n "nv" #'npm-mode-visit-project-file))
(map! :after npm-mode
:map npm-mode-keymap
:localleader
:n "nn" #'npm-mode-npm-init
:n "ni" #'npm-mode-npm-install
:n "ns" #'npm-mode-npm-install-save
:n "nd" #'npm-mode-npm-install-save-dev
:n "nu" #'npm-mode-npm-uninstall
:n "nl" #'npm-mode-npm-list
:n "nr" #'npm-mode-npm-run
:n "nv" #'npm-mode-visit-project-file)
;;
;; Projects

View file

@ -87,7 +87,7 @@ available.")
(setq evil-magit-state 'normal
evil-magit-use-z-for-folds t)
:config
(define-key! magit-mode-map
(define-key! magit-mode-map ; replaced by z1, z2, z3, etc
(kbd "M-1") nil
(kbd "M-2") nil
(kbd "M-3") nil

View file

@ -249,7 +249,7 @@ Currently available functions:
concat (if (eq idx len) "\"};" "\",\n")))
'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
`+mdoeline-buffer-path-function'. If the buffer has no `buffer-file-name', just
use `buffer-name'."
@ -433,9 +433,7 @@ Meant for `+modeline-buffer-path-function'."
:on-hooks (find-file-hook after-save-hook after-revert-hook)
:init (propertize "%b" 'face 'doom-modeline-buffer-file)
:faces t
(if buffer-file-name
(+modeline-build-path (buffer-file-name (buffer-base-buffer)))
(propertize "%b" 'face 'doom-modeline-buffer-file)))
(+modeline-build-path (buffer-file-name (buffer-base-buffer))))
(def-modeline-segment! +modeline-buffer-directory
(let ((face (if (active) 'doom-modeline-buffer-path)))