~vdemeester/home

f70cc46deac077ca1be052518426ce31b1081eea — Vincent Demeester 8 days ago ef2cc7b
tools/emacs: add color-identifiers-mode

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2 files changed, 20 insertions(+), 0 deletions(-)

M tools/emacs/config/config-editing.el
M users/vincent/dev/emacs.nix
M tools/emacs/config/config-editing.el => tools/emacs/config/config-editing.el +19 -0
@@ 30,6 30,25 @@
    (sp-local-pair "`" "'" :when '(sp-in-string-p sp-in-comment-p))))
;; -UseSmartParens

(use-package color-identifiers-mode
  :commands (color-identifiers-mode)
  :config
  (defun myfunc-color-identifiers-mode-hook ()
    (let ((faces '(font-lock-comment-face font-lock-comment-delimiter-face font-lock-constant-face font-lock-type-face font-lock-function-name-face font-lock-variable-name-face font-lock-keyword-face font-lock-string-face font-lock-builtin-face font-lock-preprocessor-face font-lock-warning-face font-lock-doc-face font-lock-negation-char-face font-lock-regexp-grouping-construct font-lock-regexp-grouping-backslash)))
      (dolist (face faces)
        (face-remap-add-relative face '((:foreground "" :weight normal :slant normal)))))
    (face-remap-add-relative 'font-lock-keyword-face '((:weight bold)))
    (face-remap-add-relative 'font-lock-comment-face '((:slant italic)))
    (face-remap-add-relative 'font-lock-builtin-face '((:weight bold)))
    (face-remap-add-relative 'font-lock-preprocessor-face '((:weight bold)))
    (face-remap-add-relative 'font-lock-function-name-face '((:slant italic)))
    (face-remap-add-relative 'font-lock-string-face '((:slant italic)))
    (face-remap-add-relative 'font-lock-constant-face '((:weight bold))))
  (add-hook 'color-identifiers-mode-hook 'myfunc-color-identifiers-mode-hook)
  :hook ((go-mode . color-identifiers-mode)
         (js-mode . color-identifiers-mode)
         (python-mode . color-identifiers-mode)))

;; UseAggressiveIndent
(use-package aggressive-indent
  :bind ("C-c e i" . aggressive-indent-mode)

M users/vincent/dev/emacs.nix => users/vincent/dev/emacs.nix +1 -0
@@ 25,6 25,7 @@ let
    avy
    bbdb
    beginend
    color-identifiers-mode
    company
    company-emoji
    company-go