diff --git a/emacs.d/init.el b/emacs.d/init.el index 5712666..7c0c31a 100644 --- a/emacs.d/init.el +++ b/emacs.d/init.el @@ -109,8 +109,9 @@ (setq completion-ignore-case t) ;; file名の補完で大文字小文字を区別しない (global-auto-revert-mode t) ;; バッファ自動再読み (cd "~/") ;HOMEディレクトリに移動 - - ) + (setq auto-save-default nil) ; .# とかの謎ファイルを作らない + (setq make-backup-files nil) ; .~ とかの謎ファイルを作らない +) ;; ファイル名がぶつからないようにする (uniquify) (use-package uniquify :config @@ -118,11 +119,11 @@ (setq uniquify-ignore-buffers-re "*[^*]+*")) ;; recentf -(use-package recentf +(leaf recentf :ensure t :straight t :init - (use-package counsel :ensure t) + (leaf counsel :ensure t) (recentf-mode 1) :config @@ -242,6 +243,49 @@ (setq slime-fuzzy-explanation "") (setq slime-kill-without-query-p t)) + +(leaf rainbow-delimiters + :ensure t + :straight t + :init + (require 'cl-lib) + (require 'color) + (defun rainbow-delimiters-using-stronger-colors () + (interactive) + (cl-loop + for index from 1 to rainbow-delimiters-max-face-count + do + (let ((face (intern (format "rainbow-delimiters-depth-%d-face" index)))) + (cl-callf color-saturate-name (face-foreground face) 100)))) + :hook + (after-init . rainbow-delimiters-using-stronger-colors) + (prog-mode-hook . rainbow-delimiters-mode) + :config + (setq rainbow-delimiters-outermost-only-face-count 1) + (set-face-foreground 'rainbow-delimiters-depth-1-face "#c49696") + (set-face-foreground 'rainbow-delimiters-depth-2-face "#ff5e5e") + (set-face-foreground 'rainbow-delimiters-depth-3-face "#ffaa77") + (set-face-foreground 'rainbow-delimiters-depth-4-face "#dddd77") + (set-face-foreground 'rainbow-delimiters-depth-5-face "#80ee80") + (set-face-foreground 'rainbow-delimiters-depth-6-face "#66bbff") + (set-face-foreground 'rainbow-delimiters-depth-7-face "#da6bda") + (set-face-foreground 'rainbow-delimiters-depth-8-face "#afafaf") + (set-face-foreground 'rainbow-delimiters-depth-9-face "#f0f0f0")) + +;; smartparens +;; M-x sp-cheat-sheet to shee commands available +;; https://github.com/Fuco1/smartparens +(leaf smartparens + :ensure t + :config + (require 'smartparens-config) + (smartparens-global-mode) + :bind + (("C-" . sp-forward-slurp-sexp) + ("C-" . sp-forward-barf-sexp)) +) + + (require 'bind-key) (bind-key "C-t" 'other-window global-map) (bind-key "C-h" 'delete-backward-char global-map)