Configurations for GNU Emacs

Table of Contents

1. はじめに

1.1. 基本情報

2. Initialize

2.1. Header

;; init.el --- My init.el
;; Configurations for Emacs
;;                                         Takeo Obara  <bararararatty@gmail.com>

2.2. env

(defconst my/loading-profile-p nil
  "If non-nil, use built-in profiler.el.")

(defconst my/enable-profile nil
  "If true, enable profile")

(defconst my/enable-c-h-backspace nil
  "If true, enable C-h backspace")

3. Macro Utilities

3.1. when-darwin

(defmacro when-darwin (&rest body)
  (when (string= system-type "darwin")
    `(progn ,@body)))

3.2. when-darwin-not-window-system

(defmacro when-darwin-not-window-system (&rest body)
  (when (and (string= system-type "darwin")
             window-system)
    `(progn ,@body)))

3.3. when-guix

(defmacro when-guix (&rest body)
  (when (string= system-type "guix")
    `(progn ,@body)))

4. Boot

4.1. user

(setq user-full-name "takeokunn")
(setq user-mail-address "bararararatty@gmail.com")

4.2. profile

(when my/enable-profile
  (require 'profiler)
  (profiler-start 'cpu))

4.3. Magic File Name を一時的に無効にする

(defconst my/saved-file-name-handler-alist file-name-handler-alist)
(setq file-name-handler-alist nil)

4.4. 起動時間計測

(defconst my/before-load-init-time (current-time))

;;;###autoload
(defun my/load-init-time ()
  "Loading time of user init files including time for `after-init-hook'."
  (let ((time1 (float-time
                (time-subtract after-init-time my/before-load-init-time)))
        (time2 (float-time
                (time-subtract (current-time) my/before-load-init-time))))
    (message (concat "Loading init files: %.0f [msec], "
                     "of which %.f [msec] for `after-init-hook'.")
             (* 1000 time1) (* 1000 (- time2 time1)))))
(add-hook 'after-init-hook #'my/load-init-time t)

(defvar my/tick-previous-time my/before-load-init-time)

;;;###autoload
(defun my/tick-init-time (msg)
  "Tick boot sequence at loading MSG."
  (when my/loading-profile-p
    (let ((ctime (current-time)))
      (message "---- %5.2f[ms] %s"
               (* 1000 (float-time
                        (time-subtract ctime my/tick-previous-time)))
               msg)
      (setq my/tick-previous-time ctime))))

(defun my/emacs-init-time ()
  "Emacs booting time in msec."
  (interactive)
  (message "Emacs booting time: %.0f [msec] = `emacs-init-time'."
           (* 1000
              (float-time (time-subtract
                           after-init-time
                           before-init-time)))))

(add-hook 'after-init-hook #'my/emacs-init-time)

4.5. async load

(defvar my/delayed-priority-high-configurations '())
(defvar my/delayed-priority-high-configuration-timer nil)

(defvar my/delayed-priority-low-configurations '())
(defvar my/delayed-priority-low-configuration-timer nil)

(add-hook 'emacs-startup-hook
          (lambda ()
            (setq my/delayed-priority-high-configuration-timer
                  (run-with-timer
                   0.1 0.001
                   (lambda ()
                     (if my/delayed-priority-high-configurations
                         (let ((inhibit-message t))
                           (eval (pop my/delayed-priority-high-configurations)))
                       (progn
                         (cancel-timer my/delayed-priority-high-configuration-timer))))))
            (setq my/delayed-priority-low-configuration-timer
                  (run-with-timer
                   0.3 0.001
                   (lambda ()
                     (if my/delayed-priority-low-configurations
                         (let ((inhibit-message t))
                           (eval (pop my/delayed-priority-low-configurations)))
                       (progn
                         (cancel-timer my/delayed-priority-low-configuration-timer))))))))

(defmacro with-delayed-execution-priority-high (&rest body)
  (declare (indent 0))
  `(setq my/delayed-priority-high-configurations
         (append my/delayed-priority-high-configurations ',body)))

(defmacro with-delayed-execution (&rest body)
  (declare (indent 0))
  `(setq my/delayed-priority-low-configurations
         (append my/delayed-priority-low-configurations ',body)))

4.6. autoload-if-found

;;;###autoload
(defun autoload-if-found (functions file &optional docstring interactive type)
  "set autoload iff. FILE has found."
  (when (locate-library file)
    (dolist (f functions)
      (autoload f file docstring interactive type))
    t))

4.7. el-get

(eval-when-compile
  (add-to-list 'load-path (locate-user-emacs-file "el-get/el-get"))
  (with-current-buffer
      (url-retrieve-synchronously
       "https://raw.githubusercontent.com/dimitri/el-get/master/el-get-install.el")
    (goto-char (point-max))
    (eval-print-last-sexp))

  (with-eval-after-load 'el-get-git
    (setq el-get-git-shallow-clone t)))

(with-delayed-execution
  (message "Install el-get...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/el-get"))

  (autoload-if-found '(el-get-bundle) "el-get" nil t)

  (with-eval-after-load 'el-get-git
    (setq el-get-git-shallow-clone t)))

5. Basic

5.1. 末尾のスペースを可視化する

(with-delayed-execution
  (message "Install disable-show-trailing-whitespace...")

  (defun my/disable-show-trailing-whitespace ()
    (setq show-trailing-whitespace nil))

  (with-eval-after-load 'comint
    (add-hook 'comint-mode-hook #'my/disable-show-trailing-whitespace))

  (with-eval-after-load 'esh-mode
    (add-hook 'eshell-mode-hook #'my/disable-show-trailing-whitespace))

  (with-eval-after-load 'eww
    (add-hook 'eww-mode-hook #'my/disable-show-trailing-whitespace))

  (with-eval-after-load 'minibuffer
    (add-hook 'minibuffer-inactive-mode-hook #'my/disable-show-trailing-whitespace))

  (with-eval-after-load 'dashboard
    (add-hook 'dashboard-mode-hook #'my/disable-show-trailing-whitespace))

  (with-eval-after-load 'simple
    (add-hook 'fundamental-mode-hook #'my/disable-show-trailing-whitespace)))

5.2. 行番号を表示する

(with-delayed-execution
  (message "Install display-line-numbers...")
  (autoload-if-found '(global-display-line-numbers-mode) "display-line-numbers" nil t)
  (global-display-line-numbers-mode)

  (with-eval-after-load 'display-line-numbers
    (setq display-line-numbers-grow-only t)))

5.3. C-kで行削除

(with-eval-after-load 'simple
  (setq kill-whole-line t))

5.4. カッコの中をハイライトする

(with-delayed-execution
  (message "Install show-paren-mode...")
  (show-paren-mode t)

  (with-eval-after-load 'paren
    (setq show-paren-style 'mixed)))

5.5. カッコが自動的に作られるようにする

(with-delayed-execution
  (message "Install electric-pair-mode...")
  (electric-pair-mode 1))

5.6. coding system

(with-delayed-execution-priority-high
  (message "Install language...")

  ;; language and locale
  (set-language-environment "Japanese")
  (setq system-time-locale "C")

  ;; coding system
  (set-default-coding-systems 'utf-8-unix)
  (prefer-coding-system 'utf-8-unix)
  (set-selection-coding-system 'utf-8-unix)

  ;; prefer-coding-system take effect equally to follows
  (set-buffer-file-coding-system 'utf-8-unix)
  (set-file-name-coding-system 'utf-8-unix)
  (set-terminal-coding-system 'utf-8-unix)
  (set-keyboard-coding-system 'utf-8-unix)
  (setq locale-coding-system 'utf-8-unix))

5.7. global-auto-revert-mode

(with-delayed-execution
  (message "Install global-auto-revert-mode...")
  (global-auto-revert-mode t))

5.8. yes/no to y/n

(with-delayed-execution
  (fset 'yes-or-no-p 'y-or-n-p))

5.9. global keybind

(when my/enable-c-h-backspace
  (keyboard-translate ?\C-h ?\C-?)
  (global-set-key (kbd "C-h") #'c-hungry-delete-backwards))

(global-set-key (kbd "C-?") #'help-command)

(global-set-key (kbd "M-¥") #'(lambda () (interactive) (insert "\\")))
(global-set-key (kbd "C-z") #'undo)
(global-set-key (kbd "C-a") #'back-to-indentation)
(global-set-key (kbd "C-c i") #'find-function)
(global-set-key (kbd "C-x C-o") #'other-window)
(global-set-key (kbd "C-x :") #'goto-line)
(global-set-key (kbd "M-h") #'backward-kill-word)

(global-set-key (kbd "C-x l") 'next-buffer)
(global-set-key (kbd "C-x h") 'previous-buffer)

(global-set-key (kbd "C-x C-k") nil)
(global-set-key (kbd "C-x C-n") nil)

(when window-system
  (global-set-key (kbd "C-x C-c") nil))

;; (global-set-key [return] #'(lambda ()
;;                              (interactive)
;;                              (message "Don't use RETURN!!! Press C-m!! C-m!!!")))
;; (global-set-key [tab] #'(lambda ()
;;                              (interactive)
;;                              (message "Don't use TAB!!! Press C-i!! C-i!!!")))

5.10. minibuffer

(with-eval-after-load 'minibuffer
  (define-key minibuffer-mode-map (kbd "C-h") #'delete-backward-char)
  (define-key minibuffer-mode-map (kbd "M-h") #'backward-kill-word))

5.11. common lispを使う

(eval-when-compile
  (setq byte-compile-warnings '(cl-functions))
  (require 'cl-lib nil t))

(with-delayed-execution-priority-high
  (message "install cl-lib....")
  (require 'cl-lib))

5.12. savehistを有効にする

(with-delayed-execution-priority-high
  (message "Install savehist...")
  (savehist-mode 1))

5.13. [mac] clipboardに入るようにする

(with-delayed-execution
  (defun my/copy-from-osx ()
    (shell-command-to-string "pbpaste"))

  (defun my/paste-to-osx (text)
    (let ((process-connection-type nil))
      (let ((proc (start-process "pbcopy" "*Messages*" "pbcopy")))
        (process-send-string proc text)
        (process-send-eof proc))))

  (when-darwin-not-window-system
   (setq interprogram-cut-function #'my/paste-to-osx)
   (setq interprogram-paste-function #'my/copy-from-osx)))

5.14. pluginをnative compする

(with-eval-after-load 'comp
  (setq native-comp-async-jobs-number 4)
  (setq native-comp-speed 3)
  (setq native-comp-always-compile t)
  (defun my/native-comp-packages ()
    (interactive)
    (native-compile-async "~/.emacs.d/init.el")
    (native-compile-async "~/.emacs.d/early-init.el")
    (native-compile-async "~/.emacs.d/el-get" 'recursively)
    (native-compile-async "~/.emacs.d/elpa" 'recursively)))

5.15. native compを無効にする

(with-eval-after-load 'comp
  (setq package-native-compile nil))

5.16. native compのwarningを抑える

(custom-set-variables '(warning-suppress-types '((comp))))

5.17. 同一bufferの名前を変える

(with-eval-after-load 'uniquify
  (setq uniquify-buffer-name-style 'post-forward-angle-brackets))

5.18. killできないようにする

(with-current-buffer "*scratch*"
  (emacs-lock-mode 'kill))

(with-current-buffer "*Messages*"
  (emacs-lock-mode 'kill))

5.19. 日時表示

(with-eval-after-load 'time
  (setq display-time-24hr-format t)
  (setq display-time-day-and-date t))

5.20. fontset

(with-delayed-execution
  (defconst my/enable-warning-log nil)

  (defun set-fontset-font:around (set-fontset-font name target font-spec &optional frame add)
    "Warn if specified font is not installed."
    (if (stringp font-spec)
        (setq font-spec (font-spec :family font-spec)))
    (if (and (fontp font-spec)
             (null (find-font font-spec))
             my/enable-warning-log)
        (warn "set-fontset-font: font %s is not found." (font-get font-spec :family))
      (ignore-errors
        (funcall set-fontset-font name target font-spec frame add))))

  (advice-add 'set-fontset-font :around #'set-fontset-font:around)

  ;; reset all settings in default fontset
  (when (functionp 'set-fontset-font)
    (if (find-font (font-spec :family "Noto Sans"))
        (set-fontset-font t '(0 . #x3fffff) "Noto Sans"))

    ;; multiple platform
    (set-fontset-font t 'latin "Noto Sans")
    (set-fontset-font t 'greek "Noto Sans")
    (set-fontset-font t 'phonetic "Noto Sans")
    (set-fontset-font t 'coptic "Noto Sans Coptic")
    (set-fontset-font t 'coptic "Noto Sans Symbols2" nil 'append)
    (set-fontset-font t 'cyrillic "Noto Sans")
    (set-fontset-font t 'armenian "Noto Sans Armenian")
    (set-fontset-font t 'hebrew "Noto Sans Hebrew")
    (set-fontset-font t 'arabic "Noto Sans Arabic")
    (set-fontset-font t 'syriac "Noto Sans Syriac")
    (set-fontset-font t 'thaana "Noto Sans Thaana")
    (set-fontset-font t 'nko "Noto Sans N'Ko")
    (set-fontset-font t 'samaritan "Noto Sans Samaritan")
    (set-fontset-font t 'mandaic "Noto Sans Mandaic")
    (set-fontset-font t 'devanagari "Noto Sans Devanagari")
    (set-fontset-font t 'bengali "Noto Sans Bengali")
    (set-fontset-font t 'gurmukhi "Noto Sans Gurmukhi")
    (set-fontset-font t 'gujarati "Noto Sans Gujanrati")
    (set-fontset-font t 'oriya "Noto Sans Oriya")
    (set-fontset-font t 'tamil "Noto Sans Tamil")
    (set-fontset-font t 'tamil "Noto Sans Tamil Supplement" nil 'append)
    (set-fontset-font t 'telugu "Noto Sans Telugu")
    (set-fontset-font t 'kannada "Noto Sans Kannada")
    (set-fontset-font t 'malayalam "Noto Sans Malayalam")
    (set-fontset-font t 'sinhala "Noto Sans Sinhala")
    (set-fontset-font t 'thai "Noto Sans Thai")
    (set-fontset-font t 'lao "Noto Sans Lao")
    (set-fontset-font t 'tibetan "Noto Sans Tibetan")
    (set-fontset-font t 'burmese "Noto Sans Myanmar")
    (set-fontset-font t 'georgian "Noto Sans Georgian")
    (set-fontset-font t 'hangul "Noto Sans CJK KR")
    (set-fontset-font t 'ethiopic "Noto Sans Ethiopic")
    (set-fontset-font t 'cherokee "Noto Sans Cherokee")
    (set-fontset-font t 'canadian-aboriginal "Noto Sans Canadian Aboriginal")
    (set-fontset-font t 'ogham "Noto Sans Ogham")
    (set-fontset-font t 'runic "Noto Sans Runic")
    (set-fontset-font t 'tagalog "Noto Sans Tagalog")
    (set-fontset-font t 'hanunoo "Noto Sans Hanunoo")
    (set-fontset-font t 'buhid "Noto Sans Buhid")
    (set-fontset-font t 'tagbanwa "Noto Sans Tagbanwa")
    (set-fontset-font t 'khmer "Noto Sans Khmer")
    (set-fontset-font t 'mongolian "Noto Sans Mongolian")
    (set-fontset-font t 'limbu "Noto Sans Limbu")
    (set-fontset-font t 'tai-le "Noto Sans Tai Le")
    (set-fontset-font t 'tai-lue "Noto Sans NewTaiLue")
    (set-fontset-font t 'buginese "Noto Sans Buginese")
    (set-fontset-font t 'tai-tham "Noto Sans Tai Tham")
    (set-fontset-font t 'balinese "Noto Sans Balinese")
    (set-fontset-font t 'sundanese "Noto Sans Sundanese")
    (set-fontset-font t 'vedic "Noto Sans Devanagari")
    (set-fontset-font t 'symbol "Noto Sans CJK JP")
    (set-fontset-font t 'symbol "Noto Sans Symbols2" nil 'append)
    (set-fontset-font t 'symbol "Noto Sans" nil 'append)
    (set-fontset-font t 'symbol "Noto Sans Math" nil 'append)
    (set-fontset-font t 'symbol "Noto Emoji" nil 'append)
    (set-fontset-font t 'symbol "Noto Sans Symbols" nil 'append)
    (set-fontset-font t 'braille "Noto Sans Symbols2")
    (set-fontset-font t 'batak "Noto Sans Batak")
    (set-fontset-font t 'lepcha "Noto Sans Lepcha")
    (set-fontset-font t 'ol-chiki "Noto Sans Ol Chiki")
    (set-fontset-font t 'glagolitic "Noto Sans Glagolitic")
    (set-fontset-font t 'tifinagh "Noto Sans Tifinagh")
    (set-fontset-font t 'han "Noto Sans CJK JP")
    (set-fontset-font t 'ideographic-description "Noto Sans CJK JP")
    (set-fontset-font t 'cjk-misc "Noto Sans CJK JP")
    (set-fontset-font t 'kana "Noto Sans CJK JP")
    (set-fontset-font t 'bopomofo "Noto Sans CJK TC")
    (set-fontset-font t 'kanbun "Noto Sans CJK JP")
    (set-fontset-font t 'yi "Noto Sans Yi")
    (set-fontset-font t 'lisu "Noto Sans Lisu")
    (set-fontset-font t 'vai "Noto Sans Vai")
    (set-fontset-font t 'bamum "Noto Sans Bamum")
    (set-fontset-font t 'syloti-nagri "Noto Sans Syloti Nagri")
    (set-fontset-font t 'north-indic-number "Noto Sans Devanagari")
    (set-fontset-font t 'phags-pa "Noto Sans Phags Pa")
    (set-fontset-font t 'saurashtra "Noto Sans Saurashtra")
    (set-fontset-font t 'kayah-li "Noto Sans Kayah Li")
    (set-fontset-font t 'rejang "Noto Sans Rejang")
    (set-fontset-font t 'javanese "Noto Sans Javanese")
    (set-fontset-font t 'cham "Noto Sans Cham")
    (set-fontset-font t 'tai-viet "Noto Sans Tai Viet")
    (set-fontset-font t 'meetei-mayek "Noto Sans Meetei Mayek")
    (set-fontset-font t 'vertical-form "Noto Sans CJK JP")
    (set-fontset-font t '(#xfe50 . #xfe6b) "Noto Sans CJK JP") ; symbol
    (set-fontset-font t '(#xfff9 . #xfffb) "Noto Sans Symbols2") ; nil
    (set-fontset-font t 'linear-b "Noto Sans Linear B")
    (set-fontset-font t 'aegean-number "Noto Sans Linear B")
    (set-fontset-font t 'ancient-greek-number "Noto Sans Symbols2")
    (set-fontset-font t 'ancient-symbol "Noto Sans Symbols2")
    (set-fontset-font t 'phaistos-disc "Noto Sans Symbols2")
    (set-fontset-font t 'lycian "Noto Sans Lycian")
    (set-fontset-font t 'carian "Noto Sans Carian")
    (set-fontset-font t 'old-italic "Noto Sans Old Italic")
    (set-fontset-font t 'gothic "Noto Sans Gothic")
    (set-fontset-font t 'old-permic "Noto Sans Old Permic")
    (set-fontset-font t 'ugaritic "Noto Sans Ugaritic")
    (set-fontset-font t 'old-persian "Noto Sans OldPersian")
    (set-fontset-font t 'deseret "Noto Sans Deseret")
    (set-fontset-font t 'shavian "Noto Sans Shavian")
    (set-fontset-font t 'osmanya "Noto Sans Osmanya")
    (set-fontset-font t 'osage "Noto Sans Osage")
    (set-fontset-font t 'elbasan "Noto Sans Elbasan")
    (set-fontset-font t 'caucasian-albanian "Noto Sans CaucAlban")
    (set-fontset-font t 'linear-a "Noto Sans Linear A")
    (set-fontset-font t 'cypriot-syllabary "Noto Sans Cypriot")
    (set-fontset-font t 'aramaic "Noto Sans ImpAramaic")
    (set-fontset-font t 'palmyrene "Noto Sans Palmyrene")
    (set-fontset-font t 'nabataean "Noto Sans Nabataean")
    (set-fontset-font t 'hatran "Noto Sans Hatran")
    (set-fontset-font t 'phoenician "Noto Sans Phoenician")
    (set-fontset-font t 'lydian "Noto Sans Lydian")
    (set-fontset-font t 'meroitic "Noto Sans Meroitic")
    (set-fontset-font t 'kharoshthi "Noto Sans Kharoshthi")
    (set-fontset-font t 'old-south-arabian "Noto Sans OldSouArab")
    (set-fontset-font t 'old-north-arabian "Noto Sans OldNorArab")
    (set-fontset-font t 'manichaean "Noto Sans Manichaean")
    (set-fontset-font t 'avestan "Noto Sans Avestan")
    (set-fontset-font t 'inscriptional-parthian "Noto Sans Inscriptional Parthian")
    (set-fontset-font t 'inscriptional-pahlavi "Noto Sans Inscriptional Pahlavi")
    (set-fontset-font t 'psalter-pahlavi "Noto Sans PsaPahlavi")
    (set-fontset-font t 'old-turkic "Noto Sans Old Turkic")
    (set-fontset-font t 'old-hungarian "Noto Sans OldHung")
    (set-fontset-font t 'hanifi-rohingya "Noto Sans HanifiRohg")
    (set-fontset-font t 'rumi-number "Noto Sans Symbols2")
    (set-fontset-font t 'old-sogdian "Noto Sans OldSogdian")
    (set-fontset-font t 'sogdian "Noto Sans Sogdian")
    (set-fontset-font t 'elymaic "Noto Sans Elymaic")
    (set-fontset-font t 'brahmi "Noto Sans Brahmi")
    (set-fontset-font t 'kaithi "Noto Sans Kaithi")
    (set-fontset-font t 'sora-sompeng "Noto Sans SoraSomp")
    (set-fontset-font t 'chakma "Noto Sans Chakma")
    (set-fontset-font t 'mahajani "Noto Sans Mahajani")
    (set-fontset-font t 'sharada "Noto Sans Sharada")
    (set-fontset-font t 'sinhala-archaic-number "Noto Sans Sinhala")
    (set-fontset-font t 'khojki "Noto Sans Khojki")
    (set-fontset-font t 'multani "Noto Sans Multani")
    (set-fontset-font t 'khudawadi "Noto Sans Khudawadi")
    (set-fontset-font t 'grantha "Noto Sans Grantha")
    (set-fontset-font t 'newa "Noto Sans Newa")
    (set-fontset-font t 'tirhuta "Noto Sans Tirhuta")
    (set-fontset-font t 'siddham "Noto Sans Siddham")
    (set-fontset-font t 'modi "Noto Sans Modi")
    (set-fontset-font t 'takri "Noto Sans Takri")
    (set-fontset-font t 'ahom "Noto Serif Ahom")
    (set-fontset-font t 'dogra "Noto Serif Dogra")
    (set-fontset-font t 'warang-citi "Noto Sans WarangCiti")
    (set-fontset-font t 'zanabazar-square "Noto Sans Zanabazar")
    (set-fontset-font t 'soyombo "Noto Sans Soyombo")
    (set-fontset-font t 'pau-cin-hau "Noto Sans PauCinHau")
    (set-fontset-font t 'bhaiksuki "Noto Sans Bhaiksuki")
    (set-fontset-font t 'marchen "Noto Sans Marchen")
    (set-fontset-font t 'masaram-gondi "Noto Sans Masaram Gondi")
    (set-fontset-font t 'gunjala-gondi "Noto Sans Gunjala Gondi")
    (set-fontset-font t 'cuneiform "Noto Sans Cuneiform")
    (set-fontset-font t 'cuneiform-numbers-and-punctuation "Noto Sans Cuneiform")
    (set-fontset-font t 'egyptian "Noto Sans EgyptHiero")
    (set-fontset-font t 'anatolian "Noto Sans AnatoHiero")
    (set-fontset-font t 'mro "Noto Sans Mro")
    (set-fontset-font t 'bassa-vah "Noto Sans Bassa Vah")
    (set-fontset-font t 'pahawh-hmong "Noto Sans Pahawh Hmong")
    (set-fontset-font t 'miao "Noto Sans Miao")
    (set-fontset-font t 'tangut "Noto Serif Tangut")
    (set-fontset-font t 'tangut-components "Noto Serif Tangut")
    (set-fontset-font t '(#x16fe0 . #x16fe0) "Noto Serif Tangut")
    (set-fontset-font t 'duployan-shorthand "Noto Sans Duployan")
    (set-fontset-font t 'byzantine-musical-symbol "Noto Music")
    (set-fontset-font t 'musical-symbol "Noto Music")
    (set-fontset-font t 'ancient-greek-musical-notation "Noto Music")
    (set-fontset-font t 'mayan-numeral "Noto Sans Mayan Numerals")
    (set-fontset-font t 'tai-xuan-jing-symbol "Noto Sans Symbols2")
    (set-fontset-font t 'counting-rod-numeral "Noto Sans Symbols2")
    (set-fontset-font t 'mathematical "Noto Sans Math")
    (set-fontset-font t 'wancho "Noto Sans Wancho")
    (set-fontset-font t 'mende-kikakui "Noto Sans Mende Kikakui")
    (set-fontset-font t 'adlam "Noto Sans Adlam")
    (set-fontset-font t 'indic-siyaq-number "Noto Sans Indic Siyaq Numbers")
    (set-fontset-font t '(#x1ee00 . #x1eeff) "Noto Sans Math") ; arabic
    (set-fontset-font t 'mahjong-tile "Noto Sans Symbols2")
    (set-fontset-font t 'domino-tile "Noto Sans Symbols2")
    (set-fontset-font t 'playing-cards "Noto Sans Symbols2")

    ;; non Noto fonts
    (set-fontset-font t 'kana "UniHentaiKana" nil 'append)
    (set-fontset-font t 'latin "Iosevka" nil 'append)
    (set-fontset-font t 'symbol "Iosevka" nil 'append)

    ;; Nerd Font (defined thru -#xfd46)
    (set-fontset-font t '( #xe000 .  #xf136) "Inconsolata Nerd Font")))

5.21. warning

(setq display-warning-minimum-level :error)

5.22. キーコマンド入力中に入力過程をミニバッファに反映する

(setq echo-keystrokes 0.1)

5.23. recursive minibuffers

(setq enable-recursive-minibuffers t)

5.24. inhibit-compacting-font-caches

(setq inhibit-compacting-font-caches t)

5.25. save-place-mode

(with-delayed-execution
  (save-place-mode 1))

5.26. enable-local-variables

(setq enable-local-variables :all)

6. Utitlity

6.1. aio

(eval-when-compile
  (el-get-bundle 'aio))

(with-delayed-execution-priority-high
  (message "Install aio...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/aio")))

6.2. alert

(eval-when-compile
  (el-get-bundle 'alert))

(with-delayed-execution-priority-high
  (message "Install alert...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/alert")))

6.3. async

(eval-when-compile
  (el-get-bundle 'async))

(with-delayed-execution-priority-high
  (message "Install async...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/async")))

6.4. bui

(eval-when-compile
  (el-get-bundle 'bui))

(with-delayed-execution-priority-high
  (message "Install bui...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/bui")))

6.5. cfrs

(eval-when-compile
  (el-get-bundle 'cfrs))

(with-delayed-execution-priority-high
  (message "Install cfrs...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/cfrs")))

6.6. closql

(eval-when-compile
  (el-get-bundle 'closql))

(with-delayed-execution-priority-high
  (message "Install closql...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/closql")))

6.7. compat

(eval-when-compile
  (el-get-bundle 'compat))

(with-delayed-execution-priority-high
  (message "Install compat...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/compat"))))

6.8. dash

(eval-when-compile
  (el-get-bundle 'dash))

(with-delayed-execution-priority-high
  (message "Install dash...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/dash"))))

6.9. esxml

(eval-when-compile
  (el-get-bundle 'esxml :url "https://github.com/tali713/esxml.git"))

(with-delayed-execution-priority-high
  (message "Install esxml...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/esxml")))

6.10. emacsql

(eval-when-compile
  (el-get-bundle 'emacsql))

(with-delayed-execution-priority-high
  (message "Install emacsql...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/emacsql")))

6.11. epl

(eval-when-compile
  (el-get-bundle 'epl))

(with-delayed-execution-priority-high
  (message "Install epl...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/epl")))

6.12. f

(eval-when-compile
  (el-get-bundle 'f))

(with-delayed-execution-priority-high
  (message "Install f...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/f"))))

6.13. frame-local

(eval-when-compile
  (el-get-bundle 'frame-local))

(with-delayed-execution-priority-high
  (message "Install frame-local...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/frame-local")))

6.14. fringe-helper

(eval-when-compile
  (el-get-bundle 'fringe-helper))

(with-delayed-execution-priority-high
  (message "Install fringe-helper...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/fringe-helper")))

6.15. gh

(eval-when-compile
  (el-get-bundle 'gh))

(with-delayed-execution-priority-high
  (message "Install gh...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/gh")))

6.16. hide-lines

(eval-when-compile
  (el-get-bundle "vapniks/hide-lines"
    :url "https://github.com/vapniks/hide-lines.git"))

(with-delayed-execution-priority-high
  (message "Install hide-lines...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/hide-lines")))

6.17. hsluv

(eval-when-compile
  (el-get-bundle 'hsluv))

(with-delayed-execution-priority-high
  (message "Install hsluv...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/hsluv")))

6.18. ht

(eval-when-compile
  (el-get-bundle 'ht))

(with-delayed-execution-priority-high
  (message "Install ht...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/ht"))))

6.19. hydra

(eval-when-compile
  (el-get-bundle 'hydra))

(with-delayed-execution-priority-high
  (message "Install hydra...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/hydra")))

6.20. inflections

(eval-when-compile
  (el-get-bundle 'inflections))

(with-delayed-execution-priority-high
  (message "Install inflections...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/inflections")))

6.21. list-utils

(eval-when-compile
  (el-get-bundle 'list-utils))

(with-delayed-execution-priority-high
  (message "Install list-utils...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/list-utils")))

6.22. lv

(eval-when-compile
  (el-get-bundle 'lv))

(with-delayed-execution-priority-high
  (message "Install lv...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/lv"))))

6.23. map

(eval-when-compile
  (el-get-bundle 'map))

(with-delayed-execution-priority-high
  (message "Install map...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/map")))

6.24. marshal

(eval-when-compile
  (el-get-bundle 'marshal))

(with-delayed-execution-priority-high
  (message "Install marshal...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/marshal")))

6.25. mustache

(eval-when-compile
  (el-get-bundle 'mustache))

(with-delayed-execution-priority-high
  (message "Install mustache...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/mustache"))))

6.26. ov

(eval-when-compile
  (el-get-bundle 'ov))

(with-delayed-execution-priority-high
  (message "Install ov...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/ov")))

6.27. pfuture

(eval-when-compile
  (el-get-bundle 'pfuture))

(with-delayed-execution-priority-high
  (message "Install pfuture...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/pfuture")))

6.28. pkg-info

(eval-when-compile
  (el-get-bundle 'pkg-info))

(with-delayed-execution-priority-high
  (message "Install pkg-info...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/pkg-info")))

6.29. posframe

(eval-when-compile
  (el-get-bundle 'posframe))

(with-delayed-execution-priority-high
  (message "Install posframe...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/posframe"))))

6.30. popup

(eval-when-compile
  (el-get-bundle 'popup))

(with-delayed-execution-priority-high
  (message "Install popup...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/popup")))

6.31. queue

(eval-when-compile
  (el-get-bundle 'queue))

(with-delayed-execution-priority-high
  (message "Install queue...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/queue")))

6.32. require

(eval-when-compile
  (el-get-bundle 'request))

(with-delayed-execution-priority-high
  (message "Install request...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/request")))

6.33. s

(eval-when-compile
  (el-get-bundle 's))

(with-delayed-execution-priority-high
  (message "Install s...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/s"))))

6.34. sesman

(eval-when-compile
  (el-get-bundle 'sesman))

(with-delayed-execution-priority-high
  (message "Install sesman...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/sesman")))

6.35. seq

(eval-when-compile
  (el-get-bundle 'seq))

(with-delayed-execution-priority-high
  (message "Install seq...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/seq")))

6.36. simple-httpd

(eval-when-compile
  (el-get-bundle 'simple-httpd))

(with-delayed-execution-priority-high
  (message "Install simple-httpd...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/simple-httpd")))

6.37. spinner

(eval-when-compile
  (el-get-bundle 'spinner))

(with-delayed-execution-priority-high
  (message "Install spinner...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/spinner"))))

6.38. shrink-path

(eval-when-compile
  (el-get-bundle 'shrink-path))

(with-delayed-execution-priority-high
  (message "Install shrink-path...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/shrink-path"))))

6.39. tablist

(eval-when-compile
  (el-get-bundle 'tablist))

(with-delayed-execution-priority-high
  (message "Install tablist...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/tablist")))

6.40. tomelr

(eval-when-compile
  (el-get-bundle 'tomelr))

(with-delayed-execution-priority-high
  (message "Install tomelr...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/tomelr")))

6.41. treemacs

(eval-when-compile
  (el-get-bundle 'treemacs))

(with-delayed-execution-priority-high
  (message "Install treemacs...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/treemacs/src/elisp")))

6.42. treepy

(eval-when-compile
  (el-get-bundle 'treepy))

(with-delayed-execution-priority-high
  (message "Install treepy...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/treepy")))

6.43. tree-mode

(eval-when-compile
  (el-get-bundle 'tree-mode))

(with-delayed-execution-priority-high
  (message "Install tree-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/tree-mode")))

6.44. ts

(eval-when-compile
  (el-get-bundle 'ts))

(with-delayed-execution-priority-high
  (message "Install ts...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/ts")))

6.45. yaml

(eval-when-compile
  (el-get-bundle 'yaml))

(with-delayed-execution-priority-high
  (message "Install yaml...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/yaml")))

6.46. visual-fill-column

(eval-when-compile
  (el-get-bundle 'visual-fill-column))

(with-delayed-execution-priority-high
  (message "Install visual-fill-column...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/visual-fill-column")))

6.47. web-server

(eval-when-compile
  (el-get-bundle 'web-server))

(with-delayed-execution-priority-high
  (message "Install web-server...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/web-server")))

6.48. websocket

(eval-when-compile
  (el-get-bundle 'websocket))

(with-delayed-execution-priority-high
  (message "Install websocket...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/websocket")))

6.49. xelb

(eval-when-compile
  (el-get-bundle 'xelb))

(with-delayed-execution-priority-high
  (message "Install xelb...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/xelb")))

7. Language

7.1. apache-mode

(eval-when-compile
  (el-get-bundle 'apache-mode))

(with-delayed-execution
  (message "Install apache-mode")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/apache-mode")))
  (autoload-if-found '(apache-mode) "apache-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.htaccess$" . apache-mode)))

7.2. bazel-mode

(eval-when-compile
  (el-get-bundle 'bazel-mode
    :url "https://github.com/bazelbuild/emacs-bazel-mode.git"))

(with-delayed-execution
  (message "Install bazel-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/bazel-mode"))
  (autoload-if-found '(bazel-mode) "bazel" nil t))

7.3. bison-mode

(eval-when-compile
  (el-get-bundle 'bison-mode))

(with-delayed-execution
  (message "Install bison-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/bison-mode"))
  (autoload-if-found '(bison-mode flex-mode jison-mode) "bison-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.y\\'" . bison-mode))
  (add-to-list 'auto-mode-alist '("\\.l\\'" . flex-mode))
  (add-to-list 'auto-mode-alist '("\\.jison\\'" . jison-mode)))

7.4. c++-mode

(with-eval-after-load 'c++-mode
  (add-hook 'c++-mode-hook #'lsp-deferred))

7.5. c-mode

(with-eval-after-load 'cc-mode
  (add-hook 'c-mode-hook #'lsp-deferred))

7.6. cask-mode

(eval-when-compile
  (el-get-bundle 'cask-mode))

(with-delayed-execution
  (message "Install cask-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/cask-mode"))
  (autoload-if-found '(cask-mode) "cask-mode" nil t)
  (add-to-list 'auto-mode-alist '("/Cask\\'" . cask-mode)))

7.7. cfn-mode

(eval-when-compile
  (el-get-bundle 'cfn-mode))

(with-delayed-execution
  (message "Install cfn-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/cfn-mode"))
  (autoload-if-found '(cfn-mode) "cfn-mode" nil t)
  (add-to-list 'magic-mode-alist '("\\(---\n\\)?AWSTemplateFormatVersion:" . cfn-mode)))

7.8. clojure-mode

(eval-when-compile
  (el-get-bundle 'clojure-mode))

(with-delayed-execution
  (message "Install clojure-mode")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/clojure-mode")))

  (autoload-if-found '(clojure-mode clojurescript-mode) "clojure-mode" nil t)

  (add-to-list 'auto-mode-alist '("\\.clj$" . clojure-mode))
  (add-to-list 'auto-mode-alist '("\\.cljs$" . clojurescript-mode))

  (with-eval-after-load 'clojure-mode
    ;; config
    (setq clojure-toplevel-inside-comment-form t)

    ;; hook
    ;; (add-hook 'clojure-mode-hook #'lsp-deferred)

    ;; keybind
    (define-key clojure-mode-map (kbd "C-:") #'avy-goto-word-1)))

7.9. cmake-mode

(eval-when-compile
  (el-get-bundle 'cmake-mode))

(with-delayed-execution
  (message "Install cmake...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/cmake-mode")))
  (autoload-if-found '(cmake-mode) "cmake-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.cmake$" . cmake-mode)))

7.10. coffee-mode

(eval-when-compile
  (el-get-bundle 'coffee-mode))

(with-delayed-execution
  (message "Install coffee-mode...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/coffee-mode")))
  (autoload-if-found '(coffee-mode) "coffee-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.coffee$" . coffee-mode)))

7.11. crontab-mode

(eval-when-compile
  (el-get-bundle 'crontab-mode))

(with-delayed-execution
  (message "Install crontab-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/crontab-mode"))
  (autoload-if-found '(crontab-mode) "crontab-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.?cron\\(tab\\)?\\'" . crontab-mode)))

7.12. csharp-mode

(eval-when-compile
  (el-get-bundle 'csharp-mode))

(with-delayed-execution
  (message "Install csharp-mode...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/csharp-mode")))
  (autoload-if-found '(csharp-mode) "csharp-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.cs$" . csharp-mode)))

7.13. css-mode

(with-eval-after-load 'css-mode
  (add-hook 'css-mode-hook #'lsp-deferred))

7.14. csv-mode

(eval-when-compile
  (el-get-bundle 'csv-mode))

(with-delayed-execution
  (message "Install csv-mode...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/csv-mode")))
  (when (autoload-if-found '(csv-mode) "csv-mode" nil t)
    (push '("\\.csv$" . csv-mode) auto-mode-alist)))

7.15. cuda-mode

(eval-when-compile
  (el-get-bundle 'cuda-mode))

(with-delayed-execution
  (message "Install cuda-mode...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/cuda-mode")))
  (autoload-if-found '(cuda-mode) "cuda-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.cu$" . cuda-mode)))

7.16. crystal-mode

(eval-when-compile
  (el-get-bundle 'emacs-crystal-mode
    :url "https://github.com/jpellerin/emacs-crystal-mode.git"))

(with-delayed-execution
  (message "Install crystal-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/emacs-crystal-mode"))
  (autoload-if-found '(crystal-mode) "crystal-mode" nil t)
  (add-to-list 'auto-mode-alist '("Projectfile$" . crystal-mode))
  (add-to-list 'auto-mode-alist
               (cons (purecopy (concat "\\(?:\\."
                                       "cr"
                                       "\\)\\'")) 'crystal-mode)))

7.17. dart-mode

(eval-when-compile
  (el-get-bundle 'dart-mode))

(with-delayed-execution
  (message "Install dart-mode...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/dart-mode")))
  (autoload-if-found '(dart-mode) "dart-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.dart$" . dart-mode)))

7.18. dhall-mode

(eval-when-compile
  (el-get-bundle 'dhall-mode))

(with-delayed-execution
  (message "Install dhall-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/dhall-mode"))
  (autoload-if-found '(dhall-mode) "dhall-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.dhall$" . dhall-mode)))

7.19. direnv-mode

(eval-when-compile
  (el-get-bundle 'direnv))

(with-delayed-execution
  (message "Install direnv-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/direnv"))
  (autoload-if-found '(direnv-mode direnv-envrc-mode) "direnv" nil t)
  (add-to-list 'auto-mode-alist '("\\.envrc" . direnv-envrc-mode))
  (direnv-mode))

7.20. docker-compose-mode

(eval-when-compile
  (el-get-bundle 'docker-compose-mode))

(with-delayed-execution
  (message "Install docker-comopse-mode...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/docker-compose-mode")))
  (autoload-if-found '(docker-compose-mode) "docker-compose-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\docker-compose*" . docker-compose-mode)))

7.21. dockerfile-mode

(eval-when-compile
  (el-get-bundle 'dockerfile-mode))

(with-delayed-execution
  (message "Install dockerfile-mode...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/dockerfile-mode")))
  (autoload-if-found '(dockerfile-mode) "dockerfile-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\Dockerfile$" . dockerfile-mode)))

7.22. dotenv-mode

(eval-when-compile
  (el-get-bundle 'dotenv-mode))

(with-delayed-execution
  (message "Install dotenv-mode...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/dotenv-mode")))
  (autoload-if-found '(dotenv-mode) "dotenv-mode" nil t)
  (add-to-list 'auto-mode-alist '(".env" . dotenv-mode))
  (add-to-list 'auto-mode-alist '("\\.env\\..*\\'" . dotenv-mode)))

7.23. elixir-mode

(eval-when-compile
  (el-get-bundle 'elixir-mode))

(with-delayed-execution
  (message "Install elixir-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/elixir-mode"))
  (autoload-if-found '(elixir-mode) "elixir-mode" nil t)

  (add-to-list 'auto-mode-alist '("\\.elixir$" . elixir-mode))
  (add-to-list 'auto-mode-alist '("\\.ex$" . elixir-mode))
  (add-to-list 'auto-mode-alist '("\\.exs$" . elixir-mode))
  (add-to-list 'auto-mode-alist '("mix\\.lock" . elixir-mode)))

7.24. elm-mode

(eval-when-compile
  (el-get-bundle 'elm-mode))

(with-delayed-execution
  (message "Install elm-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/elm-mode"))
  (autoload-if-found '(elm-mode) "elm-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.elm$" . elm-mode)))

7.25. fish-mode

(eval-when-compile
  (el-get-bundle 'fish-mode))

(with-delayed-execution
  (message "Install fish-mode...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/fish-mode")))
  (autoload-if-found '(fish-mode) "fish-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.fish$" . fish-mode))
  (with-eval-after-load 'fish-mode
    (setq fish-enable-auto-indent t)))

7.26. forth-mode

(eval-when-compile
  (el-get-bundle 'forth-mode))

(with-delayed-execution
  (message "Install forth-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/forth-mode"))
  (autoload-if-found '(forth-mode) "forth-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.f$" . forth-mode))
  (add-to-list 'auto-mode-alist '("\\.fs$" . forth-mode))
  (add-to-list 'auto-mode-alist '("\\.fth$" . forth-mode))
  (add-to-list 'auto-mode-alist '("\\.forth$" . forth-mode))
  (add-to-list 'auto-mode-alist '("\\.4th$" . forth-mode)))

7.27. fortran

(with-delayed-execution
  (message "Install fortran...")
  (autoload-if-found '(f90-mode) "f90" nil t)
  (add-to-list 'auto-mode-alist '("\\.f\\(y90\\|y?pp\\)\\'" . f90-mode))
  (with-eval-after-load 'f90
    (add-hook 'f90-mode-hook #'lsp)))

7.28. fsharp-mode

(eval-when-compile
  (el-get-bundle 'fsharp-mode))

(with-delayed-execution
  (message "Install fsharp-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/fsharp-mode"))
  (autoload-if-found '(fsharp-mode) "fsharp-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.fs[iylx]?$" . fsharp-mode)))

7.29. git-modes

(eval-when-compile
  (el-get-bundle 'git-modes))

(with-delayed-execution
  (message "Install git-modes...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/git-modes")))
  (autoload-if-found '(gitignore-mode gitconfig-mode gitattributes-mode) "git-modes" nil t)

  ;; gitignore-mode
  (add-to-list 'auto-mode-alist '("\\.dockerignore$" . gitignore-mode))
  (add-to-list 'auto-mode-alist '("\\.gitignore$" . gitignore-mode))
  (add-to-list 'auto-mode-alist '("\\.prettierignore$" . gitignore-mode))
  (add-to-list 'auto-mode-alist '("/git/ignore\\'" . gitignore-mode))

  ;; gitconfig-mode
  (add-to-list 'auto-mode-alist '("\\.git-pr-release$" . gitconfig-mode))
  (add-to-list 'auto-mode-alist '("\\.editorconfig$" . gitconfig-mode))
  (add-to-list 'auto-mode-alist '("\\.gitconfig$" . gitconfig-mode))
  (add-to-list 'auto-mode-alist '("/\\.git/config\\'" . gitconfig-mode))
  (add-to-list 'auto-mode-alist '("/modules/.*/config\\'" . gitconfig-mode))
  (add-to-list 'auto-mode-alist '("/git/config\\'" . gitconfig-mode))
  (add-to-list 'auto-mode-alist '("/\\.gitmodules\\'" . gitconfig-mode))
  (add-to-list 'auto-mode-alist '("/etc/gitconfig\\'" . gitconfig-mode))

  ;; gitattributes
  (add-to-list 'auto-mode-alist '("/\\.gitattributes\\'" . gitattributes-mode))
  (add-to-list 'auto-mode-alist '("/info/attributes\\'" . gitattributes-mode))
  (add-to-list 'auto-mode-alist '("/git/attributes\\'" . gitattributes-mode)))

7.30. glsl-mode

(eval-when-compile
  (el-get-bundle 'glsl-mode))

(with-delayed-execution
  (message "Install glsl-mode")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/glsl-mode")))
  (autoload-if-found '(glsl-mode) "glsl-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.vsh$" . glsl-mode))
  (add-to-list 'auto-mode-alist '("\\.fsh$" . glsl-mode)))

7.31. go-mode

(eval-when-compile
  (el-get-bundle 'go-mode))

(with-delayed-execution
  (message "Install go-mode...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/go-mode")))

  (autoload-if-found '(go-mode) "go-mode" nil t)

  (add-to-list 'auto-mode-alist '("\\.go$" . go-mode))
  (add-to-list 'auto-mode-alist '("^go.mod$" . go-mode))

  (with-eval-after-load 'go-mode
    (add-hook 'go-mode-hook #'lsp-deferred)
    (add-hook 'before-save-hook #'gofmt-before-save)
    (setq gofmt-command "goimports")))

7.32. gradle-mode

(eval-when-compile
  (el-get-bundle 'gradle-mode))

(with-delayed-execution
  (message "Install gradle-mode...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/gradle-mode")))
  (autoload-if-found '(gradle-mode) "gradle-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.gradle$" . gradle-mode)))

7.33. graphql-mode

(eval-when-compile
  (el-get-bundle 'graphql-mode))

(with-delayed-execution
  (message "Install graphql-mode...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/graphql-mode")))
  (autoload-if-found '(graphql-mode) "graphql-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.graphql\\'" . graphql-mode))
  (with-eval-after-load 'graphql-mode
    (setq graphql-indent-level 4)))

7.34. graphviz-dot-mode

(eval-when-compile
  (el-get-bundle 'graphviz-dot-mode))

(with-delayed-execution
  (message "Install graphviz-dot-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/graphviz-dot-mode"))
  (autoload-if-found '(graphviz-dot-mode) "graphviz-dot-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.dot\\'" . graphviz-dot-mode))
  (add-to-list 'auto-mode-alist '("\\.gv\\'" . graphviz-dot-mode))
  (with-eval-after-load 'graphviz-dot-mode
    (setq graphviz-dot-auto-indent-on-semi nil)
    (setq graphviz-dot-indent-width 2)))

7.35. groovy-mode

(eval-when-compile
  (el-get-bundle 'groovy-mode))

(with-delayed-execution
  (message "Install groovy-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/groovy-mode"))
  (autoload-if-found '(groovy-mode) "groovy-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.g\\(?:ant\\|roovy\\|radle\\)\\'" . groovy-mode))
  (add-to-list 'auto-mode-alist '("/Jenkinsfile\\'" . groovy-mode))
  (add-to-list 'interpreter-mode-alist '("groovy" . groovy-mode)))

7.36. hack-mode

(eval-when-compile
  (el-get-bundle 'hack-mode))

(with-delayed-execution
  (message "Install hack-mode...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/hack-mode")))
  (autoload-if-found '(hack-mode) "hack-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.hack$" . hack-mode))
  (add-to-list 'auto-mode-alist '("\\.hck$" . hack-mode))
  (add-to-list 'auto-mode-alist '("\\.hhi$" . hack-mode)))

7.37. haskell-mode

(eval-when-compile
  (el-get-bundle "haskell/haskell-mode"))

(with-delayed-execution
  (message "Install haskell-mode...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/haskell-mode")))

  (autoload-if-found '(haskell-doc-current-info) "haskell-doc" nil t)

  (autoload-if-found '(haskell-mode) "haskell-mode" nil t)

  (add-to-list 'auto-mode-alist '("\\.hs$" . haskell-mode))
  (add-to-list 'auto-mode-alist '("\\.cable$" . haskell-mode)))

7.38. hy-mode

(eval-when-compile
  (el-get-bundle 'hy-mode))

(with-delayed-execution
  (message "Install hy-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/hy-mode"))
  (autoload-if-found '(hy-mode) "hy-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.hy$" . hy-mode)))

7.39. ini-mode

(eval-when-compile
  (el-get-bundle 'ini-mode))

(with-delayed-execution
  (message "Install ini-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/ini-mode"))
  (autoload-if-found '(ini-mode) "ini-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.ini$" . ini-mode)))

7.40. java-mode

(with-delayed-execution
  (message "Install java-mode...")
  (autoload-if-found '(java-mode) "java-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.java$" . java-mode)))

7.41. js2-mode

(eval-when-compile
  (el-get-bundle 'js2-mode))

(with-delayed-execution
  (message "Install js2-mode...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/js2-mode")))
  (autoload-if-found '(js2-mode) "js2-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
  (with-eval-after-load 'js2-mode
    (setq js2-strict-missing-semi-warning nil)
    (setq js2-missing-semi-one-line-override nil)
    (add-hook 'js2-mode-hook #'lsp-deferred)))

7.42. json-mode

(eval-when-compile
  (el-get-bundle "Sterlingg/json-snatcher")
  (el-get-bundle "joshwnj/json-mode"))

(with-delayed-execution
  (message "Install json-mode...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/json-snatcher")))
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/json-mode")))
  (autoload-if-found '(json-mode) "json-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.json$" . json-mode))
  (add-to-list 'auto-mode-alist '("\\.textlintrc$" . json-mode))
  (add-to-list 'auto-mode-alist '("\\.prettierrc$" . json-mode))
  (add-to-list 'auto-mode-alist '("\\composer.lock$" . json-mode)))

7.43. kotlin-mode

(eval-when-compile
  (el-get-bundle 'kotlin-mode))

(with-delayed-execution
  (message "Install kotlin-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/kotlin-mode"))
  (autoload-if-found '(kotlin-mode) "kotlin-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.kts?\\'" . kotlin-mode)))

7.44. lisp-mode

(with-delayed-execution
  (autoload-if-found '(lisp-mode) "lisp-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.lemrc$" . lisp-mode)))

7.45. lua-mode

(eval-when-compile
  (el-get-bundle 'lua-mode))

(with-delayed-execution
  (message "Install lua-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/lua-mode"))
  (autoload-if-found '(lua-mode) "lua-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.lua$" . lua-mode)))

7.46. markdown-mode

(eval-when-compile
  (el-get-bundle markdown-mode))

(with-delayed-execution
  (message "Install markdown-mode...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/poly-markdown")))
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/markdown-mode")))

  (autoload-if-found '(markdown-mode) "markdown-mode" nil t)

  (add-to-list 'auto-mode-alist '("\\.md$" . markdown-mode))
  (add-to-list 'auto-mode-alist '("\\.markdown$" . markdown-mode))

  (with-eval-after-load 'markdown-mode
    (setq markdown-code-lang-modes (append '(("diff" . diff-mode)
                                             ("hs" . haskell-mode)
                                             ("html" . web-mode)
                                             ("ini" . conf-mode)
                                             ("js" . web-mode)
                                             ("jsx" . web-mode)
                                             ("md" . markdown-mode)
                                             ("pl6" . raku-mode)
                                             ("py" . python-mode)
                                             ("rb" . ruby-mode)
                                             ("rs" . rustic-mode)
                                             ("sqlite3" . sql-mode)
                                             ("ts" . web-mode)
                                             ("tsx" . web-mode)
                                             ("yaml". yaml-mode)
                                             ("zsh" . sh-mode)
                                             ("php" . php-mode))
                                           markdown-code-lang-modes))))

7.47. makefile-mode

(with-delayed-execution
  (autoload-if-found '(makefile-mode) "makefile-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.mk$" . makefile-mode))
  (add-to-list 'auto-mode-alist '("Makefile" . makefile-mode)))

7.48. nasm-mode

(eval-when-compile
  (el-get-bundle 'nasm-mode))

(with-delayed-execution
  (message "Install nasm-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/nasm-mode"))
  (autoload-if-found '(nasm-mode) "nasm-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.s$" . nasm-mode)))

7.49. neon-mode

(eval-when-compile
  (el-get-bundle 'neon-mode))

(with-delayed-execution
  (message "Install neon-mode...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/neon-mode")))
  (autoload-if-found '(neon-mode) "neon-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.neon$" . neon-mode)))

7.50. nim-mode

(eval-when-compile
  (el-get-bundle 'nim-mode))

(with-delayed-execution
  (message "Install nim-mode...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/nim-mode")))
  (autoload-if-found '(nim-mode) "nim-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.nim\\'" . nim-mode)))

7.51. ninja-mode

(eval-when-compile
  (el-get-bundle 'ninja-mode))

(with-delayed-execution
  (message "Install ninja-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/ninja-mode"))
  (autoload-if-found '(ninja-mode) "ninja-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.ninja$" . ninja-mode)))

7.52. nix-mode

(eval-when-compile
  (el-get-bundle 'nix-mode))

(with-delayed-execution
  (message "Install nix-mode...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/nix-mode")))
  (autoload-if-found '(nix-mode) "nix-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.nix\\'" . nix-mode)))

7.53. nginx-mode

(eval-when-compile
  (el-get-bundle 'nginx-mode))

(with-delayed-execution
  (message "Install nginx-mode...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/nginx-mode")))
  (autoload-if-found '(nginx-mode) "nginx-mode" nil t)

  (add-to-list 'auto-mode-alist '("nginx\\.conf\\'" . nginx-mode))
  (add-to-list 'auto-mode-alist '("/nginx/.+\\.conf\\'" . nginx-mode))
  (add-to-list 'auto-mode-alist '("/nginx/sites-\\(?:available\\|enabled\\)/" . nginx-mode))

  (with-eval-after-load 'nginx-mode
    (setq nginx-indent-tabs-mode t)))

7.54. nov-mode

(eval-when-compile
  (el-get-bundle 'nov :url "https://depp.brause.cc/nov.el.git"))

(with-delayed-execution
  (message "Install nov-mode...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/nov")))
  (autoload-if-found '(nov-mode) "nov" nil t)
  (add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode)))

7.55. pcap-mode

(eval-when-compile
  (el-get-bundle 'pcap-mode))

(with-delayed-execution
  (message "Install pcap-mode...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/pcap")))
  (autoload-if-found '(pcap-mode) "pcap" nil t)
  (add-to-list 'auto-mode-alist '("\\.pcap$" . pcap-mode)))

7.56. php-mode

(eval-when-compile
  (el-get-bundle "emacs-php/php-mode"))

(with-delayed-execution
  (message "Install php-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/php-mode/lisp"))

  (autoload-if-found '(php-mode php-current-class php-current-namespace) "php-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.php$" . php-mode))

  (with-eval-after-load 'php-mode
    ;; hook
    (add-hook 'php-mode-hook #'lsp-deferred)

    ;; keybind
    (define-key php-mode-map (kbd "C-c C--") #'php-current-class)
    (define-key php-mode-map (kbd "C-c C-=") #'php-current-namespace)

    ;; config
    (setq php-mode-coding-style 'psr2)))

7.57. phpt-mode

(eval-when-compile
  (el-get-bundle 'phpt-mode))

(with-delayed-execution
  (message "Install phpt-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/phpt-mode"))
  (autoload-if-found '(phpt-mode) "phpt-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.phpt$" . phpt-mode)))

7.58. plantuml-mode

(eval-when-compile
  (el-get-bundle 'plantuml-mode))

(with-delayed-execution
  (message "Install plantuml-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/plantuml-mode"))
  (autoload-if-found '(plantuml-mode) "plantuml-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.pu$" . plantuml-mode)))

7.59. pug-mode

(eval-when-compile
  (el-get-bundle 'pug-mode))

(with-delayed-execution
  (message "Install pug-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/pug-mode"))
  (autoload-if-found '(pug-mode) "pug-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.pug$" . pug-mode)))

7.60. prisma-mode

(eval-when-compile
  (el-get-bundle 'prisma-mode
    :url "https://github.com/pimeys/emacs-prisma-mode.git"))

(with-delayed-execution
  (message "Install prisma-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/prisma-mode"))
  (autoload-if-found '(prisma-mode) "prisma-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.prisma" . prisma-mode)))

7.61. processing-mode

(eval-when-compile
  (el-get-bundle 'processing-mode))

(with-delayed-execution
  (message "Install processing-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/processing-mode"))
  (autoload-if-found '(processing-mode) "processing-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.pde$" . processing-mode))
  (with-eval-after-load 'processing-mode
    (setq processing-location "/opt/processing/processing-java")
    (setq processing-output-dir "/tmp")))

7.62. python-mode

(eval-when-compile
  (el-get-bundle 'python-mode))

(with-delayed-execution
  (message "Install python-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/python-mode"))
  (autoload-if-found '(python-mode) "python-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.py$" . python-mode)))

7.63. robots-txt-mode

(eval-when-compile
  (el-get-bundle 'robots-txt-mode
    :url "https://github.com/emacs-php/robots-txt-mode.git"))

(with-delayed-execution
  (message "Install robots-txt-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/robots-txt-mode"))
  (autoload-if-found '(robots-txt-mode) "robots-txt-mode" nil t)
  (add-to-list 'auto-mode-alist '("/robots\\.txt\\'" . robots-txt-mode)))

7.64. ruby-mode

(eval-when-compile
  (el-get-bundle 'ruby-mode))

(with-delayed-execution
  (message "Install ruby-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/ruby-mode"))
  (autoload-if-found '(ruby-mode) "ruby-mode" nil t)

  (add-to-list 'auto-mode-alist '("\\.rb$" . ruby-mode))
  (add-to-list 'auto-mode-alist '("\\.irbrc$" . ruby-mode))
  (add-to-list 'auto-mode-alist '("Capfile" . ruby-mode))
  (add-to-list 'auto-mode-alist '("Gemfile" . ruby-mode))
  (add-to-list 'auto-mode-alist '("Schemafile" . ruby-mode))
  (add-to-list 'auto-mode-alist '(".pryrc" . ruby-mode))
  (add-to-list 'auto-mode-alist '("Fastfile" . ruby-mode))
  (add-to-list 'auto-mode-alist '("Matchfile" . ruby-mode))
  (add-to-list 'auto-mode-alist '("Procfile" . ruby-mode))
  (add-to-list 'auto-mode-alist '(".git-pr-template" . ruby-mode))
  (add-to-list 'auto-mode-alist '(".gemrc" . ruby-mode))

  (with-eval-after-load 'ruby-mode
    (setq ruby-insert-encoding-magic-comment nil)
    (add-hook 'ruby-mode-hook #'lsp-deferred)))

7.65. rust-mode

(eval-when-compile
  (el-get-bundle 'rust-mode))

(with-delayed-execution
  (message "Install rust-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/rust-mode"))
  (autoload-if-found '(rust-mode) "rust-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.rs$" . rust-mode))

  (with-eval-after-load 'rust-mode
    (setq rust-format-on-save t)
    (add-hook 'rust-mode-hook #'lsp)))

7.66. scala-mode

(eval-when-compile
  (el-get-bundle 'scala-mode))

(with-delayed-execution
  (message "Install scala-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/scala-mode"))
  (autoload-if-found '(scala-mode) "scala-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.scala$" . scala-mode)))

7.67. scheme-mode

(with-delayed-execution
  (message "Install scheme...")
  (autoload-if-found '(scheme-mode) "scheme-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.scheme$" . scheme-mode))
  (add-to-list 'auto-mode-alist '(".guix-channel" . scheme-mode))
  (with-eval-after-load 'scheme
    (setq scheme-program-name "gosh -i")))

7.68. scss-mode

(eval-when-compile
  (el-get-bundle 'scss-mode))

(with-delayed-execution
  (message "Install scss-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/scss-mode"))

  (autoload-if-found '(scss-mode) "scss-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.scss$" . scss-mode))

  (with-eval-after-load 'scss-mode
    (add-hook 'scss-mode-hook #'(lambda ()
                                  (let ((lsp-diagnostics-provider :none))
                                    (lsp-deferred))))))

7.69. slim-mode

(eval-when-compile
  (el-get-bundle 'slim-mode))

(with-delayed-execution
  (message "Install slim-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/slim-mode"))
  (autoload-if-found '(slim-mode) "slim-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.slim$" . slim-mode)))

7.70. solidity-mode

(eval-when-compile
  (el-get-bundle 'solidity-mode))

(with-delayed-execution
  (message "Install solidity-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/solidity-mode"))
  (autoload-if-found '(solidity-mode) "solidity-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.sol$" . solidity-mode)))

7.71. ssh-config-mode

(eval-when-compile
  (el-get-bundle 'ssh-config-mode))

(with-delayed-execution
  (message "Install ssh-config-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/ssh-config-mode"))
  (autoload-if-found '(ssh-config-mode ssh-known-hosts-mode ssh-authorized-keys-mode) "ssh-config-mode" nil t)
  (add-to-list 'auto-mode-alist '("/\\.ssh/config\\(\\.d/.*\\.conf\\)?\\'" . ssh-config-mode))
  (add-to-list 'auto-mode-alist '("/sshd?_config\\(\\.d/.*\\.conf\\)?\\'" . ssh-config-mode))
  (add-to-list 'auto-mode-alist '("/known_hosts\\'" . ssh-config-mode))
  (add-to-list 'auto-mode-alist '("/authorized_keys2?\\'" . ssh-config-mode)))

7.72. sql-mode

(with-eval-after-load 'sql
  (load-library "sql-indent")

  ;; config
  (setq sql-user "root")
  (setq sql-password "P@ssw0rd")
  (setq sql-server "127.0.0.1")
  (setq sql-port 13306)
  (setq sql-mysql-login-params '(server port user password database)))

7.73. swift-mode

(eval-when-compile
  (el-get-bundle 'swift-mode))

(with-delayed-execution
  (message "Install swift-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/swift-mode"))
  (autoload-if-found '(swift-mode) "swift-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.swift$" . swift-mode)))

7.74. syslog-mode

(eval-when-compile
  (el-get-bundle 'syslog-mode))

(with-delayed-execution
  (message "Install syslog-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/syslog-mode"))
  (autoload-if-found '(syslog-mode) "syslog-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.log$" . syslog-mode)))

7.75. systemd-mode

(eval-when-compile
  (el-get-bundle 'systemd-mode))

(with-delayed-execution
  (message "Install systemd-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/systemd-mode"))
  (autoload-if-found '(systemd-mode) "systemd" nil t)
  (add-to-list 'auto-mode-alist '("\\.nspawn\\'" . systemd-mode))
  (add-to-list 'auto-mode-alist `(,(rx (+? (any "a-zA-Z0-9-_.@\\")) "."
                                       (or "automount" "busname" "mount" "service" "slice"
                                           "socket" "swap" "target" "timer" "link" "netdev" "network")
                                       string-end)
                                  . systemd-mode))
  (add-to-list 'auto-mode-alist `(,(rx ".#"
                                       (or (and (+? (any "a-zA-Z0-9-_.@\\")) "."
                                                (or "automount" "busname" "mount" "service" "slice"
                                                    "socket" "swap" "target" "timer" "link" "netdev" "network"))
                                           "override.conf")
                                       (= 16 (char hex-digit)) string-end)
                                  . systemd-mode))
  (add-to-list 'auto-mode-alist `(,(rx "/systemd/" (+? anything) ".d/" (+? (not (any ?/))) ".conf" string-end)
                                  . systemd-mode)))

7.76. terraform-mode

(eval-when-compile
  (el-get-bundle 'terraform-mode))

(with-delayed-execution
  (message "Install terraform-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/terraform-mode"))
  (add-to-list 'load-path (locate-user-emacs-file "el-get/hcl-mode"))

  (autoload-if-found '(terraform-mode terraform-format-on-save-mode) "terraform-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.tf$" . terraform-mode))

  (with-eval-after-load 'terraform-mode
    (add-hook 'terraform-mode-hook #'terraform-format-on-save-mode)))

7.77. text-mode

(with-delayed-execution
  (autoload-if-found '(conf-space-mode) "conf-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.tigrc$" . conf-space-mode))
  (add-to-list 'auto-mode-alist '("\\.editrc$" . conf-space-mode))
  (add-to-list 'auto-mode-alist '("\\.inputrc$" . conf-space-mode))
  (add-to-list 'auto-mode-alist '("\\.colorrc$" . conf-space-mode)))

7.78. toml-mode

(eval-when-compile
  (el-get-bundle 'toml-mode))

(with-delayed-execution
  (message "Install toml-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/toml-mode"))
  (autoload-if-found '(toml-mode) "toml-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.toml$" . toml-mode)))

7.79. typescript-mode

(eval-when-compile
  (el-get-bundle 'typescript-mode))

(with-delayed-execution
  (message "Install typescript-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/typescript-mode"))

  (when (autoload-if-found '(typescript-mode typescript-tsx-mode) "typescript-mode" nil t)
    (define-derived-mode typescript-tsx-mode typescript-mode "tsx")

    ;; for ts/deno
    (add-to-list 'auto-mode-alist '("\\.ts$" . typescript-mode))
    (defun my/run-local-vars-mode-hook ()
      "Run `major-mode' hook after the local variables have been processed."
      (run-hooks (intern (concat (symbol-name major-mode) "-local-vars-hook"))))

    (add-hook 'hack-local-variables-hook #'my/run-local-vars-mode-hook)
    (add-hook 'typescript-mode-local-vars-hook #'lsp)

    ;; for tsx
    ;; (add-to-list 'auto-mode-alist '("\\.js$" . typescript-tsx-mode))
    (add-to-list 'auto-mode-alist '("\\.jsx$" . typescript-tsx-mode))
    (add-to-list 'auto-mode-alist '("\\.tsx$" . typescript-tsx-mode))
    (add-hook 'typescript-tsx-mode-hook #'lsp-deferred)))

7.80. v-mode

(eval-when-compile
  (el-get-bundle 'v-mode))

(with-delayed-execution
  (message "Install v-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/v-mode"))

  (autoload-if-found '(v-mode v-menu v-format-buffer) "v-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\(\\.v?v\\|\\.vsh\\)$" . v-mode))

  (with-eval-after-load 'v-mode
    (define-key v-mode-map (kbd "M-z") #'v-menu)
    (define-key v-mode-map (kbd "C-c C-f") #'v-format-buffer)))

7.81. vue-mode

(eval-when-compile
  (el-get-bundle 'ssass-mode)
  (el-get-bundle 'vue-html-mode)
  (el-get-bundle "purcell/mmm-mode")
  (el-get-bundle "Fanael/edit-indirect")
  (el-get-bundle 'vue-mode))

(with-delayed-execution
  (message "Install vue-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/ssass-mode"))
  (add-to-list 'load-path (locate-user-emacs-file "el-get/vue-html-mode"))
  (add-to-list 'load-path (locate-user-emacs-file "el-get/mmm-mode"))
  (add-to-list 'load-path (locate-user-emacs-file "el-get/edit-indirect"))
  (add-to-list 'load-path (locate-user-emacs-file "el-get/vue-mode"))

  (autoload-if-found '(vue-mode) "vue-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.vue$" . vue-mode))

  (with-eval-after-load 'vue-html-mode
    (setq vue-html-extra-indent 4)))

7.82. vimrc-mode

(eval-when-compile
  (el-get-bundle 'vimrc-mode))

(with-delayed-execution
  (message "Install vimrc-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/vimrc-mode"))
  (autoload-if-found '(vimrc-mode) "vimrc-mode" nil t)
  (add-to-list 'auto-mode-alist '("vimrc" . vimrc-mode))
  (add-to-list 'auto-mode-alist '("\\.vim\\(rc\\)?\\'" . vimrc-mode))
  (with-eval-after-load 'vimrc-mode
    (add-hook 'vimrc-mode-hook #'lsp-deferred)))

7.83. wat-mode

(eval-when-compile
  (el-get-bundle 'wat-mode :url "https://github.com/devonsparks/wat-mode.git"))

(with-delayed-execution
  (message "Install wat-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/wat-mode"))
  (autoload-if-found '(wat-mode) "wat-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.wat?\\'" . wat-mode)))

7.84. web-mode

(eval-when-compile
  (el-get-bundle 'web-mode))

(with-delayed-execution
  (message "Install web-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/web-mode"))

  (autoload-if-found '(web-mode) "web-mode" nil t)

  (add-to-list 'auto-mode-alist '("\\.html$" . web-mode))
  (add-to-list 'auto-mode-alist '("\\.erb$" . web-mode))
  (add-to-list 'auto-mode-alist '("\\.gsp$" . web-mode))
  (add-to-list 'auto-mode-alist '("\\.svg$" . web-mode))
  (add-to-list 'auto-mode-alist '("\\.tpl$" . web-mode))
  (add-to-list 'auto-mode-alist '("\\.liquid$" . web-mode))

  (with-eval-after-load 'web-mode
    (setq web-mode-comment-style 2)
    (setq web-mode-enable-auto-pairing nil)
    (setq web-mode-enable-auto-indentation nil)))

7.85. web-php-blade-mode

(eval-when-compile
  (el-get-bundle 'web-php-blade-mode
    :url "https://github.com/takeokunn/web-php-blade-mode.git"))

(with-delayed-execution
  (message "Install web-php-blade-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/web-php-blade-mode"))
  (autoload-if-found '(web-php-blade-mode) "web-php-blade-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.blade.php$" . web-php-blade-mode)))

7.86. wolfram-mode

(eval-when-compile
  (el-get-bundle 'wolfram-mode))

(with-delayed-execution
  (message "Install wolfram-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/wolfram-mode"))

  (autoload-if-found '(wolfram-mode run-wolfram) "wolfram-mode" nil t)

  (add-to-list 'auto-mode-alist '("\\.m$" . wolfram-mode))
  (add-to-list 'auto-mode-alist '("\\.nb$" . wolfram-mode))
  (add-to-list 'auto-mode-alist '("\\.cbf$" . wolfram-mode))

  (with-eval-after-load 'wolfram-mode
    (setq wolfram-path "path-to-dir")))

7.87. yaml-mode

(eval-when-compile
  (el-get-bundle 'yaml-mode))

(with-delayed-execution
  (message "Install yaml-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/yaml-mode"))
  (autoload-if-found '(yaml-mode) "yaml-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.ya?ml$" . yaml-mode))
  (add-to-list 'auto-mode-alist '("phpstan.neon" . yaml-mode)))

7.88. yarn-mode

(eval-when-compile
  (el-get-bundle 'yarn-mode))

(with-delayed-execution
  (message "Install yarn-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/yarn-mode"))
  (autoload-if-found '(yarn-mode) "yarn-mode" nil t)
  (add-to-list 'auto-mode-alist '("yarn\\.lock\\'" . yarn-mode)))

7.89. zig-mode

(eval-when-compile
  (el-get-bundle 'zig-mode))

(with-delayed-execution
  (message "Install zig-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/zig-mode"))
  (autoload-if-found '(zig-mode) "zig-mode" nil t)
  (add-to-list 'auto-mode-alist '("\\.zig$" . zig-mode))
  (with-eval-after-load 'zig-mode
    (add-hook 'zig-mode-hook #'lsp-deferred)))

8. Awesome Package

8.1. Buffer

8.1.1. auto-save-buffers-enhanced

(eval-when-compile
  (el-get-bundle 'auto-save-buffers-enhanced))

(with-delayed-execution
  (message "Install auto-save-buffers-enhanced...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/auto-save-buffers-enhanced"))
  (autoload-if-found '(auto-save-buffers-enhanced) "auto-save-buffers-enhanced" nil t)
  (with-eval-after-load 'auto-save-buffers-enhanced
    (setq auto-save-buffers-enhanced-interval 10)))

8.1.2. editorconfig

(eval-when-compile
  (el-get-bundle 'editorconfig))

(with-delayed-execution
  (message "Install editorconfig...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/editorconfig"))
  (autoload-if-found '(editorconfig-mode) "editorconfig" nil t)
  (editorconfig-mode 1))

8.1.3. persistent-scratch

(eval-when-compile
  (el-get-bundle 'persistent-scratch))

(with-delayed-execution
  (message "Install persistent-scratch...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/persistent-scratch"))

  (autoload-if-found '(persistent-scratch-setup-default) "persistent-scratch" nil t)
  ;; (persistent-scratch-setup-default)

  (with-eval-after-load 'persistent-scratch
    (setq persistent-scratch-autosave-interval 100)))

8.1.4. popwin

(eval-when-compile
  (el-get-bundle 'popwin))

(with-delayed-execution
  (message "Install popwin...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/popwin"))
  (autoload-if-found '(popwin-mode) "popwin" nil t)
  (popwin-mode 1))

8.1.5. whitespace

(with-delayed-execution
  (message "Install whitespace...")
  (when (autoload-if-found '(global-whitespace-mode) "whitespace" nil t)
    (if window-system
        (global-whitespace-mode 1)))
  (with-eval-after-load 'whitespace
    (setq whitespace-style '(face tabs tab-mark spaces space-mark))
    (setq whitespace-display-mappings '((space-mark ?\u3000 [?\u25a1])
                                        (tab-mark ?\t [?\xBB ?\t] [?\\ ?\t])))))

8.2. Check

8.2.1. flycheck

(eval-when-compile
  (el-get-bundle 'flycheck))

(with-delayed-execution
  (message "Install flycheck...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/flycheck"))
  (autoload-if-found '(flycheck-mode flycheck-define-checker) "flycheck" nil t))

8.2.2. flycheck-textlint

(with-delayed-execution
  (flycheck-define-checker textlint
    "A linter for prose."
    :command ("npx" "textlint" "--format" "unix" source-inplace)
    :error-patterns
    ((warning line-start (file-name) ":" line ":" column ": "
              (id (one-or-more (not (any " "))))
              (message (one-or-more not-newline)
                       (zero-or-more "\n" (any " ") (one-or-more not-newline)))
              line-end))
    :modes (org-mode))
  (with-eval-after-load 'flycheck
    (add-to-list 'flycheck-checkers 'textlint)))

8.3. Client

8.3.1. md4rd

(eval-when-compile
  (el-get-bundle 'md4rd))

(with-delayed-execution
  (message "Install md4rd...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/md4rd"))
  (autoload-if-found '(md4rd
                       md4rd-login
                       md4rd-visit
                       md4rd-widget-expand-all
                       md4rd-widget-collapse-all
                       md4rd-reply
                       md4rd-upvote
                       md4rd-downvote
                       md4rd-widget-toggle-line
                       md4rd-refresh-login
                       md4rd-indent-all-the-lines) "md4rd" nil t)

  (with-eval-after-load 'md4rd
    (add-hook 'md4rd-mode-hook #'md4rd-indent-all-the-lines)
    (run-with-timer 0 3540 #'md4rd-refresh-login)

    ;; config
    (setq md4rd-subs-active '(emacs lisp+Common_Lisp prolog clojure))
    ;; (setq md4rd--oauth-access-token "your-access-token-here")
    ;; (setq md4rd--oauth-refresh-token "your-refresh-token-here")

    ;; keymap
    (define-key md4rd-mode-map (kbd "u") 'tree-mode-goto-parent)
    (define-key md4rd-mode-map (kbd "o") 'md4rd-open)
    (define-key md4rd-mode-map (kbd "v") 'md4rd-visit)
    (define-key md4rd-mode-map (kbd "e") 'tree-mode-toggle-expand)
    (define-key md4rd-mode-map (kbd "E") 'md4rd-widget-expand-all)
    (define-key md4rd-mode-map (kbd "C") 'md4rd-widget-collapse-all)
    (define-key md4rd-mode-map (kbd "n") 'widget-forward)
    (define-key md4rd-mode-map (kbd "j") 'widget-forward)
    (define-key md4rd-mode-map (kbd "h") 'backward-button)
    (define-key md4rd-mode-map (kbd "p") 'widget-backward)
    (define-key md4rd-mode-map (kbd "k") 'widget-backward)
    (define-key md4rd-mode-map (kbd "l") 'forward-button)
    (define-key md4rd-mode-map (kbd "q") 'kill-current-buffer)
    (define-key md4rd-mode-map (kbd "r") 'md4rd-reply)
    (define-key md4rd-mode-map (kbd "u") 'md4rd-upvote)
    (define-key md4rd-mode-map (kbd "d") 'md4rd-downvote)
    (define-key md4rd-mode-map (kbd "t") 'md4rd-widget-toggle-line)))

8.4. Color

8.4.1. ansi-color

(with-delayed-execution
  (message "Install ansi-color...")
  (autoload 'ansi-color-for-comint-mode-on "ansi-color" "Set `ansi-color-for-comint-mode' to t." t)
  (autoload-if-found '(ansi-color-for-comint-mode-on) "ansi-color" nil t)

  (with-eval-after-load 'shell-mode
    (add-hook 'shell-mode-hook #'ansi-color-for-comint-mode-on))

  (with-eval-after-load 'compile
    (add-hook 'compilation-filter-hook #'(lambda ()
                                           (ansi-color-apply-on-region (point-min) (point-max))))))

8.4.2. highlight-indent-guides

(eval-when-compile
  (el-get-bundle 'highlight-indent-guides))

(with-delayed-execution
  (message "Install highlight-indent-guides...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/highlight-indent-guides"))
  (autoload-if-found '(highlight-indent-guides-mode) "highlight-indent-guides" nil t)
  (with-eval-after-load 'yaml-mode
    (add-hook 'yaml-mode-hook #'highlight-indent-guides-mode))
  (with-eval-after-load 'highlight-indent-guides
    (setq highlight-indent-guides-method 'bitmap)))

8.4.3. hl-todo

(eval-when-compile
  (el-get-bundle 'hl-todo))

(with-delayed-execution
  (message "Install hl-todo...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/hl-todo"))
  (autoload-if-found '(global-hl-todo-mode) "hl-todo" nil t)
  (global-hl-todo-mode)
  (with-eval-after-load 'hl-todo
    (setq hl-todo-keyword-faces
          '(("TODO" . "#cc9393")
            ("FIXME" . "#cc9393")
            ("NOW" . "#dca3a3")
            ("WAIT" . "#d0bf8f")
            ("DONE" . "#afd8af")))))

8.4.4. xterm-color

(eval-when-compile
  (el-get-bundle 'xterm-color))

(with-delayed-execution
  (message "Install xterm-color...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/xterm-color"))

  (autoload-if-found '(xterm-color-filter) "xterm-color" nil t)

  (with-eval-after-load 'xterm-color
    (setenv "TERM" "xterm-256color")
    (setq xterm-color-preserve-properties t)))

8.5. Command

8.5.1. amx

(eval-when-compile
  (el-get-bundle 'amx))

(with-delayed-execution-priority-high
  (message "Install amx...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/amx"))
  (with-eval-after-load 'amx
    (setq amx-history-length 100)))

8.6. Completion

8.6.1. company

(eval-when-compile
  (el-get-bundle 'company))

(with-delayed-execution
  (message "Install company...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/company"))

  (autoload-if-found '(global-company-mode) "company" nil t)
  (global-company-mode)

  (with-eval-after-load 'company
    ;; keybind
    (define-key company-active-map (kbd "C-n") #'company-select-next)
    (define-key company-active-map (kbd "C-p") #'company-select-previous)

    ;; config
    (setq company-minimum-prefix-length 2)
    (setq company-idle-delay 0.2))

  (with-eval-after-load 'company-css
    (push 'company-css company-backends))

  (with-eval-after-load 'company-elisp
    (push 'company-elisp company-backends)))

8.6.2. company-box

(eval-when-compile
  (el-get-bundle 'company-box))

(with-delayed-execution
  (message "Install company-box...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/company-box"))
  (autoload-if-found '(company-box-mode) "company-box" nil t)

  (with-eval-after-load 'company-mode
    (when window-system
      (add-hook 'company-mode-hook #'company-box-mode)))

  (with-eval-after-load 'company-box-doc
    (setq company-box-doc-enable nil)))

8.6.3. company-dockerfile

(eval-when-compile
  (el-get-bundle 'company-dockerfile
    :url "https://github.com/takeokunn/company-dockerfile.git"))

(with-delayed-execution
  (message "Install company-dockerfile...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/company-dockerfile"))
  (autoload-if-found '(company-dockerfile) "company-dockerfile" nil t)
  (with-eval-after-load 'company
    (push 'company-dockerfile company-backends)))

8.6.4. company-glsl

(eval-when-compile
  (el-get-bundle 'company-glsl))

(with-delayed-execution
  (message "Install company-glsl...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/company-glsl"))
  (autoload-if-found '(company-glsl) "company-glsl" nil t)
  (with-eval-after-load 'company
    (push 'company-glsl company-backends)))

8.6.5. company-c-headers

(eval-when-compile
  (el-get-bundle 'company-c-headers))

(with-delayed-execution
  (message "Install company-c-headers...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/company-c-headers"))
  (autoload-if-found '(company-c-headers) "company-c-headers" nil t)
  (with-eval-after-load 'company
    (push 'company-c-headers company-backends)))

8.6.6. company-shell

(eval-when-compile
  (el-get-bundle "takeokunn/company-shell"))

(with-delayed-execution
  (message "Install company-shell...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/company-shell"))
  (autoload-if-found '(company-shell company-shell-env company-fish-shell) "company-shell" nil t)
  (with-eval-after-load 'company
    (push 'company-shell company-backends)
    (push 'company-shell-env company-backends)
    (push 'company-fish-shell company-backends)))

8.6.7. company-terraform

(eval-when-compile
  (el-get-bundle 'company-terraform))

(with-delayed-execution
  (message "Install company-terraform...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/company-terraform"))
  (autoload-if-found '(company-terraform) "company-terraform" nil t)

  (defun my/push-company-terraform ()
    (push 'company-terraform company-backends))

  (with-eval-after-load 'terraform-mode
    (add-hook 'terraform-mode-hook #'my/push-company-terraform)))

8.6.8. company-nginx

(eval-when-compile
  (el-get-bundle 'company-nginx))

(with-delayed-execution
  (message "Install company-nginx...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/company-nginx"))
  (autoload-if-found '(company-nginx) "company-nginx" nil t)
  (with-eval-after-load 'company
    (push 'company-nginx company-backends)))

8.6.9. company-gemoji

(eval-when-compile
  (el-get-bundle 'company-gemoji
    :url "https://github.com/takeokunn/company-gemoji.git"))

(with-delayed-execution
  (message "Install company-gemoji...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/company-gemoji"))
  (autoload-if-found '(company-gemoji) "company-gemoji" nil t)
  (with-eval-after-load 'company
    (push 'company-gemoji company-backends)))

8.6.10. company-lua

(eval-when-compile
  (el-get-bundle 'company-lua))

(with-delayed-execution
  (message "Install company-lua...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/company-lua"))
  (autoload-if-found '(company-lua) "company-lua" nil t)
  (with-eval-after-load 'company
    (push 'company-lua company-backends)))

8.6.11. company-org-block

(eval-when-compile
  (el-get-bundle 'company-org-block))

(with-delayed-execution
  (message "Install company-org-block...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/company-org-block"))
  (autoload-if-found '(company-org-block) "company-org-block" nil t)
  (with-eval-after-load 'company
    (push 'company-org-block company-backends)))

8.6.12. company-statistics

(eval-when-compile
  (el-get-bundle 'company-statistics))

(with-delayed-execution
  (message "Install company-statistics...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/company-statistics"))
  (autoload-if-found '(company-statistics-mode) "company-statistics" nil t)
  (company-statistics-mode))

8.7. Cursor

8.7.1. avy

(eval-when-compile
  (el-get-bundle 'avy))

(with-delayed-execution
  (message "Install avy...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/avy"))
  (autoload-if-found '(avy-goto-word-1) "avy" nil t)
  (global-set-key (kbd "C-:") #'avy-goto-word-1)
  (with-eval-after-load 'avy
    (setq avy-all-windows nil)
    (setq avy-background t)))

8.7.2. avy-zap

(eval-when-compile
  (el-get-bundle 'avy-zap))

(with-delayed-execution
  (message "Install avy-zap...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/avy-zap"))
  (autoload-if-found '(avy-zap-up-to-char-dwim) "avy-zap" nil t)
  (global-set-key (kbd "M-z") 'avy-zap-up-to-char-dwim))

8.7.3. expand-region

(eval-when-compile
  (el-get-bundle 'expand-region))

(with-delayed-execution
  (message "Install expand-region...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/expand-region"))
  (autoload-if-found '(er/expand-region) "expand-region" nil t)
  (transient-mark-mode)
  (global-set-key (kbd "C-M-@") 'er/expand-region))

8.7.4. multiple-cursors

(eval-when-compile
  (el-get-bundle 'multiple-cursors))

(with-delayed-execution
  (message "Install multiple-cursors...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/multiple-cursors"))
  (autoload-if-found '(mc/mark-next-like-this mc/mark-previous-like-this mc/mark-all-like-this) "multiple-cursors" nil t)
  (global-set-key (kbd "C->") #'mc/mark-next-like-this)
  (global-set-key (kbd "C-<") #'mc/mark-previous-like-this)
  (global-set-key (kbd "C-c C-<") #'mc/mark-all-like-this))

8.7.5. subword

(with-delayed-execution
  (message "Install subword...")
  (autoload-if-found '(my/delete-forward-block) "subword" nil t)
  (global-set-key (kbd "M-d") #'my/delete-forward-block)
  (defun my/delete-forward-block ()
    (interactive)
    (if (eobp)
        (message "End of buffer")
      (let* ((syntax-move-point
              (save-excursion
                (skip-syntax-forward (string (char-syntax (char-after))))
                (point)))
             (subword-move-point
              (save-excursion
                (subword-forward)
                (point))))
        (kill-region (point) (min syntax-move-point subword-move-point))))))

8.8. Dictionary

8.8.1. define-word

(eval-when-compile
  (el-get-bundle 'define-word))

(with-delayed-execution
  (message "Install define-word...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/define-word"))
  (defun my/define-word ()
    (interactive)
    (if (use-region-p)
        (call-interactively #'define-word-at-point)
      (call-interactively #'define-word)))
  (with-eval-after-load 'define-word
    (setq define-word-displayfn-alist
          '((wordnik . takeokunn/define-word--display-in-buffer)
            (openthesaurus . takeokunn/define-word--display-in-buffer)
            (webster . takeokunn/define-word--display-in-buffer)
            (weblio . takeokunn/define-word--display-in-buffer)))))

8.9. Dired

8.9.1. basic

(with-eval-after-load 'dired
  ;; config
  (setq dired-auto-revert-buffer nil)
  (setq dired-dwim-target t)
  (setq dired-hide-details-hide-symlink-targets nil)
  (setq dired-listing-switches "-alh")
  (setq dired-recursive-copies 'always)
  (setq dired-use-ls-dired nil)

  ;; hook
  (add-hook 'dired-mode-hook #'(lambda () (display-line-numbers-mode -1))))

8.9.2. dired-collapse

(eval-when-compile
  (el-get-bundle 'dired-collapse))

(with-delayed-execution
  (message "Install dired-collapse...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/dired-collapse"))
  (autoload-if-found '(dired-collapse-mode) "dired-collapse" nil t)
  (with-eval-after-load 'dired
    (add-hook 'dired-mode #'dired-collapse-mode)))

8.9.3. dired-filter

(eval-when-compile
  (el-get-bundle 'dired-filter))

(with-delayed-execution
  (message "Install dired-filter...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/dired-filter"))
  (autoload-if-found '(dired-filter-mode) "dired-filter" nil t)
  (with-eval-after-load 'dired
    (add-hook 'dired-mode #'dired-filter-mode)))

8.9.4. dired-hacks-utils

(eval-when-compile
  (el-get-bundle 'dired-hacks-utils))

(with-delayed-execution
  (message "Install dired-hacks-utils...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/dired-hacks-utils")))

8.9.5. dired-narrow

(eval-when-compile
  (el-get-bundle 'dired-narrow))

(with-delayed-execution
  (message "Install dired-narrow...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/dired-narrow"))
  (autoload-if-found '(dired-narrow-mode) "dired-narrow" nil t)
  (with-eval-after-load 'dired
    (add-hook 'dired-mode-hook #'dired-narrow-mode)))

8.9.6. dired-open

(eval-when-compile
  (el-get-bundle 'dired-open))

(with-delayed-execution
  (message "Install dired-open...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/dired-open"))
  (autoload-if-found '(dired-open-file) "dired-open" nil t)
  (with-eval-after-load 'dired
    (define-key dired-mode-map [remap dired-find-file] #'dired-open-file)))

8.9.7. dired-ranger

(eval-when-compile
  (el-get-bundle 'dired-ranger))

(with-delayed-execution
  (message "Install dired-ranger...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/dired-ranger"))
  (autoload-if-found '() "dired-ranger" nil t))

8.9.8. dired-quick-sort

(eval-when-compile
  (el-get-bundle 'dired-quick-sort))

(with-delayed-execution
  (message "Install dired-quick-sort...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/dired-quick-sort"))
  (autoload-if-found '(dired-quick-sort-setup) "dired-quick-sort" nil t)
  (with-eval-after-load 'dired
    (add-hook 'dired-mode-hook #'dired-quick-sort-setup)))

8.9.9. dired-subtree

(eval-when-compile
  (el-get-bundle 'dired-subtree))

(with-delayed-execution
  (message "Install dired-subtree...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/dired-subtree"))
  (autoload-if-found '(dired-subtree-apply-filter) "dired-subtree" nil t))

8.10. EWW

8.10.1. basic

(with-delayed-execution
  (message "Install eww...")

  (defun my/eww-rename-buffer ()
    "Rename the name of current EWW buffer."
    (let* ((title (plist-get eww-data :title))
           (url (file-name-base (eww-current-url)))
           (buffer-name (or (if (and title (> (length title) 0))
                                title
                              nil)
                            url "")))
      (rename-buffer (format "eww: %s" buffer-name) t)))

  ;; config
  (with-eval-after-load 'eww
    (setq eww-header-line-format nil)
    (setq eww-search-prefix "http://www.google.co.jp/search?q="))

  (with-eval-after-load 'browse-url
    (setq browse-url-browser-function 'eww-browse-url))

  ;; keybind
  (with-eval-after-load 'eww
    (define-key eww-mode-map (kbd "C") #'eww-set-character-encoding)
    (define-key eww-mode-map (kbd "C-j") #'eww-follow-link)
    (define-key eww-mode-map (kbd "T") #'eww-goto-title-heading)
    (define-key eww-mode-map (kbd "T") #'eww-goto-title-heading))

  ;; hooks
  (with-eval-after-load 'eww
    (add-hook 'eww-after-render #'my/eww-rename-buffer)))

8.10.2. eww-lnum

(eval-when-compile
  (el-get-bundle 'eww-lnum))

(with-delayed-execution
  (message "Install eww-lnum...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/eww-lnum"))
  (autoload-if-found '(eww-lnum-follow eww-lnum-universal) "eww-lnum" nil t)

  (with-eval-after-load 'eww
    (define-key eww-mode-map "f" #'eww-lnum-follow)
    (define-key eww-mode-map "F" #'eww-lnum-universal)))

8.11. File

8.11.1. recentf

(with-delayed-execution
  (message "Install recentf...")
  (autoload-if-found '(recentf-mode) "recentf" nil t)
  (recentf-mode 1)
  (with-eval-after-load 'recentf
    (setq recentf-max-menu-items 10000)
    (setq recentf-max-saved-items 10000)
    (setq recentf-auto-cleanup 'never)
    (setq recentf-save-file  "~/.emacs.d/.recentf")
    (setq recentf-exclude '(".recentf" "\\.gpg\\"))))

8.11.2. open-junk-file

(eval-when-compile
  (el-get-bundle 'open-junk-file))

(with-delayed-execution
  (message "Install open-junk-file...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/open-junk-file"))

  (autoload-if-found '(open-junk-file) "open-junk-file" nil t)

  (defun my/open-junk-file ()
    (interactive)
    (ivy-mode 0)
    (let ((default-directory (format-time-string "~/.emacs.d/.junk/%Y-%m%d-%H%M%S." (current-time))))
      (open-junk-file))
    (ivy-mode 1))

  (global-set-key (kbd "C-x j") #'my/open-junk-file)

  (with-eval-after-load 'open-junk-file
    (setq open-junk-file-format "")))

8.11.3. vlf

(eval-when-compile
  (el-get-bundle 'vlf
    :url "https://github.com/m00natic/vlfi.git"))

(with-delayed-execution
  (message "Install vlf...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/vlf"))
  (autoload-if-found '(vlf-disable-for-function) "vlf-setup" t)

  (vlf-disable-for-function tags-verify-table "etags")
  (vlf-disable-for-function tag-find-file-of-tag-noselect "etags")
  (vlf-disable-for-function helm-etags-create-buffer "helm-tags")

  (with-eval-after-load 'dired
    (define-key dired-mode-map (kbd "V") #'dired-vlf)))

8.12. Font

8.12.1. font-lock-studio

(eval-when-compile
  (el-get-bundle 'font-lock-studio))

(with-delayed-execution
  (message "Install font-lock-studio...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/font-lock-studio"))
  (autoload-if-found '(font-lock-studio) "font-lock-studio" nil t))

8.13. GC

8.13.1. gcmh

(eval-when-compile
  (el-get-bundle 'gcmh))

(with-delayed-execution
  (message "Install gcmh...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/gcmh"))

  (autoload-if-found '(gcmh-mode) "gcmh" nil t)

  ;; (gcmh-mode 1)

  ;; (defvar my/gcmh-status nil)

  ;; (advice-add #'garbage-collect
  ;;             :before
  ;;             (defun my/gcmh-log-start (&rest _)
  ;;               (when gcmh-verbose
  ;;                 (setq my/gcmh-status "Running GC..."))))

  ;; (advice-add #'gcmh-message
  ;;             :override
  ;;             (defun my/gcmh-message (format-string &rest args)
  ;;               (setq my/gcmh-status
  ;;                     (apply #'format-message format-string args))
  ;;               (run-with-timer 2 nil
  ;;                               (lambda ()
  ;;                                 (setq my/gcmh-status nil)))))

  (with-eval-after-load 'gcmh
    ;; config
    (setq gcmh-verbose nil)
    (setq gcmh-low-cons-threshold (* 800000 16))
    (setq gcmh-high-cons-threshold (* #x40000000 16))
    (setq gcmh-idle-delay 120)
    (setq gcmh-auto-idle-delay-factor 60)))

8.14. Git

8.14.1. magit

(eval-when-compile
  (el-get-bundle magit/transient)
  (el-get-bundle magit/ghub)
  (el-get-bundle magit/magit-popup)
  (el-get-bundle magit/with-editor)
  (el-get-bundle magit/magit))

(with-delayed-execution-priority-high
  (message "Install magit...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/transient/lisp"))
  (add-to-list 'load-path (locate-user-emacs-file "el-get/ghub/lisp"))
  (add-to-list 'load-path (locate-user-emacs-file "el-get/magit-pop"))
  (add-to-list 'load-path (locate-user-emacs-file "el-get/with-editor/lisp"))
  (add-to-list 'load-path (locate-user-emacs-file "el-get/magit/lisp"))

  (autoload-if-found '(global-git-commit-mode) "git-commit" nil t)
  (autoload-if-found '(magit-status magit-blame) "magit")

  (global-git-commit-mode)

  (defun my/magit-status ()
    (interactive)
    (let ((default-directory (locate-dominating-file default-directory ".git")))
      (magit-status)))

  (global-set-key (kbd "C-x g") #'my/magit-status)
  (global-set-key (kbd "C-x G") #'magit-blame)

  (with-eval-after-load 'magit
    (setq magit-refresh-status-buffer nil))

  (with-eval-after-load 'magit-base
    (setq magit-completing-read-function #'ivy-completing-read))

  (with-eval-after-load 'magit-status
    (define-key magit-status-mode-map (kbd "C-j") #'magit-visit-thing))

  (with-eval-after-load 'magit-log
    (define-key magit-log-mode-map (kbd "C-j") #'magit-visit-thing)))

8.14.2. magit-forge

(eval-when-compile
  (el-get-bundle "magit/forge"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-get/forge/lisp"))
  (add-hook 'magit-mode-hook #'(lambda () (require 'forge))))

8.14.3. git-gutter

(eval-when-compile
  (el-get-bundle 'git-gutter))

(with-delayed-execution
  (message "Install git-gutter...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/git-gutter"))
  (autoload-if-found '(git-gutter-mode) "git-gutter" nil t)

  (with-eval-after-load 'git-gutter
    ;; (add-hook 'prog-mode-hook #'git-gutter-mode)
    (setq git-gutter:update-hooks '(after-save-hook after-revert-hook))))

8.14.4. git-gutter-fringe

(eval-when-compile
  (el-get-bundle 'git-gutter-fringe))

(with-delayed-execution
  (message "Install git-gutter-fringe...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/git-gutter-fringe"))
  (autoload-if-found '(git-gutter-fr:init
                       git-gutter-fr:view-diff-infos
                       git-gutter-fr:clear) "git-gutter-fringe" nil t)

  (with-eval-after-load 'git-gutter
    (setq git-gutter-fr:side 'right-fringe)
    (setq git-gutter:window-width -1)
    (setq git-gutter:init-function #'git-gutter-fr:init)
    (setq git-gutter:view-diff-function #'git-gutter-fr:view-diff-infos)
    (setq git-gutter:clear-function #'git-gutter-fr:clear)))

8.14.5. git-timemachine

(eval-when-compile
  (el-get-bundle 'git-timemachine
    :url "https://codeberg.org/pidu/git-timemachine.git"))

(with-delayed-execution
  (message "Install git-timemachine...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/git-timemachine"))
  (autoload-if-found '(git-timemachine) "git-timemachine" nil t))

8.14.6. gist

(eval-when-compile
  (el-get-bundle 'gist))

(with-delayed-execution
  (message "Install gist...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/gist"))
  (autoload-if-found '(gist-mode) "gist" nil t))

8.14.7. blamer

(eval-when-compile
  (el-get-bundle 'blamer))

(with-delayed-execution
  (message "Install blamer...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/blamer"))
  (autoload-if-found '(blamer-mode) "blamer" nil t))

8.15. Googling

8.15.1. google-this

(eval-when-compile
  (el-get-bundle 'google-this))

(with-delayed-execution
  (message "Install google-this...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/google-this"))
  (autoload-if-found '(google-this) "google-this" nil t))

8.15.2. google-translate

(eval-when-compile
  (el-get-bundle 'google-translate
    :url "https://github.com/zonuexe/google-translate.git"))

(with-delayed-execution
  (message "Install google-translate...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/google-translate"))
  (autoload-if-found '(google-translate-at-point) "google-translate" nil t))

8.16. GPG

8.16.1. epa-file

(with-delayed-execution
  (message "Install epa-file...")
  (autoload-if-found '(epa-file-enable) "epa-file" nil t)
  (epa-file-enable)
  (with-eval-after-load 'epa-file
    (setq epa-file-cache-passphrase-for-symmetric-encryption t)))

8.16.2. pinentry

https://github.com/ch11ng/exwm/wiki#gpg-pinentry

(eval-when-compile
  (el-get-bundle 'pinentry))

(with-delayed-execution
  (message "Install pinentry...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/pinentry"))
  (autoload-if-found '(pinentry-start) "pinentry" nil t)
  (when-guix
   (pinentry-start)))

8.17. Help

8.17.1. helpful

(eval-when-compile
  (el-get-bundle 'helpful))

(with-delayed-execution
  (message "Install helpful...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/helpful"))
  (autoload-if-found '(helpful-callable
                       helpful-function
                       helpful-macro
                       helpful-command
                       helpful-key
                       helpful-variable
                       helpful-at-point) "helpful" nil t)
  ;; keybinds
  (when (not my/enable-c-h-backspace)
    (global-set-key (kbd "C-h f") #'helpful-callable)
    (global-set-key (kbd "C-h v") #'helpful-variable)
    (global-set-key (kbd "C-h k") #'helpful-key)
    (global-set-key (kbd "C-c C-d") #'helpful-at-point)
    (global-set-key (kbd "C-h F") #'helpful-function)
    (global-set-key (kbd "C-h C") #'helpful-command))

  (with-eval-after-load 'counsel
    (setq counsel-describe-function-function #'helpful-callable)
    (setq counsel-describe-variable-function #'helpful-variable)))

8.18. IME

8.18.1. ddskk

(eval-when-compile
  (el-get-bundle 'ddskk))

(with-delayed-execution-priority-high
  (message "Install ddskk...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/ddskk"))
  (autoload-if-found '(skk-mode) "skk" nil t)

  (global-set-key (kbd "C-x C-j") #'skk-mode)

  (defun my/skk-C-j-key (arg)
    (interactive "P")
    (cond
     ((and (null (skk-in-minibuffer-p))
           (null skk-henkan-mode))
      (skk-emulate-original-map arg))
     (t
      (skk-kakutei arg))))

  (with-eval-after-load 'skk
    (setq skk-preload t)
    (setq default-input-method "japanese-skk"))

  (with-eval-after-load 'skk-vars
    ;; use skkserv
    (when-darwin
     (setq skk-server-host "localhost")
     (setq skk-server-portnum 1178))

    ;; guix
    (when-guix
     (setq skk-user-directory "~/.my-skk-jisyo"))

    (setq skk-byte-compile-init-file t)
    (setq skk-isearch-mode-enable 'always)
    (setq skk-egg-like-newline t)
    (setq skk-show-annotation nil)
    (setq skk-auto-insert-paren t)

    ;; azik
    (setq skk-use-azik t)
    (setq skk-azik-keyboard-type 'jp106)

    ;; ref: https://github.com/skk-dev/ddskk/blob/master/etc/dot.skk#L752-L768
    (add-to-list 'skk-rom-kana-rule-list '(skk-kakutei-key nil my/skk-C-j-key))))

8.18.2. ddskk-posframe

(eval-when-compile
  (el-get-bundle 'ddskk-posframe))

(with-delayed-execution
  (message "Install ddskk-posframe...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/ddskk-posframe"))
  (autoload-if-found '(ddskk-posframe-mode) "ddskk-posframe" nil t)
  (with-eval-after-load 'skk
    (add-hook 'skk-mode-hook #'ddskk-posframe-mode)))

8.19. Joke

8.19.1. hacker-typer

(eval-when-compile
  (el-get-bundle 'hacker-typer))

(with-delayed-execution
  (message "Install hacker-typer...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/hacker-typer"))
  (autoload-if-found '(hacker-typer) "hacker-typer" nil t))

8.19.2. power-mode

(eval-when-compile
  (el-get-bundle 'power-mode
    :url "https://github.com/elizagamedev/power-mode.el.git"))

(with-delayed-execution
  (message "Install power-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/power-mode"))
  (autoload-if-found '(power-mode) "power-mode" nil t))

8.19.3. sudden-death

(eval-when-compile
  (el-get-bundle 'sudden-death
    :url "https://github.com/yewton/sudden-death.el.git"))

(with-delayed-execution
  (message "Install sudden-death...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/sudden-death"))
  (autoload-if-found '(sudden-death) "sudden-death" nil t))

8.19.4. redacted

(eval-when-compile
  (el-get-bundle 'redacted
    :url "https://github.com/bkaestner/redacted.el.git"))

(with-delayed-execution
  (message "Install redacted...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/redacted"))
  (autoload-if-found '(my/redacted-mode redacted-mode) "redacted" nil t)
  (defun my/redacted-mode ()
    (interactive)
    (read-only-mode (if redacted-mode -1 1))
    (redacted-mode (if redacted-mode -1 1))))

8.19.5. lorem ipsum

(eval-when-compile
  (el-get-bundle 'lorem-ipsum))

(with-delayed-execution
  (message "Install lorem-ipsum...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/lorem-ipsum"))
  (autoload-if-found '(lorem-ipsum-insert-sentences lorem-ipsum-insert-paragraphs lorem-ipsum-insert-list) "lorem-ipsum" nil t)
  (global-set-key (kbd "C-c C-l s") #'lorem-ipsum-insert-sentences)
  (global-set-key (kbd "C-c C-l p") #'lorem-ipsum-insert-paragraphs)
  (global-set-key (kbd "C-c C-l l") #'lorem-ipsum-insert-list))

8.20. Keyboard

8.20.1. key-chord

(eval-when-compile
  (el-get-bundle 'key-chord))

(with-delayed-execution
  (message "Install key-chord...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/key-chord"))
  (autoload-if-found '(key-chord-mode key-chord-define-global) "key-chord" nil t)
  (key-chord-mode 1)

  ;; for global
  (key-chord-define-global "fj" #'view-mode)
  (key-chord-define-global "jf" #'view-mode))

8.20.2. key-combo

(eval-when-compile
  (el-get-bundle 'key-combo))

(with-delayed-execution
  (message "Install key-combo...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/key-combo"))
  (autoload-if-found '(key-combo-mode key-combo-define-local) "key-combo" nil t)

  ;; for php-mode
  (with-eval-after-load 'php-mode
    (add-hook 'php-mode-hook
              #'(lambda ()
                  (key-combo-mode)
                  (when (window-system)
                    (key-combo-define-local (kbd ",>") " => "))
                  ;; (key-combo-define-local (kbd "+") '("+" " + " "++" " ++ "))
                  ;; (key-combo-define-local (kbd "-") '("-" " - " "--" " -- "))
                  ;; (key-combo-define-local (kbd "*") '("*" "**" " * "))
                  ;; (key-combo-define-local (kbd "=") '("=" " = " "==" "==="))
                  )))

  ;; for typescript-tsx-mode
  (with-eval-after-load 'typescript-tsx-mode
    (add-hook 'typescript-tsx-mode
              #'(lambda ()
                  (key-combo-mode)
                  (key-combo-define-local (kbd "</") #'web-mode-element-close)))))

8.20.3. which-key

(eval-when-compile
  (el-get-bundle 'which-key))

(with-delayed-execution
  (message "Install which-key...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/which-key"))
  (autoload-if-found '(which-key-mode) "which-key" nil t)
  (which-key-mode))

8.21. LSP

8.21.1. eglot

(eval-when-compile
  (el-get-bundle 'eglot))

(with-delayed-execution
  (message "Install eglot...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/eglot"))
  (autoload-if-found '(eglot-ensure) "eglot" nil t)
  (with-eval-after-load 'eglot
    ;; config
    (setq eglot-autoshutdown t)
    (setq eglot-extend-to-xref t)

    ;; language server
    (add-to-list 'eglot-server-programs '(php-mode . ("intelephense" "--stdio")))
    (add-to-list 'eglot-server-programs '(clojure-mode clojurescript-mode clojurec-mode
                                                       . ("/Users/take/.emacs.d/.cache/lsp/clojure/clojure-lsp"
                                                          "listen" "--verbose")))))

8.21.2. lsp-mode

(eval-when-compile
  (el-get-bundle lsp-mode))

(with-delayed-execution
  (message "Install lsp-mode...")

  (add-to-list 'load-path (locate-user-emacs-file "el-get/lsp-mode"))
  (add-to-list 'load-path (locate-user-emacs-file "el-get/lsp-mode/clients"))

  (autoload-if-found '(lsp lsp-deferred lsp-org) "lsp-mode" nil t)
  (autoload-if-found '(lsp-lens-mode lsp-lens-refresh) "lsp-lens" nil t)
  (autoload-if-found '(lsp-diagnostics-mode) "lsp-diagnostics" nil t)
  (autoload-if-found '(lsp-completion-mode) "lsp-completion" nil t)
  (autoload-if-found '(lsp-dired-mode) "lsp-dired" nil t)
  (autoload-if-found '(lsp-modeline-code-actions-mode lsp-modeline-diagnostics-mode) "lsp-modeline" nil t)
  (autoload-if-found '(lsp-headerline-breadcrumb-mode) "lsp-headerline" nil t)

  (defun my/disable-lsp-flycheck ()
    (interactive)
    (setq lsp-diagnostics-provider :none)
    (remove-hook 'lsp-mode-hook #'flycheck-mode))

  (defun my/enable-lsp-flycheck ()
    (interactive)
    (setq lsp-diagnostics-provider :flycheck)
    (add-hook 'lsp-mode-hook #'flycheck-mode))

  (with-eval-after-load 'lsp-mode
    ;; hook
    (add-hook 'lsp-mode-hook #'lsp-lens-mode)
    (add-hook 'lsp-mode-hook #'lsp-diagnostics-mode)
    (add-hook 'lsp-mode-hook #'lsp-completion-mode)
    (add-hook 'lsp-mode-hook #'lsp-dired-mode)
    (add-hook 'lsp-mode-hook #'lsp-modeline-code-actions-mode)
    (add-hook 'lsp-mode-hook #'lsp-modeline-diagnostics-mode)
    (add-hook 'lsp-mode-hook #'lsp-headerline-breadcrumb-mode)

    ;; ignore path
    (add-to-list 'lsp-file-watch-ignored-directories "[/\\\\]vendor")
    (add-to-list 'lsp-file-watch-ignored-directories "[/\\\\]storage")
    (add-to-list 'lsp-file-watch-ignored-directories "[/\\\\]docs")
    (add-to-list 'lsp-file-watch-ignored-directories "[/\\\\]target")
    (add-to-list 'lsp-file-watch-ignored-directories "[/\\\\].calva")
    (add-to-list 'lsp-file-watch-ignored-directories "[/\\\\].clj-kondo")

    ;; enable flycheck
    (add-hook 'lsp-mode-hook #'flycheck-mode)

    ;; config
    (setq lsp-idle-delay 0.8)
    (setq lsp-enable-links nil)
    (setq lsp-log-io nil))

  (with-eval-after-load 'lsp-completion
    (setq lsp-completion-no-cache t)
    (setq lsp-prefer-capf t))

  (with-eval-after-load 'lsp-diagnostics
    (setq lsp-diagnostics-provider :flycheck))

  (with-eval-after-load 'lsp-icons
    (unless window-system
      (setq lsp-headerline-breadcrumb-icons-enable nil)))

  (with-eval-after-load 'lsp-php
    (setq lsp-intelephense-clear-cache t)
    (setq lsp-intelephense-php-version "8.1")
    (setq lsp-intelephense-telemetry-enabled t))

  (with-eval-after-load 'lsp-ruby
    (setq lsp-solargraph-autoformat t)
    (setq lsp-solargraph-multi-root nil))

  (with-eval-after-load 'lsp-lens
    (define-advice narrow-to-region (:after (&rest _))
      (lsp-lens-refresh t))

    (define-advice widen (:after (&rest _))
      (lsp-lens-refresh t))))

8.21.3. lsp-php-key

(with-delayed-execution
  (message "Install lsp-php-key...")
  (with-eval-after-load 'lsp-php
    (setq lsp-intelephense-licence-key "00OXTX8OROOJH9P")))

8.21.4. lsp-treemacs

(eval-when-compile
  (el-get-bundle 'lsp-treemacs))

(with-delayed-execution
  (message "Install lsp-treemacs...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/lsp-treemacs"))
  (autoload-if-found '(lsp-treemacs-sync-mode) "lsp-treemacs" nil t)

  (with-eval-after-load 'lsp-mode
    (add-hook 'lsp-mode-hook #'lsp-treemacs-sync-mode))

  (with-eval-after-load 'lsp-treemacs
    (setq lsp-treemacs-error-list-severity 1)
    (setq lsp-treemacs-error-list-current-project-only t)))

8.21.5. lsp-docker

(eval-when-compile
  (el-get-bundle 'lsp-docker))

(with-delayed-execution
  (message "Install lsp-docker...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/lsp-docker"))
  (autoload-if-found '(lsp-docker-start) "lsp-docker" nil t))

8.21.6. dap-mode

(eval-when-compile
  (el-get-bundle 'dap-mode))

(with-delayed-execution
  (message "Install dap-mode...")

  (add-to-list 'load-path (locate-user-emacs-file "el-get/dap-mode"))

  (autoload-if-found '(dap-debug) "dap-mode" nil t)
  (autoload-if-found '(dap-hydra) "dap-hydra" nil t)
  (autoload-if-found '(dap-ui-mode dap-ui-controls-mode) "dap-ui" nil t)
  (autoload-if-found '(dap-tooltip-mode) "dap-mouse" nil t)
  (autoload-if-found '(dap-php-setup) "dap-php" nil t)
  (autoload-if-found '(dap-node-setup) "dap-node" nil t)
  (autoload-if-found '(dap-go-setup) "dap-go" nil t)
  (autoload-if-found '(dap-ruby-setup) "dap-ruby" nil t)

  (with-eval-after-load 'dap-mode
    ;; keybind
    (define-key dap-mode-map (kbd "C-c d") #'dap-breakpoint-toggle)

    ;; hook
    (add-hook 'dap-mode-hook #'dap-ui-mode)
    (add-hook 'dap-mode-hook #'dap-ui-controls-mode)
    (add-hook 'dap-mode-hook #'tooltip-mode)
    (add-hook 'dap-mode-hook #'dap-tooltip-mode)
    (add-hook 'dap-stopped-hook #'(lambda (arg) (call-interactively #'dap-hydra))))

  (with-eval-after-load 'php-mode
    (add-hook 'php-mode-hook #'dap-php-setup))

  (with-eval-after-load 'dap-php
    ;; config
    (setq dap-php-debug-path `,(expand-file-name "xdebug/vscode-php-debug" dap-utils-extension-path))

    ;; register
    (dap-register-debug-template "Laravel Run Configuration"
                                 (list :type "php"
                                       :request "launch"
                                       :mode "remote"
                                       :host "localhost"
                                       :port 9003)))

  (with-eval-after-load 'js2-mode
    (add-hook 'js2-mode-hook #'dap-node-setup))

  (with-eval-after-load 'go-mode
    (add-hook 'go-mode-hook #'dap-go-setup))

  (with-eval-after-load 'ruby-mode
    (add-hook 'ruby-mode-hook #'dap-ruby-setup)))

8.21.7. lsp-ui

(eval-when-compile
  (el-get-bundle lsp-ui))

(with-delayed-execution
  (message "Install lsp-ui...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/lsp-ui"))

  (autoload-if-found '(lsp-ui-mode) "lsp-ui" nil t)

  ;; hook
  (with-eval-after-load 'lsp-mode
    (add-hook 'lsp-mode-hook #'lsp-ui-mode))

  ;; lsp-ui-doc
  (with-eval-after-load 'lsp-ui-doc
    (setq lsp-ui-doc-enable t)
    (setq lsp-ui-doc-show-with-cursor t)
    (setq lsp-ui-doc-use-webkit t)
    (setq lsp-ui-doc-include-signature t)
    (setq lsp-ui-doc-delay 1)
    (setq lsp-ui-doc-max-height 30))

  ;; lsp-ui-peek
  (autoload-if-found '(lsp-ui-peek-find-references lsp-ui-peek-find-definitions lsp-ui-peek-find-implementation) "lsp-ui-peek" nil t)
  (with-eval-after-load 'lsp-ui-peek
    (setq lsp-ui-peek-enable t)
    (setq lsp-ui-peek-peek-height 30)
    (setq lsp-ui-peek-list-width 60)
    (setq lsp-ui-peek-fontify 'on-demand))

  ;; lsp-ui-imenu
  (autoload-if-found '(lsp-ui-imenu) "lsp-ui-imenu" nil t)
  (with-eval-after-load 'lsp-ui-imenu
    (setq lsp-ui-imenu-enable t)
    (setq lsp-ui-imenu-kind-position 'top))

  ;; lsp-ui-sideline
  (autoload-if-found '(lsp-ui-sideline-mode) "lsp-ui-sideline" nil t)
  (with-eval-after-load 'lsp-ui-sideline
    (setq lsp-ui-sideline-enable nil)
    (setq lsp-ui-sideline-show-hover t))

  ;; keybind
  (with-eval-after-load 'lsp-mode
    (define-key lsp-mode-map (kbd "C-c C-r") #'lsp-ui-peek-find-references)
    (define-key lsp-mode-map (kbd "C-c C-j") #'lsp-ui-peek-find-definitions)
    (define-key lsp-mode-map (kbd "C-c C-i") #'lsp-ui-peek-find-implementation)
    (define-key lsp-mode-map (kbd "C-c C-m") #'lsp-ui-imenu)
    (define-key lsp-mode-map (kbd "C-c C-s") #'lsp-ui-sideline-mode)
    (define-key lsp-mode-map (kbd "C-c C-d") #'lsp-ui-doc-mode)))

8.21.8. lsp-scheme

(eval-when-compile
  (el-get-bundle 'lsp-scheme))

(with-delayed-execution
  (message "Install lsp-scheme...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/lsp-scheme"))

  (autoload-if-found '(lsp-scheme) "lsp-scheme" nil t)

  (with-eval-after-load 'scheme
    ;; (add-hook 'scheme-mode-hook #'lsp-scheme)
    )

  (with-eval-after-load 'lsp-scheme
    (setq lsp-scheme-implementation "guile")))

8.21.9. lsp-haskell

(eval-when-compile
  (el-get-bundle 'lsp-haskell))

(with-delayed-execution
  (message "Install lsp-haskell...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/lsp-haskell"))
  (autoload-if-found '(lsp) "lsp-haskell" nil t)
  (with-eval-after-load 'haskell-mode
    (add-hook 'haskell-mode-hook #'lsp)
    (add-hook 'haskell-literate-mode-hook #'lsp)))

8.21.10. lsp-bridge

(eval-when-compile
  (el-get-bundle manateelazycat/lsp-bridge))

(with-delayed-execution
  (message "Install lsp-bridge...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/lsp-bridge"))
  (autoload-if-found '(lsp-bridge-mode) "lsp-bridge" nil t)

  (with-eval-after-load 'lsp-bridge
    ;; config
    (setq lsp-bridge-php-lsp-server "phpactor")

    ;; keybind
    (define-key lsp-bridge-mode-map (kbd "M-.") #'lsp-bridge-find-impl)
    (define-key lsp-bridge-mode-map (kbd "C-c C-r") #'lsp-bridge-find-references)))

8.22. Mail

8.22.1. mu4e

(with-delayed-execution
  (message "Install mu4e...")
  (when (file-directory-p "/usr/local/share/emacs/site-lisp/mu/mu4e")
    (add-to-list 'load-path "/usr/local/share/emacs/site-lisp/mu/mu4e"))
  (autoload-if-found '(mu4e) "mu4e" nil t))

8.22.2. mu4e-dashboard

(eval-when-compile
  (el-get-bundle rougier/mu4e-dashboard))

(with-delayed-execution
  (message "Install mu4e-dashboard...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/mu4e-dashboard"))
  (autoload-if-found '() "mu4e-dashboard" nil t))

8.23. Minor Modes

8.23.1. command-log-mode

(eval-when-compile
  (el-get-bundle 'command-log-mode))

(with-delayed-execution
  (message "Install command-log-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/command-log-mode"))
  (autoload-if-found '(clm/toggle-command-log-buffer) "command-log-mode" nil t)
  (defalias 'command-log #'clm/toggle-command-log-buffer))

8.24. Narrowing

8.24.1. fancy-narrow

(eval-when-compile
  (el-get-bundle takeokunn/fancy-narrow))

(with-delayed-execution
  (message "Install fancy-narrow...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/fancy-narrow"))
  (autoload-if-found '(fancy-narrow-mode) "fancy-narrow" nil t)

  (with-eval-after-load 'org
    (add-hook 'org-mode-hook #'fancy-narrow-mode))

  (with-eval-after-load 'elisp-mode
    (add-hook 'emacs-lisp-mode-hook #'fancy-narrow-mode))

  (with-eval-after-load 'lisp-mode
    (add-hook 'lisp-mode-hook #'fancy-narrow-mode)))

8.24.2. origami

(eval-when-compile
  (el-get-bundle 'origami))

(with-delayed-execution
  (message "Install origami...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/origami"))

  (autoload-if-found '(global-origami-mode origami-recursively-toggle-node origami-recursively-toggle-node) "origami" nil t)
  (global-origami-mode)

  (global-set-key (kbd "C-c t") #'origami-recursively-toggle-node)
  (global-set-key (kbd "C-c C-t") #'origami-recursively-toggle-node))

8.25. Prescient

8.25.1. prescient

(eval-when-compile
  (el-get-bundle 'prescient))

(with-delayed-execution
  (message "Install prescient...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/prescient"))
  (autoload-if-found '(prescient-persist-mode) "prescient" nil t)
  (prescient-persist-mode)
  (with-eval-after-load 'prescient
    (setq prescient-aggressive-file-save t)))

8.25.2. ivy-prescient

(eval-when-compile
  (el-get-bundle 'ivy-prescient))

(with-delayed-execution
  (message "Install ivy-prescient...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/ivy-prescient"))
  (autoload-if-found '(ivy-prescient-mode ivy-prescient-re-builder) "ivy-prescient" nil t)

  (defun my/ivy-prescient-non-fuzzy (str)
    (let ((prescient-filter-method '(literal regexp)))
      (ivy-prescient-re-builder str)))

  (with-eval-after-load 'ivy
    (add-hook 'ivy-mode-hook #'ivy-prescient-mode))

  (with-eval-after-load 'ivy-prescient
    (setq ivy-re-builders-alist
          '((counsel-ag . my/ivy-prescient-non-fuzzy)
            (counsel-rg . my/ivy-prescient-non-fuzzy)
            (counsel-pt . my/ivy-prescient-non-fuzzy)
            (counsel-grep . my/ivy-prescient-non-fuzzy)
            (counsel-imenu . my/ivy-prescient-non-fuzzy)
            (counsel-yank-pop . my/ivy-prescient-non-fuzzy)
            (swiper . my/ivy-prescient-non-fuzzy)
            (swiper-isearch . my/ivy-prescient-non-fuzzy)
            (swiper-all . my/ivy-prescient-non-fuzzy)
            (lsp-ivy-workspace-symbol . my/ivy-prescient-non-fuzzy)
            (lsp-ivy-global-workspace-symbol . my/ivy-prescient-non-fuzzy)
            (insert-char . my/ivy-prescient-non-fuzzy)
            (counsel-unicode-char . my/ivy-prescient-non-fuzzy)
            (t . ivy-prescient-re-builder)))
    (setq ivy-prescient-sort-commands
          '(:not swiper swiper-isearch ivy-switch-buffer
                 counsel-grep counsel-git-grep counsel-ag counsel-imenu
                 counsel-yank-pop counsel-recentf counsel-buffer-or-recentf))))

8.25.3. company-prescient

(eval-when-compile
  (el-get-bundle 'company-prescient))

(with-delayed-execution
  (message "Install company-prescient...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/company-prescient"))
  (autoload-if-found '(company-prescient-mode) "company-prescient" nil t)
  (with-eval-after-load 'company
    (add-hook 'company-mode-hook #'company-prescient-mode)))

8.26. Process

8.26.1. proced

(with-delayed-execution
  (message "Install proced...")
  (autoload-if-found '(proced) "proced" nil t)
  (add-hook 'proced-mode-hook #'(lambda () (proced-toggle-auto-update 1)))
  (with-eval-after-load 'proced
    (setq proced-auto-update-interval 10)
    (setq proced-tree-flag t)
    (setq proced-format 'long)))

8.26.2. proced-narrow

(eval-when-compile
  (el-get-bundle 'proced-narrow))

(with-delayed-execution
  (message "Install proced-narrow...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/proced-narrow"))
  (autoload-if-found '(proced-narrow) "proced-narrow" nil t)

  (with-eval-after-load 'proced
    (define-key proced-mode-map (kbd "/") #'proced-narrow)))

8.27. Project

8.27.1. projectile

(eval-when-compile
  (el-get-bundle 'projectile))

(with-delayed-execution-priority-high
  (message "Install projectile...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/projectile"))

  (autoload-if-found '(projectile-mode
                       projectile-project-name
                       my/update-projectile-known-projects) "projectile" nil t)
  (projectile-mode +1)

  (defun my/update-projectile-known-projects ()
    (interactive)
    (setq projectile-known-projects (mapcar
                                     (lambda (x)
                                       (abbreviate-file-name (concat x "/")))
                                     (split-string (shell-command-to-string "ghq list --full-path")))))

  (with-eval-after-load 'projectile
    (global-set-key (kbd "M-p") #'projectile-command-map)
    (global-set-key (kbd "C-c p") #'projectile-command-map)
    (add-hook 'projectile-mode-hook #'my/update-projectile-known-projects)
    (setq projectile-switch-project-action 'projectile-dired)
    (setq projectile-enable-caching t)))

8.27.2. counsel-projectile

(eval-when-compile
  (el-get-bundle 'counsel-projectile))

(with-delayed-execution-priority-high
  (message "Install counsel-projectile...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/counsel-projectile"))

  (autoload-if-found '(counsel-projectile-mode) "counsel-projectile" nil t)

  (with-eval-after-load 'counsel
    (add-hook 'counsel-mode-hook #'counsel-projectile-mode))

  (with-eval-after-load 'counsel-projectile
    (setq counsel-projectile-sort-files t)
    (setq counsel-projectile-sort-projects t)
    (setq counsel-projectile-sort-buffers t)
    (setq counsel-projectile-grep-initial-input '(ivy-thing-at-point))
    (setq counsel-projectile-ag-initial-input '(ivy-thing-at-point))
    (setq counsel-projectile-rg-initial-input '(ivy-thing-at-point))))

8.28. Refactor

8.28.1. emr

(eval-when-compile
  (el-get-bundle 'iedit)
  (el-get-bundle 'emr))

(with-delayed-execution
  (message "Install emr...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/iedit"))
  (add-to-list 'load-path (locate-user-emacs-file "el-get/emr"))

  (autoload-if-found '(emr-show-refactor-menu) "emr" nil t)

  (with-eval-after-load 'prog-mode
    (define-key prog-mode-map (kbd "M-RET") #'emr-show-refactor-menu)))

8.29. Search

8.29.1. el-get

(eval-when-compile
  (el-get-bundle abo-abo/swiper))

(with-delayed-execution-priority-high
  (add-to-list 'load-path (locate-user-emacs-file "el-get/swiper")))

8.29.2. migemo

(eval-when-compile
  (el-get-bundle 'migemo))

(with-delayed-execution
  (message "Install migemo...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/migemo"))

  (autoload-if-found '(migemo-init) "migemo" nil t)
  (migemo-init)

  (with-eval-after-load 'migemo
    (setq migemo-command "cmigemo")
    (setq migemo-options '("-q" "--emacs"))
    (setq migemo-dictionary "/usr/local/share/migemo/utf-8/migemo-dict")
    (setq migemo-user-dictionary nil)
    (setq migemo-regex-dictionary nil)
    (setq migemo-coding-system 'utf-8-unix)))

8.29.3. swiper

(with-delayed-execution
  (message "Install swiper...")
  (autoload-if-found '(my/swiper) "swiper" nil t)
  (defun my/swiper ()
    (interactive)
    (let ((word (thing-at-point 'symbol 'no-properties)))
      (swiper word)))
  (global-set-key (kbd "C-o") #'my/swiper))

8.29.4. counsel

(with-delayed-execution-priority-high
  (message "Install counsel...")
  (autoload-if-found '(counsel-mode counsel-compile) "counsel" nil t)
  (counsel-mode 1)
  (global-set-key (kbd "C-x m") #'counsel-compile)
  (with-eval-after-load 'counsel
    (setq counsel-linux-app-format-function #'counsel-linux-app-format-function-name-only)))

8.29.5. ivy

(with-delayed-execution
  (message "Install ivy...")
  (autoload-if-found '(ivy-mode ivy-read ivy-completing-read) "ivy" nil t)
  (autoload-if-found '(ivy-avy) "ivy-avy" nil t)
  (add-hook 'minibuffer-setup-hook #'ivy-mode)
  (with-eval-after-load 'ivy
    ;; config
    (setq ivy-use-virtual-buffers t)

    ;; keybind
    (define-key ivy-minibuffer-map (kbd "C-'") #'ivy-avy)
    (define-key ivy-minibuffer-map (kbd "C-h") #'delete-backward-char)
    (define-key ivy-minibuffer-map (kbd "M-h") #'backward-kill-word)))

8.29.6. ivy-rich

(eval-when-compile
  (el-get-bundle 'ivy-rich))

(with-delayed-execution
  (message "Install ivy-rich...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/ivy-rich"))
  (autoload-if-found '(ivy-rich-mode) "ivy-rich" nil t)
  (ivy-rich-mode 1)
  (with-eval-after-load 'ivy-rich
    (setq ivy-rich-path-style 'abbrev)))

8.29.7. ivy-migemo

(eval-when-compile
  (el-get-bundle 'ivy-migemo))

(with-delayed-execution
  (message "Install ivy-migemo...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/ivy-migemo"))

  (autoload-if-found '(ivy-migemo-toggle-fuzzy ivy-migemo-toggle-migemo) "ivy-migemo" nil t)

  ;; (with-eval-after-load 'ivy
  ;;   (define-key ivy-minibuffer-map (kbd "M-f") #'ivy-migemo-toggle-fuzzy)
  ;;   (define-key ivy-minibuffer-map (kbd "M-m") #'ivy-migemo-toggle-migemo))
  )

8.30. Shell

8.30.1. comint-mode

(with-eval-after-load 'comint-mode
  (define-key comint-mode-map (kbd "C-h") #'delete-backward-char))

8.30.2. exec-path-from-shell

(eval-when-compile
  (el-get-bundle exec-path-from-shell))

(with-delayed-execution-priority-high
  (message "Install exec-path-from-shell...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/exec-path-from-shell"))

  (autoload-if-found '(exec-path-from-shell-initialize) "exec-path-from-shell")
  (exec-path-from-shell-initialize)

  (with-eval-after-load 'exec-path-from-shell
    (setq exec-path-from-shell-variables '("PATH"
                                           "GEM_HOME"
                                           "GOROOT"
                                           "GOPATH"
                                           "LSP_USE_PLISTS"
                                           "TERM"
                                           "SSH_AUTH_SOCK"
                                           "NATIVE_FULL_AOT"
                                           "GPG_TTY"))))

8.31. Snippet

8.31.1. yasnippet

(eval-when-compile
  (el-get-bundle "yasnippet"))

(with-delayed-execution
  (message "Install yasnippet...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/yasnippet"))
  (autoload-if-found '(yas-global-mode) "yasnippet" nil t)
  (yas-global-mode 1))

8.31.2. yasnippet-org

(eval-when-compile
  (el-get-bundle takeokunn/yasnippet-org))

(with-delayed-execution
  (message "Install yasnippet-org...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/yasnippet-org"))
  (autoload-if-found '(yasnippet-org) "yasnippet-org" nil t)
  (with-eval-after-load 'yasnippet-org
    (setq yasnippet-org-verbose t)))

8.31.3. ivy-yasnippet

(eval-when-compile
  (el-get-bundle "mkcms/ivy-yasnippet"))

(with-delayed-execution
  (message "Install ivy-yasnippet...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/ivy-yasnippet"))
  (autoload-if-found '(ivy-yasnippet) "ivy-yasnippet" nil t)
  (global-set-key (kbd "C-c y") #'ivy-yasnippet)
  (global-set-key (kbd "C-c C-y") #'ivy-yasnippet))

8.32. Statistics

8.32.1. esup

(eval-when-compile
  (el-get-bundle 'esup))

(with-delayed-execution
  (message "Install esup...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/esup"))
  (autoload-if-found '(esup) "esup" nil t))

8.32.2. explain-pause-mode

(eval-when-compile
  (el-get-bundle 'explain-pause-mode
    :url "https://github.com/lastquestion/explain-pause-mode.git"))

(with-delayed-execution
  (message "Install explain-pause-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/explain-pause-mode"))
  (autoload-if-found '(explain-pause-mode) "explain-pause-mode" nil t))

8.32.3. disk-usage

(eval-when-compile
  (el-get-bundle 'disk-usage))

(with-delayed-execution
  (message "Install disk-usage...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/disk-usage"))
  (autoload-if-found '(disk-usage disk-usage-here) "disk-usage" nil t))

8.32.4. keyfreq

(eval-when-compile
  (el-get-bundle 'keyfreq))

(with-delayed-execution
  (message "Install keyfreq...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/keyfreq"))
  (autoload-if-found '(keyfreq-mode keyfreq-autosave-mode) "keyfreq" nil t)
  (keyfreq-mode 1)
  (keyfreq-autosave-mode 1))

8.32.5. uptimes

(eval-when-compile
  (el-get-bundle 'uptimes))

(with-delayed-execution
  (message "Install uptimes...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/uptimes"))
  (autoload-if-found '(uptimes) "uptimes" nil t))

8.33. Syntax

8.33.1. syntax-subword

(eval-when-compile
  (el-get-bundle 'syntax-subword
    :url "https://github.com/jpkotta/syntax-subword.git"))

(with-delayed-execution
  (message "Install syntax-subword...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/syntax-subword"))
  (autoload-if-found '(global-syntax-subword-mode) "syntax-subword" nil t)
  (global-syntax-subword-mode))

8.34. System

8.34.1. symon

(eval-when-compile
  (el-get-bundle 'symon))

(with-delayed-execution
  (message "Install symon...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/symon"))
  (autoload-if-found '(symon-mode) "symon" nil t)
  (when-guix
   (symon-mode)))

8.35. Tab

8.35.1. tab-bar

(with-delayed-execution
  (message "Install tab-bar...")
  (autoload-if-found '(tab-bar-mode tab-bar-history-mode) "tab-bar" nil t)

  (tab-bar-history-mode)

  (global-set-key (kbd "C-x C-t") tab-prefix-map)

  (with-eval-after-load 'tab-bar
    (setq tab-bar-close-button-show nil)
    (setq tab-bar-close-last-tab-choice nil)
    (setq tab-bar-close-tab-select 'left)
    (setq tab-bar-history-mode nil)
    (setq tab-bar-new-tab-choice "*scratch*")
    (setq tab-bar-new-button-show nil)
    (setq tab-bar-tab-name-truncated-max 12)
    (setq tab-bar-separator " | "))

  (defun my/advice-completing-read-to-ivy (orig-func &rest args)
    (interactive
     (let* ((recent-tabs (mapcar (lambda (tab)
                                   (alist-get 'name tab))
                                 (tab-bar--tabs-recent))))
       (list (ivy-completing-read "Switch to tab by name (default recent): "
                                  recent-tabs nil nil nil nil recent-tabs))))
    (apply orig-func args))

  (defun my/tab-bar-rename-tab ()
    (interactive)
    (let ((proj-name (projectile-project-name)))
      (tab-bar-rename-tab proj-name)))

  (with-eval-after-load 'tab-bar
    ;; switch tab with ivy
    (advice-add #'tab-bar-switch-to-tab :around #'my/advice-completing-read-to-ivy)

    ;; rename tab-bar with projectile
    (define-key tab-prefix-map (kbd "r") #'my/tab-bar-rename-tab)

    ;; close neotree when tab bar action
    (advice-add 'tab-new :before #'(lambda (&rest _) (neotree-hide)))
    (advice-add 'tab-next :before #'(lambda (&rest _) (neotree-hide)))
    (advice-add 'tab-bar-switch-to-tab :before #'(lambda (&rest _) (neotree-hide)))

    ;; hook
    (add-hook 'tab-bar-mode-hook #'(lambda () (display-line-numbers-mode -1)))))

8.36. Template

8.36.1. auto-insert

(with-delayed-execution
  (message "Install autoinsert...")
  (autoload-if-found '(auto-insert-mode define-auto-insert) "autoinsert" nil t)
  (auto-insert-mode)
  (define-auto-insert "\.php" "template.php")
  (with-eval-after-load 'autoinsert
    (setq auto-insert-directory "~/.emacs.d/auto-insert")))

8.37. Theme

8.37.1. all-the-icons

(eval-when-compile
  (el-get-bundle 'all-the-icons))

(with-delayed-execution-priority-high
  (message "Install all-the-icons...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/all-the-icons")))

8.37.2. all-the-icons-dired

(eval-when-compile
  (el-get-bundle 'all-the-icons-dired))

(with-delayed-execution
  (message "Install all-the-icons-dired...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/all-the-icons-dired"))
  (autoload-if-found '(all-the-icons-dired-mode) "all-the-icons-dired")
  (with-eval-after-load 'dired
    (add-hook 'dired-mode-hook #'all-the-icons-dired-mode)))

8.37.3. all-the-icons-ivy-rich

(eval-when-compile
  (el-get-bundle 'all-the-icons-ivy-rich))

(with-delayed-execution
  (message "Install all-the-icons-ivy-rich...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/all-the-icons-ivy-rich"))
  (autoload-if-found '(all-the-icons-ivy-rich-mode) "all-the-icons-ivy-rich" nil t)
  (all-the-icons-ivy-rich-mode 1)
  (with-eval-after-load 'all-the-icons-ivy-rich
    (setq all-the-icons-ivy-rich-icon t)
    (setq all-the-icons-ivy-rich-color-icon t)
    (setq all-the-icons-ivy-rich-icon-size 1.0)
    (setq all-the-icons-ivy-rich-project t)
    (setq all-the-icons-ivy-rich-field-width 80)))

8.37.4. dashboard

(eval-when-compile
  (el-get-bundle 'dashboard))

(with-delayed-execution
  (message "Install dashboard...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/dashboard"))
  (autoload-if-found '(dashboard-refresh-buffer) "dashboard" nil t)
  (with-eval-after-load 'dashboard
    (setq dashboard-startup-banner 'logo)
    (setq dashboard-set-file-icons t)
    (setq dashboard-startup-banner 4)
    (setq dashboard-items '((recents . 10)))))

8.37.5. dimmer

(eval-when-compile
  (el-get-bundle 'dimmer))

(with-eval-after-load 'dimmer
  (message "Install dimmer...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/dimmer"))
  (autoload-if-found '(dimmer-configure-which-key
                       dimmer-configure-org
                       dimmer-configure-company-box
                       dimmer-mode)
                     "dimmer" nil t)
  (dimmer-configure-which-key)
  (dimmer-configure-org)
  (dimmer-configure-company-box)
  (dimmer-mode t))

8.37.6. doom-themes

(eval-when-compile
  (el-get-bundle 'doom-themes))

(with-delayed-execution-priority-high
  (message "Install doom-themes...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/doom-themes"))
  (add-to-list 'load-path (locate-user-emacs-file "el-get/doom-themes/extensions"))

  (autoload-if-found '(doom-themes-enable-org-fontification) "doom-themes-ext-org" nil t)
  (autoload-if-found '(doom-themes-neotree-config) "doom-themes-ext-neotree" nil t)

  (doom-themes-enable-org-fontification)
  (doom-themes-neotree-config)

  (when (require 'doom-themes)
    (load-theme 'doom-dracula t))

  (with-eval-after-load 'doom-themes
    (setq doom-themes-padded-modeline t)
    (setq doom-themes-enable-bold t)
    (setq doom-themes-enable-italic t)))

8.37.7. doom-modeline

(eval-when-compile
  (el-get-bundle 'doom-modeline))

(with-delayed-execution-priority-high
  (message "Install doom-modeline...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/doom-modeline"))
  (autoload-if-found '(doom-modeline-mode) "doom-modeline" nil t)
  (doom-modeline-mode 1)
  (line-number-mode 0)
  (column-number-mode 0)
  (with-eval-after-load 'doom-modeline
    (setq doom-modeline-buffer-file-name-style 'truncate-with-project)
    (setq doom-modeline-icon t)
    (setq doom-modeline-major-mode-icon t)
    (setq doom-modeline-minor-modes nil)))

8.37.8. emojify

(eval-when-compile
  (el-get-bundle 'emojify))

(with-delayed-execution
  (message "Install emojify...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/emojify"))
  (autoload-if-found '(emojify-mode) "emojify" nil t))

8.37.9. hl-line

(with-delayed-execution
  (message "Install hl-line...")
  (autoload-if-found '(global-hl-line-mode) "hl-line-mode" nil t)
  (when (not window-system)
    (global-hl-line-mode))
  (with-eval-after-load 'hl-line
    (set-face-attribute 'hl-line nil :inherit nil)
    (set-face-background 'hl-line "#444642")))

8.37.10. idle-highlight-mode

(eval-when-compile
  (el-get-bundle 'idle-highlight-mode))

(with-delayed-execution
  (message "Install idle-highlight-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/idle-highlight-mode"))

  (autoload-if-found '(idle-highlight-mode) "idle-highlight-mode" nil t)

  (with-eval-after-load 'idle-highlight-mode
    (setq idle-highlight-idle-time 0.1))

  (with-eval-after-load 'prog-mode
    (add-hook 'prog-mode-hook #'idle-highlight-mode)))

8.37.11. neotree

(eval-when-compile
  (el-get-bundle 'neotree))

(with-delayed-execution
  (message "Install neotree...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/neotree"))

  (autoload-if-found '(neotree-hide neotree-dir) "neotree" nil t)

  (defun my/neotree-toggle ()
    (interactive)
    (let ((default-directory (locate-dominating-file default-directory ".git")))
      (if (and (fboundp 'neo-global--window-exists-p)
               (neo-global--window-exists-p))
          (neotree-hide)
        (neotree-dir default-directory))))

  (if window-system
      (defun neo-buffer--insert-fold-symbol (name &optional file-name)
        (or
         (and
          (equal name 'open)
          (insert
           (format " %s "
                   (all-the-icons-icon-for-dir file-name "down"))))
         (and
          (equal name 'close)
          (insert
           (format " %s "
                   (all-the-icons-icon-for-dir file-name "right"))))
         (and
          (equal name 'leaf)
          (insert
           (format " %s "
                   (all-the-icons-icon-for-file file-name)))))))

  (global-set-key (kbd "C-q") #'my/neotree-toggle)

  (with-eval-after-load 'neotree
    ;; config
    (setq neo-autorefresh nil)
    (setq neo-theme 'nerd2)
    (setq neo-show-hidden-files t)
    (setq neo-window-fixed-size nil)

    ;; hook
    (add-hook 'neotree-mode-hook #'(lambda () (display-line-numbers-mode -1)))))

8.37.12. nyan-mode

(eval-when-compile
  (el-get-bundle 'nyan-mode))

(with-delayed-execution-priority-high
  (message "Install nyan-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/nyan-mode"))
  (autoload-if-found '(nyan-mode) "nyan-mode" nil t)

  (nyan-mode)

  (with-eval-after-load 'nyan-mode
    (setq nyan-cat-face-number 5)
    (setq nyan-animate-nyancat t)))

8.37.13. volatile-highlights

(eval-when-compile
  (el-get-bundle 'volatile-highlights))

(with-delayed-execution
  (message "Install volatile-highlights...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/volatile-highlights"))
  (autoload-if-found '(volatile-highlights-mode) "volatile-highlights" nil t)
  (volatile-highlights-mode t))

8.37.14. idle-highlight-mode

(eval-when-compile
  (el-get-bundle 'idle-highlight-mode))

(with-delayed-execution
  (message "Install idle-highlight-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/idle-highlight-mode"))

  (autoload-if-found '(idle-highlight-mode) "idle-highlight-mode" nil t)

  (with-eval-after-load 'idle-highlight-mode
    (setq idle-highlight-idle-time 0.1))

  (with-eval-after-load 'prog-mode
    (add-hook 'prog-mode-hook #'idle-highlight-mode)))

8.38. Undo

8.38.1. undo-tree

(eval-when-compile
  (el-get-bundle 'undo-tree))

(with-delayed-execution
  (message "Install undo-tree...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/undo-tree"))
  (autoload-if-found '(global-undo-tree-mode) "undo-tree" nil t)
  (global-undo-tree-mode)
  (with-eval-after-load 'undo-tree
    (setq undo-tree-auto-save-history nil)))

8.39. View Mode

8.39.1. view-mode

(with-delayed-execution
  (message "Install view-mode...")

  (defun my/org-view-next-heading ()
    (interactive)
    (if (and (derived-mode-p 'org-mode)
             (org-at-heading-p))
        (org-next-visible-heading 1)
      (next-line)))

  (defun my/org-view-previous-heading ()
    (interactive)
    (if (and (derived-mode-p 'org-mode)
             (org-at-heading-p))
        (org-previous-visible-heading 1)
      (previous-line)))

  (defun my/view-tab ()
    (interactive)
    (when (and (derived-mode-p 'org-mode)
               (or (org-at-heading-p)
                   (org-at-property-drawer-p)))
      (let ((view-mode nil))
        (org-cycle))))

  (defun my/view-shifttab ()
    (interactive)
    (when (derived-mode-p 'org-mode)
      (let ((view-mode nil))
        (org-shifttab))))

  (defun my/org-edit-special ()
    (interactive)
    (when (derived-mode-p 'org-mode)
      (view-mode -1)
      (org-edit-special)))

  (defun my/org-ctrl-c-ctrl-c ()
    (interactive)
    (when (derived-mode-p 'org-mode)
      (view-mode -1)
      (org-ctrl-c-ctrl-c)))

  (defvar my/view-mode-timer nil)
  (defun my/enable-view-mode-automatically ()
    (if view-mode
        (when my/view-mode-timer
          (cancel-timer my/view-mode-timer))
      (setq my/view-mode-timer (run-with-idle-timer (* 60 10) nil #'view-mode))))

  (add-hook 'view-mode-hook #'my/enable-view-mode-automatically)
  (advice-add 'view--disable :before #'(lambda (&rest _) (view-lock-mode -1)))

  (with-eval-after-load 'files
    (add-hook 'find-file-hooks #'view-mode))

  (with-eval-after-load "view"
    (define-key view-mode-map (kbd "f") #'forward-char)
    (define-key view-mode-map (kbd "b") #'backward-char)
    (define-key view-mode-map (kbd "n") #'my/org-view-next-heading)
    (define-key view-mode-map (kbd "p") #'my/org-view-previous-heading)
    (define-key view-mode-map (kbd "@") #'set-mark-command)
    (define-key view-mode-map (kbd "C-c '") #'my/org-edit-special)
    (define-key view-mode-map (kbd "C-c C-C") #'my/org-ctrl-c-ctrl-c)
    (define-key view-mode-map (kbd "e") nil)
    (define-key view-mode-map (kbd "C-j") nil)
    (define-key view-mode-map (kbd "C-i") #'my/view-tab)
    (define-key view-mode-map (kbd "S-C-i") #'my/view-shifttab)))

8.39.2. view-lock-mode

(eval-when-compile
  (el-get-bundle 'view-lock-mode
    :url "https://github.com/s-fubuki/view-lock-mode.git"))

(with-delayed-execution
  (message "Install view-lock-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/view-lock-mode"))
  (autoload-if-found '(view-lock-timer-setup view-lock-quit) "view-lock-mode" nil t)
  (add-hook 'view-mode-hook #'view-lock-timer-setup)
  (with-eval-after-load 'view-lock-mode
    (setq view-lock-start-time (* 30 60))))

8.40. Utility

8.40.1. comint

(with-eval-after-load 'comint
  (setq comint-buffer-maximum-size 100000)
  (setq comint-prompt-read-only t)
  (setq comint-terminfo-terminal "eterm-256color"))

8.40.2. crux

(eval-when-compile
  (el-get-bundle 'crux))

(with-delayed-execution
  (message "Install crux...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/crux"))
  (autoload-if-found '(crux-open-with
                       crux-smart-open-line-above
                       crux-cleanup-buffer-or-region
                       crux-view-url
                       crux-transpose-windows
                       crux-duplicate-current-line-or-region
                       crux-duplicate-and-comment-current-line-or-region
                       crux-rename-file-and-buffer
                       crux-visit-term-buffer
                       crux-kill-other-buffers
                       crux-indent-defun
                       crux-top-join-lines
                       crux-kill-line-backwards) "crux" nil t)
  ;; keybind
  (global-set-key (kbd "C-c o") #'crux-open-with)
  (global-set-key (kbd "C-S-o") #'crux-smart-open-line-above)
  ;; (global-set-key (kbd "C-c n") #'crux-cleanup-buffer-or-region)
  (global-set-key (kbd "C-c u") #'crux-view-url)
  (global-set-key (kbd "C-x 4 t") #'crux-transpose-windows)
  (global-set-key (kbd "C-c d") #'crux-duplicate-current-line-or-region)
  (global-set-key (kbd "C-c M-d") #'crux-duplicate-and-comment-current-line-or-region)
  (global-set-key (kbd "C-c r") #'crux-rename-file-and-buffer)
  (global-set-key (kbd "C-c M-t") #'crux-visit-term-buffer)
  (global-set-key (kbd "C-c k") #'crux-kill-other-buffers)
  (global-set-key (kbd "C-M-z") #'crux-indent-defun)
  (global-set-key (kbd "C-^") #'crux-top-join-lines)
  (global-set-key (kbd "C-DEL") #'crux-kill-line-backwards))

8.40.3. delsel

(with-delayed-execution
  (message "Install delsel...")
  (autoload-if-found '(delete-selection-mode) "delsel" nil t)
  (delete-selection-mode))

8.40.4. dogears

(eval-when-compile
  (el-get-bundle 'dogears))

(with-delayed-execution
  (message "Install dogears...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/dogears"))
  (autoload-if-found '(dogears-go
                       dogears-back
                       dogears-forward
                       dogears-list
                       dogears-sidebar) "dogears" nil t)

  ;; keybind
  (global-set-key (kbd "M-g d") #'dogears-go)
  (global-set-key (kbd "M-g M-b") #'dogears-back)
  (global-set-key (kbd "M-g M-f") #'dogears-forward)
  (global-set-key (kbd "M-g M-d") #'dogears-list)
  (global-set-key (kbd "M-g M-D") #'dogears-sidebar))

8.40.5. embark

(eval-when-compile
  (el-get-bundle 'embark))

(with-delayed-execution
  (message "Install embark...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/embark"))

  (autoload-if-found '(embark-act embark-dwim embark-prefix-help-command) "embark" nil t)

  (global-set-key (kbd "C-.") #'embark-act)
  (global-set-key (kbd "C-;") #'embark-dwim)
  (global-set-key (kbd "C-h B") #'embark-prefix-help-command)

  (defmacro my/embark-ace-action (fn)
    `(defun ,(intern (concat "my/embark-ace-" (symbol-name fn))) ()
       (interactive)
       (with-demoted-errors "%s"
         (aw-switch-to-window (aw-select nil))
         (call-interactively (symbol-function ',fn)))))

  (defmacro my/embark-split-action (fn split-type)
    `(defun ,(intern (concat "my/embark-"
                             (symbol-name fn)
                             "-"
                             (car (last (split-string
                                         (symbol-name split-type) "-"))))) ()
       (interactive)
       (funcall #',split-type)
       (call-interactively #',fn)))

  (defun my/sudo-find-file (file)
    "Open FILE as root."
    (interactive "FOpen file as root: ")
    (when (file-writable-p file)
      (user-error "File is user writeable, aborting sudo"))
    (find-file (if (file-remote-p file)
                   (concat "/" (file-remote-p file 'method) ":"
                           (file-remote-p file 'user) "@" (file-remote-p file 'host)
                           "|sudo:root@"
                           (file-remote-p file 'host) ":" (file-remote-p file 'localname))
                 (concat "/sudo:root@localhost:" file))))

  (with-eval-after-load 'embark
    (setq embark-mixed-indicator-delay 0.1)
    (setq prefix-help-command #'embark-prefix-help-command)

    ;; ace-window
    (define-key embark-file-map     (kbd "o") (my/embark-ace-action find-file))
    (define-key embark-buffer-map   (kbd "o") (my/embark-ace-action switch-to-buffer))
    (define-key embark-bookmark-map (kbd "o") (my/embark-ace-action bookmark-jump))

    ;; split window(2)
    (define-key embark-file-map     (kbd "2") (my/embark-split-action find-file split-window-below))
    (define-key embark-buffer-map   (kbd "2") (my/embark-split-action switch-to-buffer split-window-below))
    (define-key embark-bookmark-map (kbd "2") (my/embark-split-action bookmark-jump split-window-below))

    ;; split window(3)
    (define-key embark-file-map     (kbd "3") (my/embark-split-action find-file split-window-right))
    (define-key embark-buffer-map   (kbd "3") (my/embark-split-action switch-to-buffer split-window-right))
    (define-key embark-bookmark-map (kbd "3") (my/embark-split-action bookmark-jump split-window-right))

    ;; sudo
    (define-key embark-file-map (kbd "S") #'my/sudo-find-file)))

8.40.6. goto-addr

(with-delayed-execution
  (message "Install goto-addr...")
  (autoload-if-found '(goto-address-prog-mode goto-address-mode) "goto-address" nil t)
  (with-eval-after-load 'prog-mode
    (add-hook 'prog-mode-hook #'goto-address-prog-mode))
  (with-eval-after-load 'text-mode
    (add-hook 'text-mode-hook #'goto-address-mode)))

8.40.7. htmlize

(eval-when-compile
  (el-get-bundle 'htmlize))

(with-delayed-execution
  (message "Install htmlize...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/htmlize"))
  (with-eval-after-load 'htmlize
    (setq htmlize-html-charset 'utf-8)))

8.40.8. midnight

(with-delayed-execution
  (message "Install midnight...")
  (autoload-if-found '(midnight-mode) "midnight" nil t)
  (midnight-mode)
  (with-eval-after-load 'midnight
    (setq clean-buffer-list-delay-general 1)))

8.40.9. minimap

(eval-when-compile
  (el-get-bundle 'minimap))

(with-delayed-execution
  (message "Install minimap...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/minimap"))
  (autoload-if-found '(minimap-mode) "minimap" nil t)

  (global-set-key (kbd "C-c m") #'minimap-mode)

  (with-eval-after-load 'minimap
    (setq minimap-window-location 'right)
    (setq minimap-update-delay 0.2)
    (setq minimap-minimum-width 20)
    (setq minimap-major-modes '(prog-mode org-mode))))

8.40.10. puni

(eval-when-compile
  (el-get-bundle 'puni))

(with-delayed-execution
  (message "Install puni...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/puni"))
  (autoload-if-found '(puni-global-mode puni-disable-puni-mode) "puni" nil t)
  (puni-global-mode)

  (with-eval-after-load 'lisp-mode
    (add-hook 'lisp-mode-hook #'puni-disable-puni-mode))

  (with-eval-after-load 'emacs-lisp-mode
    (add-hook 'emacs-lisp-mode-hook #'puni-disable-puni-mode))

  (with-eval-after-load 'clojure-mode
    (add-hook 'clojure-mode-hook #'puni-disable-puni-mode))

  (with-eval-after-load 'lisp-interaction-mode
    (add-hook 'lisp-interacton-mode-hook #'puni-disable-puni-mode))

  (with-eval-after-load 'scheme
    (add-hook 'scheme-mode-hook #'puni-disable-puni-mode))

  (with-eval-after-load 'minibuffer
    (add-hook 'minibuffer-mode-hook #'puni-disable-puni-mode)))

8.40.11. quickrun

(eval-when-compile
  (el-get-bundle 'quickrun))

(with-delayed-execution
  (message "Install quickrun...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/quickrun"))
  (autoload-if-found '(quickrun) "quickrun" nil t))

8.40.12. restclient

(eval-when-compile
  (el-get-bundle 'restclient))

(with-delayed-execution
  (message "Install restclient...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/restclient"))
  (autoload-if-found '(restclient-mode) "restclient" nil t))

8.40.13. smartparens

(eval-when-compile
  (el-get-bundle 'smartparens))

(with-delayed-execution
  (message "Install smartparens...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/smartparens"))
  (with-eval-after-load 'smartparens))

8.40.14. smart-jump

(eval-when-compile
  (el-get-bundle 'smart-jump))

(with-delayed-execution
  (message "Install smart-jump...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/smart-jump"))
  (with-eval-after-load 'smart-jump))

8.40.15. string-inflection

(eval-when-compile
  (el-get-bundle 'string-inflection
    :url "https://github.com/akicho8/string-inflection.git"))

(with-delayed-execution
  (message "Install string-inflection...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/string-inflection"))
  (autoload-if-found '(string-inflection-all-cycle) "string-inflection" nil t))

8.40.16. sudo-edit

(eval-when-compile
  (el-get-bundle 'sudo-edit))

(with-delayed-execution
  (message "Install sudo-edit...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/sudo-edit"))
  (autoload-if-found '(sudo-edit-current-file) "sudo-edit" nil t))

8.40.17. topsy

(eval-when-compile
  (el-get-bundle 'topsy))

(with-delayed-execution
  (message "Install topsy...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/topsy"))
  (autoload-if-found '(topsy-mode) "topsy" nil t)
  (with-eval-after-load 'prog-mode
    (add-hook 'prog-mode-hook #'topsy-mode)))

8.40.18. uuid

(eval-when-compile
  (el-get-bundle 'uuid
    :url "https://github.com/nicferrier/emacs-uuid.git"))

(with-delayed-execution
  (message "Install uuid...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/uuid"))
  (autoload-if-found '(uuid-string) "uuid" nil t)
  (defun my/uuid ()
    (interactive)
    (insert (uuid-string)))
  (defalias 'uuid #'my/uuid))

8.40.19. woman

(with-delayed-execution
  (autoload-if-found '(woman woman-find-file) "woman" nil t))

8.41. Window

8.41.1. ace-window

(eval-when-compile
  (el-get-bundle 'ace-window))

(with-delayed-execution
  (message "Install ace-window...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/ace-window"))
  (autoload-if-found '(ace-window) "ace-window" nil t)
  (global-set-key (kbd "C-x o") #'ace-window)
  (with-eval-after-load 'ace-window
    (setq aw-dispatch-always t)
    (setq aw-scope 'frame)
    (setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l))
    (setq aw-minibuffer-flag t)))

8.41.2. writeroom-mode

(eval-when-compile
  (el-get-bundle 'writeroom-mode))

(with-delayed-execution
  (message "Install writeroom-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/writeroom-mode"))
  (autoload-if-found '(writeroom-mode
                       writeroom-decrease-width
                       writeroom-increase-width
                       writeroom-adjust-width
                       writeroom-width)
                     "writeroom-mode" nil t)

  (with-eval-after-load 'writeroom-mode
    (define-key writeroom-mode-map (kbd "C-M-<") #'writeroom-decrease-width)
    (define-key writeroom-mode-map (kbd "C-M->") #'writeroom-increase-width)
    (define-key writeroom-mode-map (kbd "C-M-=") #'writeroom-adjust-width)
    (setq writeroom-width 200)
    (setq writeroom-maximize-window nil)))

8.41.3. zoom-window

(eval-when-compile
  (el-get-bundle 'zoom-window))

(with-delayed-execution
  (message "Install zoom-window...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/zoom-window"))
  (autoload-if-found '(zoom-window-zoom) "zoom-window" nil t)
  (global-set-key (kbd "C-c C-z") #'zoom-window-zoom))

9. Language Specific

9.1. Basic Lisp

9.1.1. paredit

(eval-when-compile
  (el-get-bundle 'paredit))

(with-delayed-execution
  (message "Install paredit...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/paredit"))
  (autoload-if-found '(enable-paredit-mode
                       paredit-forward-slurp-sexp
                       paredit-splice-sexp
                       paredit-define-keys)
                     "paredit" nil t)

  (global-set-key (kbd "C-c f") #'paredit-forward-slurp-sexp)
  (global-set-key (kbd "M-s") #'paredit-splice-sexp)

  (with-eval-after-load 'paredit
    (add-hook 'paredit-mode-hook #'paredit-define-keys))

  (with-eval-after-load 'lisp-mode
    (add-hook 'lisp-mode-hook #'enable-paredit-mode)
    (add-hook 'lisp-data-mode-hook #'enable-paredit-mode))

  (with-eval-after-load 'emacs-lisp-mode
    (add-hook 'emacs-lisp-mode-hook #'enable-paredit-mode))

  (with-eval-after-load 'clojure-mode
    (add-hook 'clojure-mode-hook #'enable-paredit-mode))

  (with-eval-after-load 'lisp-interaction-mode
    (add-hook 'lisp-interacton-mode-hook #'enable-paredit-mode))

  (with-eval-after-load 'scheme
    (add-hook 'scheme-mode-hook #'enable-paredit-mode))

  (with-eval-after-load 'simple
    (add-hook 'eval-expression-minibuffer-setup-hook #'enable-paredit-mode)))

9.1.2. rainbow-delimiter

(eval-when-compile
  (el-get-bundle 'rainbow-delimiters))

(with-delayed-execution
  (message "Install rainbow-delimiters...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/rainbow-delimiters"))
  (autoload-if-found '(rainbow-delimiters-mode-enable) "rainbow-delimiters" nil t)

  (with-eval-after-load 'lisp-mode
    (add-hook 'lisp-mode-hook #'rainbow-delimiters-mode-enable))

  (with-eval-after-load 'emacs-lisp-mode
    (add-hook 'emacs-lisp-mode-hook #'rainbow-delimiters-mode-enable))

  (with-eval-after-load 'clojure-mode
    (add-hook 'clojure-mode-hook #'rainbow-delimiters-mode-enable))

  (with-eval-after-load 'scheme
    (add-hook 'scheme-mode-hook #'rainbow-delimiters-mode-enable)))

9.2. Common Lisp

9.2.1. slime

(eval-when-compile
  (el-get-bundle 'slime))

(with-delayed-execution
  (message "Install slime...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/slime"))
  (add-to-list 'load-path (locate-user-emacs-file "el-get/slime/lib"))
  (add-to-list 'load-path (locate-user-emacs-file "el-get/slime/contrib"))
  (add-to-list 'load-path (locate-user-emacs-file "el-get/slime/swank"))

  (require 'slime)
  (slime-setup '(slime-repl slime-fancy slime-banner slime-indentation))

  (when-darwin
   (defun my/roswell-configdir ()
     (substring (shell-command-to-string "/usr/local/bin/ros roswell-internal-use version confdir") 0 -1))

   (defun my/roswell-opt (var)
     (with-temp-buffer
       (insert-file-contents (concat (my/roswell-configdir) "config"))
       (goto-char (point-min))
       (re-search-forward (concat "^" var "\t[^\t]+\t\\(.*\\)$"))
       (match-string 1)))

   (defun my/roswell-directory (type)
     (concat
      (my/roswell-configdir)
      "lisp/"
      type
      "/"
      (my/roswell-opt (concat type ".version"))
      "/"))

   (with-eval-after-load 'slime
     (setq slime-path `,(expand-file-name "swank-loader.lisp" (my/roswell-directory "slime")))
     (setq slime-backend `,(expand-file-name "swank-loader.lisp" (my/roswell-directory "slime")))
     (setq inferior-lisp-program "ros -Q run")))

  (when-guix
   (with-eval-after-load 'slime
     (setq inferior-lisp-program "sbcl")))

  (defun my/slime-history ()
    (interactive)
    (if (and (fboundp '-distinct)
             (fboundp 'f-read-text))
        (insert
         (completing-read
          "choice history: "
          (-distinct (read (f-read-text "~/.slime-history.eld")))))))

  (with-eval-after-load 'slime-repl
    (define-key slime-repl-mode-map (kbd "C-c C-r") #'my/slime-history)))

9.2.2. slime-company

(eval-when-compile
  (el-get-bundle 'slime-company))

(with-delayed-execution
  (message "Install slime-company...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/slime-company"))
  (autoload-if-found '(company-slime) "slime-company" nil t)
  (with-eval-after-load 'company
    (push 'company-slime company-backends)))

9.2.3. hyperspec

(with-delayed-execution
  (message "Install hyperspec...")
  (autoload-if-found '(hyperspec-lookup) "hyperspec" nil t)

  (defadvice common-lisp-hyperspec (around common-lisp-hyperspec-around activate)
    (let ((buf (current-buffer)))
      ad-do-it
      (switch-to-buffer buf)
      (pop-to-buffer "*eww*")))

  (defadvice common-lisp-hyperspec-lookup-reader-macro (around common-lisp-hyperspec-lookup-reader-macro-around activate)
    (let ((buf (current-buffer)))
      ad-do-it
      (switch-to-buffer buf)
      (pop-to-buffer "*eww*")))

  (defadvice common-lisp-hyperspec-format (around common-lisp-hyperspec-format activate)
    (let ((buf (current-buffer)))
      ad-do-it
      (switch-to-buffer buf)
      (pop-to-buffer "*eww*")))

  (with-eval-after-load 'hyperspec
    (setq common-lisp-hyperspec--reader-macros nil)
    (setq common-lisp-hyperspec--format-characters nil))

  (with-eval-after-load 'lisp-mode
    (define-key lisp-mode-map (kbd "C-c h") #'hyperspec-lookup)))

9.3. Emacs Lisp

9.3.1. eros

(eval-when-compile
  (el-get-bundle 'eros))

(with-delayed-execution
  (message "Install eros...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/eros"))
  (autoload-if-found '(eros-mode) "eros" nil t)
  (eros-mode))

9.3.2. eldoc

(with-delayed-execution
  (message "Install eldoc...")
  (autoload-if-found '(turn-on-eldoc-mode) "eldoc" nil t)

  (with-eval-after-load 'elisp-mode
    (add-hook 'emacs-lisp-mode-hook #'turn-on-eldoc-mode)
    (add-hook 'lisp-interaction-mode-hook #'turn-on-eldoc-mode))

  (with-eval-after-load 'ielm
    (add-hook 'ielm-mode-hook #'turn-on-eldoc-mode)))

9.3.3. lispxmp

(eval-when-compile
  (el-get-bundle 'lispxmp))

(with-delayed-execution
  (message "Install lispxmp...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/lispxmp"))
  (autoload-if-found '(lispxmp) "lispxmp" nil t))

9.3.4. macrostep

(eval-when-compile
  (el-get-bundle 'macrostep))

(with-delayed-execution
  (message "Install macrostep...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/macrostep"))
  (autoload-if-found '(macrostep-expand macrostep-mode) "macrostep" nil t)

  (with-eval-after-load 'elisp-mode
    (define-key emacs-lisp-mode-map (kbd "C-c e") #'macrostep-expand)))

9.3.5. elisp-slime-nav

(eval-when-compile
  (el-get-bundle 'elisp-slime-nav))

(with-delayed-execution
  (message "Install eslisp-slime-nav...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/elisp-slime-nav"))

  (autoload-if-found '(elisp-slime-nav-mode) "elisp-slime-nav" nil t)

  (with-eval-after-load 'elisp-mode
    (add-hook 'emacs-lisp-mode-hook #'elisp-slime-nav-mode))

  (with-eval-after-load 'ielm
    (add-hook 'ielm-mode-hook #'elisp-slime-nav-mode)))

9.3.6. nameless

(eval-when-compile
  (el-get-bundle 'nameless))

(with-delayed-execution
  (message "Install nameless...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/nameless"))
  (autoload-if-found '(nameless-mode) "nameless" nil t)

  (with-eval-after-load 'elisp-mode
    (add-hook 'emacs-lisp-mode-hook #'nameless-mode))

  (with-eval-after-load 'ielm
    (add-hook 'ielm-mode-hook #'nameless-mode)))

9.3.7. elisp-refs

(eval-when-compile
  (el-get-bundle 'elisp-refs))

(with-delayed-execution
  (message "Install elisp-refs...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/elisp-refs"))
  (autoload-if-found '() "elisp-refs" nil t))

9.3.8. highlight-quoted

(eval-when-compile
  (el-get-bundle 'highlight-quoted))

(with-delayed-execution
  (message "Install highlight-quoted...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/highlight-quoted"))
  (autoload-if-found '(highlight-quoted-mode) "highlight-quoted" nil t)
  (with-eval-after-load 'elisp-mode
    (add-hook 'emacs-lisp-mode-hook #'highlight-quoted-mode)))

9.3.9. my/ielm-history

(with-delayed-execution
  (when (autoload-if-found '(my/ielm-history) "ielm" nil t))
  (defun my/ielm-history ()
    (interactive)
    (insert
     (completing-read
      "choice history: "
      (progn
        (let ((history nil)
              (comint-input-ring nil))
          (dotimes (index (ring-length comint-input-ring))
            (push (ring-ref comint-input-ring index) history))
          history))))))

9.4. Clojure

9.4.1. anakondo

(eval-when-compile
  (el-get-bundle 'anakondo))

(with-delayed-execution
  (message "Install anakondo...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/anakondo"))
  (autoload-if-found '(anakondo-minor-mode) "anakondo" nil t)
  ;; (with-eval-after-load 'clojure-mode
  ;;   (add-hook 'clojure-mode-hook #'anakondo-minor-mode)
  ;;   (add-hook 'clojurescript-mode-hook #'anakondo-minor-mode)
  ;;   (add-hook 'clojurec-mode-hook #'anakondo-minor-mode))
  )

9.4.2. cider

(eval-when-compile
  (el-get-bundle 'parseclj)
  (el-get-bundle 'parseedn)
  (el-get-bundle 'cider))

(with-delayed-execution
  (message "Install cider...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/parseclj"))
  (add-to-list 'load-path (locate-user-emacs-file "el-get/parseedn"))
  (add-to-list 'load-path (locate-user-emacs-file "el-get/cider"))

  (autoload-if-found '(cider cider-format-buffer cider-switch-to-last-clojure-buffer) "cider" nil t)
  (autoload-if-found '(cider-doc) "cider-doc" nil t)

  ;; (add-hook 'before-save-hook #'cider-format-buffer t t)

  (with-eval-after-load 'cider-common
    (setq cider-special-mode-truncate-lines nil))

  (with-eval-after-load 'cider-mode
    (setq cider-font-lock-reader-conditionals nil)
    (setq cider-font-lock-dynamically '(macro core function var)))

  (with-eval-after-load 'cider-repl
    (setq cider-repl-buffer-size-limit 1000000)
    (setq cider-repl-wrap-history t)
    (setq cider-repl-history-size 10000)
    (setq cider-repl-tab-command #'indent-for-tab-command)
    (setq cider-repl-display-in-current-window t))

  (with-eval-after-load 'nrepl-client
    (setq nrepl-use-ssh-fallback-for-remote-hosts t)
    (setq nrepl-hide-special-buffers t))

  (with-eval-after-load 'cider-eval
    (setq cider-show-error-buffer nil)
    (setq cider-auto-select-error-buffer nil))

  (with-eval-after-load 'clojure-mode
    (define-key clojure-mode-map (kbd "C-c h") #'cider-doc)))

9.4.3. kibit-helper

(eval-when-compile
  (el-get-bundle 'kibit-helper))

(with-delayed-execution
  (message "Install kibit-helper...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/kibit-helper"))
  (autoload-if-found '(kibit kibit-current-file kibit-accept-proposed-change) "kibit-helper" nil t))

9.4.4. clj-refactor

(eval-when-compile
  (el-get-bundle 'clj-refactor))

(with-delayed-execution
  (message "Install clj-refactor...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/clj-refactor"))

  (autoload-if-found '(clj-refactor-mode cljr-add-keybindings-with-prefix) "clj-refactor" nil t)

  (add-hook 'clojure-mode-hook #'clj-refactor-mode)
  (cljr-add-keybindings-with-prefix "C-c C-m")

  (with-eval-after-load 'clj-refactor
    (setq cljr-suppress-middleware-warnings t)
    (setq cljr-hotload-dependencies t)))

9.4.5. inf-clojure

(eval-when-compile
  (el-get-bundle 'inf-clojure
    :url "https://github.com/clojure-emacs/inf-clojure.git"))

(with-delayed-execution
  (message "Install inf-clojure...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/inf-clojure"))
  (autoload-if-found '(inf-clojure) "inf-clojure" nil t))

9.5. C/C++

9.5.1. clang-format

(eval-when-compile
  (el-get-bundle 'clang-format))

(with-delayed-execution
  (message "Install clang-format...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/clang-format"))
  (autoload-if-found '(clang-format-buffer) "clang-format" nil t)
  (add-hook 'before-save-hook #'(lambda ()
                                  (when (member major-mode '(c-mode c++-mode))
                                    (clang-format-buffer)))))

9.5.2. inferior-cling

(eval-when-compile
  (el-get-bundle "brianqq/inferior-cling"))

(with-delayed-execution
  (message "Install inferior-cling...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/inferior-cling")))

9.6. JavaScript/TypeScript

9.6.1. js2-refactor

(eval-when-compile
  (el-get-bundle 'js2-refactor))

(with-delayed-execution
  (message "Install js2-refactor...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/js2-refactor"))
  (autoload-if-found '(js2-refactor-mode) "js2-refactor" nil t)

  (with-eval-after-load 'js2-refactor
    (setq js2r-use-strict t))

  (with-eval-after-load 'js2-mode
    (add-hook 'js2-mode-hook #'js2-refactor-mode))

  (with-eval-after-load 'typescript-mode
    (add-hook 'typescript-mode-hook #'js2-refactor-mode)))

9.6.2. tree-sitter

(eval-when-compile
  (el-get-bundle 'tsc)
  (el-get-bundle "emacs-tree-sitter/tree-sitter-langs")
  (el-get-bundle 'tree-sitter))

(with-delayed-execution
  (message "Install tree-sitter...")

  (add-to-list 'load-path (locate-user-emacs-file "el-get/tsc"))
  (add-to-list 'load-path (locate-user-emacs-file "el-get/tree-sitter-langs"))
  (add-to-list 'load-path (locate-user-emacs-file "el-get/tree-sitter"))

  (autoload-if-found '(tree-sitter-mode) "tree-sitter" nil t)
  (autoload-if-found '(tree-sitter-require) "tree-sitter-load" nil t)
  (autoload-if-found '(tree-sitter-hl-mode tree-sitter-hl-add-patterns) "tree-sitter-hl" nil t)

  (when (require 'tree-sitter-langs)
    (tree-sitter-require 'tsx))

  (tree-sitter-hl-add-patterns 'tsx
    [(call_expression
      ;; styled.div``
      function: (member_expression
                 object: (identifier) @function.call
                 (.eq? @function.call "styled"))
      arguments: ((template_string) @property.definition
                  (.offset! @property.definition 0 1 0 -1)))
     (call_expression
      ;; styled(Component)``
      function: (call_expression
                 function: (identifier) @function.call
                 (.eq? @function.call "styled"))
      arguments: ((template_string) @property.definition
                  (.offset! @property.definition 0 1 0 -1)))])

  (add-to-list 'tree-sitter-major-mode-language-alist '(typescript-tsx-mode . tsx))

  (with-eval-after-load 'typescript-mode
    (add-hook 'typescript-tsx-mode-hook #'tree-sitter-mode))

  (with-eval-after-load 'tree-sitter
    (add-hook 'tree-sitter-after-on-hook #'tree-sitter-hl-mode)))

9.7. Ruby

9.7.1. robe

(eval-when-compile
  (el-get-bundle 'robe))

(with-delayed-execution
  (message "Install robe...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/robe"))
  (autoload-if-found '(robe-mode inf-ruby-console-auto) "robe" nil t)
  (with-eval-after-load 'company
    (push 'company-robe company-backends))
  ;; (with-eval-after-load 'ruby-mode
  ;;   (add-hook 'ruby-mode-hook #'robe-mode))
  )

9.7.2. rubocop

(eval-when-compile
  (el-get-bundle 'rubocop))

(with-delayed-execution
  (message "Install rubocop...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/rubocop"))
  (autoload-if-found '(rubocop-mode) "rubocop" nil t)
  (with-eval-after-load 'ruby-mode
    (add-hook 'ruby-mode-hook #'rubocop-mode)))

9.7.3. ruby-refactor

(eval-when-compile
  (el-get-bundle 'ruby-refactor))

(with-delayed-execution
  (message "Install ruby-refactor...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/ruby-refactor"))
  (autoload-if-found '(ruby-refactor-mode-launch) "ruby-refactor" nil t)
  (with-eval-after-load 'ruby-mode
    (add-hook 'ruby-mode-hook #'ruby-refactor-mode-launch)))

9.7.4. inf-ruby

(eval-when-compile
  (el-get-bundle 'inf-ruby))

(with-delayed-execution
  (message "Install inf-ruby...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/inf-ruby"))
  (autoload-if-found '(inf-ruby inf-ruby-minor-mode) "inf-ruby" nil t)
  (defun my/irb-history ()
    (interactive)
    (when (and (fboundp '-distinct)
               (fboundp 's-lines)
               (fboundp 'f-read-text))
      (insert
       (completing-read
        "choose history: "
        (mapcar #'list (-distinct (s-lines (f-read-text "~/.irb_history"))))))))
  (with-eval-after-load 'ruby-mode
    (add-hook 'ruby-mode-hook #'inf-ruby-minor-mode)))

9.7.5. yard-mode

(eval-when-compile
  (el-get-bundle 'yard-mode))

(with-delayed-execution
  (message "Install yard-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/yard-mode"))
  (autoload-if-found '(yard-mode) "yard-mode" nil t)

  (with-eval-after-load 'ruby-mode
    (add-hook 'ruby-mode-hook #'yard-mode)))

9.8. SQL

9.8.1. sql-indent

(eval-when-compile
  (el-get-bundle 'sql-indent))

(with-delayed-execution
  (message "Install sql-indent...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/sql-indent"))
  (autoload-if-found '(sqlind-setup sqlind-minor-mode) "sql-indent" nil t)
  (with-eval-after-load 'sql-mode
    (add-hook 'sql-mode-hook #'sqlind-setup)
    (add-hook 'sql-mode-hook #'sqlind-minor-mode)))

9.9. PHP

9.9.1. composer

(eval-when-compile
  (el-get-bundle 'composer))

(with-delayed-execution
  (message "Install composer...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/composer")))

9.9.2. php-runtime

(eval-when-compile
  (el-get-bundle 'php-runtime))

(with-delayed-execution
  (message "Install php-runtime...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/php-runtime"))
  (autoload-if-found '(php-runtime-expr php-runtime-eval) "php-runtime" nil t))

9.9.3. psysh

(eval-when-compile
  (el-get-bundle 'psysh))

(with-delayed-execution
  (message "Install psysh...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/psysh"))
  (autoload-if-found '(psysh psysh-doc) "psysh" nil t)

  (with-eval-after-load 'php-mode
    (define-key php-mode-map (kbd "C-c h") #'psysh-doc)))

9.9.4. laravel-tinker-repl

(eval-when-compile
  (el-get-bundle "takeokunn/laravel-tinker-repl.el"))

(with-delayed-execution
  (message "Install laravel-tinker-repl...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/laravel-tinker-repl.el"))
  (autoload-if-found '(laravel-tinker-repl) "laravel-tinker-repl" nil t)

  (with-eval-after-load 'laravel-tinker-repl
    (define-key laravel-tinker-repl-mode-map (kbd "TAB") #'completion-at-point)
    (define-key laravel-tinker-repl-mode-map (kbd "C-c C-c") #'laravel-tinker-repl-quit-or-cancel))

  (with-eval-after-load 'php-mode
    (define-key php-mode-map (kbd "C-c C-c") #'laravel-tinker-repl-send-line)
    (define-key php-mode-map (kbd "C-c C-z") #'laravel-tinker-repl-switch-to-repl)))

9.9.5. emacs-php-doc-block

(eval-when-compile
  (el-get-bundle "moskalyovd/emacs-php-doc-block"))

(with-delayed-execution
  (message "Install emacs-php-doc-block...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/emacs-php-doc-block"))
  (autoload-if-found '(php-doc-block) "php-doc-block" nil t))

9.9.6. phpstan

(eval-when-compile
  (el-get-bundle 'phpstan
    :url "https://github.com/emacs-php/phpstan.el.git"))

(with-delayed-execution
  (message "Install phpstan...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/phpstan"))
  (autoload-if-found '(phpstan-analyze-file phpstan-analyze-this-file) "phpstan" nil t))

9.9.7. phpunit

(eval-when-compile
  (el-get-bundle 'phpunit))

(with-delayed-execution
  (message "Install phpunit...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/phpunit"))
  (autoload-if-found '(phpunit-current-test
                       phpunit-current-class
                       phpunit-current-project
                       phpunit-group) "phpunit" nil t))

9.9.8. phpactor

(eval-when-compile
  (el-get-bundle 'phpactor))

(with-delayed-execution
  (message "Install phpactor...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/phpactor"))
  (autoload-if-found '(phpactor-install-or-update) "phpactor" nil t))

9.10. Markdown

9.10.1. poly-markdown

(eval-when-compile
  (el-get-bundle 'polymode)
  (el-get-bundle 'poly-markdown))

(with-delayed-execution
  (message "Install polymode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/polymode"))
  (add-to-list 'load-path (locate-user-emacs-file "el-get/poly-markdown"))
  (when (autoload-if-found '(poly-markdown-mode) "poly-markdown" nil t)
    (add-to-list 'auto-mode-alist '("\\.md" . poly-markdown-mode))))

9.10.2. markdown-preview-mode

(eval-when-compile
  (el-get-bundle 'markdown-preview-mode))

(with-delayed-execution
  (message "Install markdown-preview-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/markdown-preview-mode"))

  (autoload-if-found '(markdown-preview-open-browser markdown-preview-mode) "markdown-preview-mode" nil t)

  (with-eval-after-load 'markdown-preview-mode
    (setq markdown-preview-stylesheets (list "http://thomasf.github.io/solarized-css/solarized-light.min.css"))))

9.11. Fish

9.11.1. fish-repl

(eval-when-compile
  (el-get-bundle 'fish-repl
    :url "https://github.com/takeokunn/fish-repl.el.git"))

(with-delayed-execution
  (message "Install fish-repl...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/fish-repl"))
  (autoload-if-found '(fish-repl) "fish-repl" nil t))

9.12. NodeJS

9.12.1. nodejs-repl

(eval-when-compile
  (el-get-bundle 'nodejs-repl
    :url "https://github.com/abicky/nodejs-repl.el.git"))

(with-delayed-execution
  (message "Install nodejs-repl...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/nodejs-repl"))
  (autoload-if-found '(nodejs-repl
                       nodejs-repl-send-last-expression
                       nodejs-repl-send-line
                       nodejs-repl-send-region
                       nodejs-repl-send-buffer
                       nodejs-repl-load-file
                       nodejs-repl-switch-to-repl) "nodejs-repl" nil t)

  (with-eval-after-load 'js2-mode
    (define-key js2-mode-map (kbd "C-x C-e") #'nodejs-repl-send-last-expression)
    (define-key js2-mode-map (kbd "C-c C-j") #'nodejs-repl-send-line)
    (define-key js2-mode-map (kbd "C-c C-r") #'nodejs-repl-send-region)
    (define-key js2-mode-map (kbd "C-c C-c") #'nodejs-repl-send-buffer)
    (define-key js2-mode-map (kbd "C-c C-l") #'nodejs-repl-load-file)
    (define-key js2-mode-map (kbd "C-c C-z") #'nodejs-repl-switch-to-repl)))

9.13. Haskell

9.13.1. hindent

(eval-when-compile
  (el-get-bundle 'hindent))

(with-delayed-execution
  (message "Install hindent...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/hindent"))
  (autoload-if-found '(hindent-mode) "hindent" nil t)
  (with-eval-after-load 'haskell-mode
    (add-hook 'haskell-mode-hook #'hindent-mode)))

9.14. Docker

9.14.1. docker

(eval-when-compile
  (el-get-bundle 'docker))

(with-delayed-execution
  (message "Install docker...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/docker"))
  (autoload-if-found '(docker) "docker" nil t))

9.14.2. docker-tramp

(eval-when-compile
  (el-get-bundle 'docker-tramp))

(with-delayed-execution
  (message "Install docker-tramp...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/docker-tramp"))
  (autoload-if-found '() "docker-tramp" nil t))

9.15. Web

9.15.1. emmet-mode

(eval-when-compile
  (el-get-bundle 'emmet-mode))

(with-delayed-execution
  (message "Install emmet-mode...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/emmet-mode")))
  (autoload-if-found '(emmet-mode) "emmet-mode" nil t)

  (with-eval-after-load 'html-mode
    (add-hook 'html-mode-hook #'emmet-mode))

  (with-eval-after-load 'web-mode
    (add-hook 'web-mode-hook #'emmet-mode))

  (with-eval-after-load 'css-mode
    (add-hook 'css-mode-hook #'emmet-mode))

  (with-eval-after-load 'nxml-mode
    (add-hook 'nxml-mode-hook #'emmet-mode))

  (with-eval-after-load 'web-php-blade-mode
    (add-hook 'web-php-blade-mode #'emmet-mode))

  (with-eval-after-load 'typescript-mode
    (add-hook 'typescript-tsx-mode-hook #'emmet-mode))

  (with-eval-after-load 'vue-mode
    (add-hook 'vue-mode-hook #'emmet-mode))

  (with-eval-after-load 'emmet-mode
    (define-key emmet-mode-keymap (kbd "C-j") nil)
    (define-key emmet-mode-keymap (kbd "M-j") #'emmet-expand-line)
    (setq emmet-self-closing-tag-style "")
    (setq emmet-indent-after-insert nil)))

9.16. JSON

9.16.1. jq-mode

(eval-when-compile
  (el-get-bundle 'jq-mode))

(with-delayed-execution
  (message "Install jq-mode...")
  (add-to-list 'load-path (locate-user-emacs-file (concat "el-get/jq-mode")))
  (autoload-if-found '(jq-interactively) "jq-mode" nil t)

  (with-eval-after-load 'json-mode
    (define-key json-mode-map (kbd "C-c C-j") #'jq-interactively))

  (with-eval-after-load 'ob-babel
    (org-babel-do-load-languages 'org-babel-load-languages
                                 '((jq . t)))))

9.16.2. json-reformat

(eval-when-compile
  (el-get-bundle 'json-reformat))

(with-delayed-execution
  (message "Install json-reformat...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/json-reformat"))
  (autoload-if-found '(json-reformat-region) "json-reformat" nil t))

10. Elfeed

10.1. elfeed

(eval-when-compile
  (el-get-bundle 'elfeed))

(with-delayed-execution
  (message "Install elfeed...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/elfeed"))

  (defconst my/elfeed-search-filter "@1-week-ago +unread")

  (autoload-if-found '(elfeed) "elfeed" nil t)
  (global-set-key (kbd "C-x w") #'elfeed)

  (defun my/elfeed-ivy-filter ()
    (interactive)
    (let ((filtered-tag (ivy-completing-read "Choose Tags: " (elfeed-db-get-all-tags))))
      (setq elfeed-search-filter (concat my/elfeed-search-filter " +" filtered-tag))
      (elfeed-search-update--force)))

  (with-eval-after-load 'elfeed
    (define-key elfeed-search-mode-map (kbd "+") #'my/elfeed-ivy-filter)
    (setq elfeed-search-filter my/elfeed-search-filter)
    (setq browse-url-browser-function 'eww-browse-url))

  (with-eval-after-load 'elfeed-curl
    (setq elfeed-curl-max-connections 8)))

10.2. elfeed-org

(eval-when-compile
  (el-get-bundle 'elfeed-org))

(with-delayed-execution
  (message "Install elfeed-org...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/elfeed-org"))
  (autoload-if-found '(elfeed-org) "elfeed-org" nil t)
  (elfeed-org)
  (with-eval-after-load 'elfeed-org
    (setq rmh-elfeed-org-files '("~/.emacs.d/elfeed.org"))
    (setq rmh-elfeed-org-auto-ignore-invalid-feeds t)))

11. Eshell

11.1. basic

(with-delayed-execution
  (message "Install eshell...")

  ;; configurations
  (with-eval-after-load 'esh-mode
    ;; hook
    (add-hook 'eshell-mode-hook #'(lambda () (display-line-numbers-mode -1)))

    ;; keymap
    (define-key eshell-mode-map (kbd "C-h") #'delete-backward-char)
    (define-key eshell-mode-map (kbd "M-p") #'eshell-previous-matching-input-from-input))

  (with-eval-after-load 'em-cmpl
    (setq eshell-cmpl-ignore-case t))

  (with-eval-after-load 'em-glob
    (setq eshell-glob-include-dot-files t)
    (setq eshell-glob-include-dot-dot nil)
    (setq eshell-glob-show-progress t))

  (with-eval-after-load 'em-hist
    (setq eshell-history-size 100000)
    (setq eshell-hist-ignoredups t))

  (with-eval-after-load 'em-alias
    (setq eshell-command-aliases-list '(("ll" "ls -la"))))

  (with-eval-after-load 'esh-cmd
    (setq eshell-prefer-lisp-functions nil))

  (with-eval-after-load 'em-term
    (setq eshell-destroy-buffer-when-process-dies t)))

11.2. functions

(with-delayed-execution
  (message "Install eshell functions...")

  (defun eshell/ff (&rest args)
    "Open a file in Emacs with ARGS, Some habits die hard."
    (if (null args)
        (bury-buffer)
      (mapc #'find-file (mapcar #'expand-file-name (eshell-flatten-list (reverse args))))))

  (defun eshell/unpack (file &rest args)
    "Unpack FILE with ARGS."
    (let ((command (some (lambda (x)
                           (if (string-match-p (car x) file)
                               (cadr x)))
                         '((".*\.tar.bz2" "tar xjf")
                           (".*\.tar.gz" "tar xzf")
                           (".*\.bz2" "bunzip2")
                           (".*\.rar" "unrar x")
                           (".*\.gz" "gunzip")
                           (".*\.tar" "tar xf")
                           (".*\.tbz2" "tar xjf")
                           (".*\.tgz" "tar xzf")
                           (".*\.zip" "unzip")
                           (".*\.Z" "uncompress")
                           (".*" "echo 'Could not unpack the file:'")))))
      (let ((unpack-command(concat command " " file " " (mapconcat 'identity args " "))))
        (eshell/printnl "Unpack command: " unpack-command)
        (eshell-command-result unpack-command))))

  (defun my/cat-with-syntax-highlight (filename)
    "Like cat(1) but with syntax highlighting."
    (let ((existing-buffer (get-file-buffer filename))
          (buffer (find-file-noselect filename)))
      (eshell-print
       (with-current-buffer buffer
         (if (fboundp 'font-lock-ensure)
             (font-lock-ensure)
           (with-no-warnings
             (font-lock-fontify-buffer)))
         (let ((contents (buffer-string)))
           (remove-text-properties 0 (length contents) '(read-only nil) contents)
           contents)))
      (unless existing-buffer
        (kill-buffer buffer))
      nil))

  (advice-add 'eshell/cat :override #'my/cat-with-syntax-highlight))

11.3. prompt

(with-delayed-execution
  (message "Install eshell prompt...")

  (defun my/eshell-prompt ()
    (concat (abbreviate-file-name (eshell/pwd))
            (if (= (user-uid) 0) " # " " $ ")))

  (with-eval-after-load 'em-prompt
    (setq eshell-prompt-function #'my/eshell-prompt)))

11.4. eshell-fringe-status

(eval-when-compile
  (el-get-bundle 'eshell-fringe-status))

(with-delayed-execution
  (message "Install eshell-fringe-status...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/eshell-fringe-status"))
  (autoload-if-found '(eshell-fringe-status-mode) "eshell-fringe-status" nil t)
  (with-eval-after-load 'esh-mode
    (add-hook 'eshell-mode-hook #'eshell-fringe-status-mode)))

11.5. esh-help

(eval-when-compile
  (el-get-bundle 'esh-help))

(with-delayed-execution
  (message "Install esh-help...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/esh-help"))
  (autoload-if-found '(setup-esh-help-eldoc) "esh-help" nil t)
  (setup-esh-help-eldoc))

11.6. eshell-multiple

(eval-when-compile
  (el-get-bundle 'eshell-multiple
    :url "https://github.com/takeokunn/eshell-multiple.git"))

(with-delayed-execution
  (message "Install eshell-multiple...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/eshell-multiple"))
  (autoload-if-found '(eshell-multiple-new
                       eshell-multiple-next
                       eshell-multiple-prev
                       eshell-multiple-clear-buffer
                       eshell-multiple-switch-buffer
                       eshell-multiple-dedicated-toggle
                       eshell-multiple-dedicated-open
                       eshell-multiple-dedicated-close)
                     "eshell-multiple" nil t)

  (defalias 'eshell/new #'eshell-multiple-new)
  (defalias 'eshell/next #'eshell-multiple-next)
  (defalias 'eshell/prev #'eshell-multiple-prev)
  (defalias 'eshell/clear #'eshell-multiple-clear-buffer)

  (with-eval-after-load 'esh-mode
    (define-key eshell-mode-map (kbd "C-l") #'eshell-multiple-clear-buffer)))

11.7. eshell-z

(eval-when-compile
  (el-get-bundle 'eshell-z))

(with-delayed-execution
  (message "Install eshell-z...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/eshell-z"))
  (autoload-if-found '(eshell-z) "eshell-z" nil t)
  (with-eval-after-load 'esh-mode
    (define-key eshell-mode-map (kbd "C-c C-q") #'eshell-z)))

11.8. eshell-did-you-mean

(eval-when-compile
  (el-get-bundle 'eshell-did-you-mean))

(with-delayed-execution
  (message "Install eshell-did-you-mean...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/eshell-did-you-mean"))
  (autoload-if-found '(eshell-did-you-mean-setup) "eshell-did-you-mean" nil t)
  (with-eval-after-load 'esh-mode
    (add-hook 'eshell-mode-hook #'eshell-did-you-mean-setup)))

11.9. eshell-syntax-highlight

(eval-when-compile
  (el-get-bundle 'eshell-syntax-highlighting))

(with-delayed-execution
  (message "Install eshell-syntax-highlighting...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/eshell-syntax-highlighting"))
  (autoload-if-found '(eshell-syntax-highlighting-global-mode) "eshell-syntax-highlighting" nil t)
  (eshell-syntax-highlighting-global-mode))

11.10. emacs-fish-completion

(eval-when-compile
  (el-get-bundle 'emacs-fish-completion
    :url "https://github.com/Ambrevar/emacs-fish-completion.git"))

(with-delayed-execution
  (message "Install emacs-fish-completion")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/emacs-fish-completion"))
  (autoload-if-found '(global-fish-completion-mode) "fish-completion" nil t)
  (when (executable-find "fish")
    (global-fish-completion-mode)))

12. Org Mode

12.1. Basic

12.1.1. org

(eval-when-compile
  (el-get-bundle 'org-mode))

(with-eval-after-load 'org
  (message "Install org...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/org-mode"))

  (define-key org-mode-map (kbd "C-c ,") #'org-insert-structure-template)
  (define-key org-mode-map (kbd "C-c C-,") #'org-insert-structure-template)

  ;; directory
  (setq org-directory "~/org")
  (setq org-agenda-files '("~/org/agenda"))

  ;; todo
  (setq org-todo-keywords '((sequence "TODO(t)" "NOW(n)" "WAIT(w)" "|" "DONE(d)")))

  ;; startup
  (setq org-startup-folded 'fold)
  (setq org-startup-truncated nil)

  ;; archive
  (setq org-archive-location `,(format (expand-file-name "archive/%s.org::" org-directory)
                                       (format-time-string "%Y-%m-%d" (current-time))))

  ;; log
  (setq org-log-into-drawer t)
  (setq org-log-done 'time))

12.1.2. org-clock

(with-eval-after-load 'org-clock
  (add-hook 'org-mode-hook #'org-clock-load)
  (add-hook 'kill-emacs-hook #'org-clock-save)

  (setq org-clock-out-remove-zero-time-clocks t)
  (setq org-clock-clocked-in-display 'mode-line))

12.1.3. org-list

(with-eval-after-load 'org-list
  (setq org-list-allow-alphabetical t))

12.1.4. org-keys

(with-eval-after-load 'org-keys
  (setq org-use-extra-keys t)
  (setq org-use-speed-commands t))

12.1.5. org-capture

(with-delayed-execution
  (autoload-if-found '(org-capture) "org-capture" nil t)
  (global-set-key (kbd "C-c c") #'org-capture)

  (advice-add 'org-capture :before #'(lambda (&rest _) (remove-hook 'find-file-hooks #'view-mode)))
  (advice-add 'org-capture :after #'(lambda (&rest _) (add-hook 'find-file-hooks #'view-mode)))

  (with-eval-after-load 'org-capture
    (setq org-capture-use-agenda-date t)
    (setq org-capture-templates `(("t" "Todo" entry (file+datetree ,(expand-file-name "todo.org" org-directory))
                                   "* %?")
                                  ("m" "Memo" entry (file ,(expand-file-name "memo.org" org-directory))
                                   "* %?")
                                  ("j" "Journal" entry (file+datetree ,(expand-file-name "journal.org" org-directory))
                                   "* %?\nEntered on %U\n  %i\n  %a")))))

12.1.6. org-id

(with-delayed-execution
  (message "Install org-id...")
  (autoload-if-found '(org-id-store-link) "org-id" nil t)
  (with-eval-after-load 'org-id
    (setq org-id-locations-file (expand-file-name ".org-id-locations" org-directory))
    (setq org-id-extra-files (append org-agenda-text-search-extra-files))
    (setq org-id-link-to-org-use-id 'create-if-interactive-and-no-custom-id)))

12.1.7. org-crypt

(with-delayed-execution
  (autoload-if-found '(org-encrypt-entry org-decrypt-entry org-crypt-use-before-save-magic) "org-crypt" nil t)
  (org-crypt-use-before-save-magic)
  (with-eval-after-load 'org-crypt
    (setq org-crypt-key nil)
    (setq org-tags-exclude-from-inheritance '("crypt"))))

12.1.8. org-journal

(eval-when-compile
  (el-get-bundle 'org-journal))

(with-delayed-execution
  (message "Install org-journal...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/org-journal"))
  (with-eval-after-load 'org-journal
    (setq org-journal-dir (expand-file-name "journal" org-directory))
    (setq org-journal-start-on-weekday 7)
    (setq org-journal-prefix-key "C-c j")))

12.1.9. org-generate

(eval-when-compile
  (el-get-bundle 'org-generate))

(with-delayed-execution
  (message "Install org-generate...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/org-generate"))
  (autoload-if-found '(org-generate) "org-generate" nil t))

12.1.10. org-pomodoro

(eval-when-compile
  (el-get-bundle "jwiegley/alert")
  (el-get-bundle 'org-pomodoro))

(with-delayed-execution
  (message "Install org-pomodoro...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/org-pomodoro"))
  (autoload-if-found '(org-pomodoro) "org-pomodoro" nil t))

12.1.11. org-view-mode

(eval-when-compile
  (el-get-bundle org-view-mode))

(with-delayed-execution
  (message "Install org-view-mode...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/org-view-mode"))
  (autoload-if-found '(org-view-mode) "org-view-mode" nil t))

12.1.12. org-random-todo

(eval-when-compile
  (el-get-bundle 'org-random-todo))

(with-delayed-execution
  (message "Install org-random-todo...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/org-random-todo"))
  (autoload-if-found '(org-random-todo org-random-todo-goto-current) "org-random-todo" nil t))

12.1.13. org-projectile

(eval-when-compile
  (el-get-bundle 'org-projectile))

(with-delayed-execution
  (message "Install org-projectile...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/org-projectile"))
  (autoload-if-found '() "org-projectile" nil t)

  ;; (org-projectile-per-project)
  ;; (global-set-key (kbd "C-c n p") #'org-projectile-project-todo-completing-read)

  ;; (setq org-projectile-per-project-filepath "~/org/projectile.org")
  ;; (setq org-agenda-files (append org-agenda-files (org-projectile-todo-files)))
  )

12.1.14. org-dashboard

(eval-when-compile
  (el-get-bundle 'org-dashboard))

(with-delayed-execution
  (message "Install org-dashboard...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/org-dashboard"))
  (autoload-if-found '(org-dashboard-display) "org-dashboard" nil t))

12.1.15. org-volume

(eval-when-compile
  (el-get-bundle 'org-volume
    :url "https://github.com/akirak/org-volume.git"))

(with-delayed-execution
  (message "Install org-volume...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/org-volume"))
  (autoload-if-found '(org-volume-update-entry-from-dblock) "org-volume" nil t))

12.2. Theme

12.2.1. org-faces

(with-eval-after-load 'org-faces
  (setq org-link '(t (:foreground "#ebe087" :underline t))))

12.2.2. org-superstar

(eval-when-compile
  (el-get-bundle 'org-superstar))

(with-delayed-execution-priority-high
  (message "Install org-superstar...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/org-superstar"))
  (autoload-if-found '(org-superstar-mode) "org-superstar")

  (with-eval-after-load 'org
    (add-hook 'org-mode-hook #'org-superstar-mode))

  (with-eval-after-load 'org-superstar
    (setq org-superstar-headline-bullets-list '("◉" "○" "✸" "✿"))
    (setq org-superstar-leading-bullet " ")))

12.3. Content

12.3.1. toc-org

(eval-when-compile
  (el-get-bundle 'toc-org))

(with-delayed-execution
  (message "Install toc-org...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/toc-org"))
  (autoload-if-found '() "toc-org" nil t))

12.4. Presentation

12.4.1. org-tree-slide

(eval-when-compile
  (el-get-bundle 'org-tree-slide))

(with-delayed-execution
  (message "Install org-tree-slide...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/org-tree-slide"))
  (autoload-if-found '(org-tree-slide-mode org-tree-slide-skip-done-toggle) "org-tree-slide" nil t)

  (with-eval-after-load 'org-tree-slide
    (setq org-tree-slide-skip-outline-level 4)))

12.5. Org Link

12.5.1. org-link

(with-delayed-execution
  (message "Install ol...")
  (autoload-if-found '(org-store-link) "ol" nil t)
  (global-set-key (kbd "C-c l") #'org-store-link))

12.5.2. org-link-beautify

(eval-when-compile
  (el-get-bundle 'org-link-beautify))

(with-delayed-execution
  (message "Install org-link-beautify...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/org-link-beautify"))

  (autoload-if-found '(org-link-beautify-mode) "org-link-beautify" nil t)

  (with-eval-after-load 'org
    (add-hook 'org-mode-hook #'org-link-beautify-mode)))

12.5.3. orgit

(eval-when-compile
  (el-get-bundle 'orgit))

(with-delayed-execution
  (message "Install orgit...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/orgit"))
  (autoload-if-found '(orgit-store-link) "orgit" nil t)
  (with-eval-after-load 'magit
    (define-key magit-mode-map [remap org-store-link] #'orgit-store-link)))

12.6. Org Agenda

12.6.1. Basic

(with-delayed-execution
  (message "Install org-agenda...")
  (autoload-if-found '(org-agenda) "org-agenda" nil t)
  (global-set-key (kbd "C-c a") #'org-agenda)

  (with-eval-after-load 'org-agenda
    (setq org-agenda-span 'day)
    (setq org-agenda-start-on-weekday 0)
    (setq org-agenda-todo-ignore-with-date t)))

12.6.2. org-super-agenda

(eval-when-compile
  (el-get-bundle 'org-super-agenda))

(with-delayed-execution
  (message "Install org-super-agenda...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/org-super-agenda"))
  (autoload-if-found '(org-super-agenda-mode) "org-super-agenda" nil t)
  (with-eval-after-load 'org-super-agenda
    (add-hook 'org-agenda-mode-hook #'org-super-agenda-mode)
    (setq org-super-agenda-groups '((:name "NOW" :time-grid t)
                                    (:todo "TODO" :order 8)
                                    (:todo "WAITING" :order 8)))))

12.6.3. org-hyperscheduler

(eval-when-compile
  (el-get-bundle dmitrym0/org-hyperscheduler))

(with-delayed-execution
  (message "Install org-hyperscheduler...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/org-hyperscheduler"))
  (autoload-if-found '() "org-hyperscheduler" nil t))

12.7. Org Babel

12.7.1. org-babel

(with-delayed-execution
  (message "Install ob-babel...")
  (autoload-if-found '(org-babel-do-load-languages) "org" nil t)

  (with-eval-after-load 'ob-core
    (setq org-confirm-babel-evaluate nil))

  (org-babel-do-load-languages 'org-babel-load-languages
                               '((awk . t)
                                 (C . t)
                                 (R . t)
                                 (clojure . t)
                                 (emacs-lisp . t)
                                 (haskell . t)
                                 (java . t)
                                 (js . t)
                                 (lisp . t)
                                 (makefile . t)
                                 (perl . t)
                                 (plantuml . t)
                                 (python . t)
                                 (ruby . t)
                                 (scheme . t)
                                 (shell . t)
                                 (sql . t))))

12.7.2. ob-async

(eval-when-compile
  (el-get-bundle 'ob-async))

(with-delayed-execution
  (message "Install ob-async...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/ob-async"))
  (autoload-if-found '(ob-async-org-babel-execute-src-block) "ob-async" nil t)
  (defalias 'org-babel-execute-src-block:async 'ob-async-org-babel-execute-src-block))

12.7.3. ob-fish

(eval-when-compile
  (el-get-bundle 'ob-fish :url "https://github.com/takeokunn/ob-fish.git"))

(with-delayed-execution
  (message "Install ob-fish...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/ob-fish"))

  (org-babel-do-load-languages 'org-babel-load-languages
                               '((fish . t))))

12.7.4. ob-rust

(eval-when-compile
  (el-get-bundle 'ob-rust))

(with-delayed-execution
  (message "Install ob-rust...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/ob-rust"))
  (org-babel-do-load-languages 'org-babel-load-languages
                               '((rust . t))))

12.7.5. ob-go

(eval-when-compile
  (el-get-bundle 'ob-go))

(with-delayed-execution
  (message "Install ob-go...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/ob-go"))
  (org-babel-do-load-languages 'org-babel-load-languages
                               '((go . t))))

12.7.6. ob-typescript

(eval-when-compile
  (el-get-bundle 'ob-typescript))

(with-delayed-execution
  (message "Install ob-typescript...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/ob-typescript"))
  (org-babel-do-load-languages 'org-babel-load-languages
                               '((typescript . t))))

12.7.7. ob-php

(eval-when-compile
  (el-get-bundle 'ob-php :url "https://github.com/Sasanidas/ob-php.git"))

(with-delayed-execution
  (message "Install ob-php...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/ob-php"))
  (org-babel-do-load-languages 'org-babel-load-languages
                               '((php . t))))

12.7.8. ob-http

(eval-when-compile
  (el-get-bundle 'ob-http))

(with-delayed-execution
  (message "Install ob-http...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/ob-http"))
  (org-babel-do-load-languages 'org-babel-load-languages
                               '((http . t))))

12.8. Org Publish

12.8.1. ox-html

(with-eval-after-load 'ox-html
  (setq org-html-head-include-default-style nil)
  (setq org-html-head-include-scripts nil)
  (setq org-html-doctype "html5")
  (setq org-html-coding-system 'utf-8-unix))

12.8.2. ox-gfm

(eval-when-compile
  (el-get-bundle 'ox-gfm))

(with-delayed-execution
  (message "Install ox-gmf...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/ox-gfm"))
  (autoload-if-found '(org-gfm-export-as-markdown
                       org-gfm-convert-region-to-md
                       org-gfm-export-to-markdown
                       org-gfm-publish-to-gfm) "ox-gfm" nil t))

12.8.3. ox-zenn

(eval-when-compile
  (el-get-bundle 'ox-zenn))

(with-delayed-execution
  (message "Install ox-zenn...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/ox-zenn"))
  (autoload-if-found '(org-zenn-export-as-markdown
                       org-zenn-export-to-markdown
                       org-zenn-publish-to-markdown
                       org-zenn-convert-region-to-md) "ox-zenn" nil t))

12.8.4. ox-hatena

(eval-when-compile
  (el-get-bundle 'ox-hatena
    :url "https://github.com/zonkyy/ox-hatena.git"))

(with-delayed-execution
  (message "Install ox-hatena...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/ox-hatena"))
  (autoload-if-found '(org-hatena-export-as-hatena
                       org-hatena-export-to-hatena
                       org-hatena-export-to-hatena-and-open) "ox-hatena" nil t))

12.8.5. ox-qmd

(eval-when-compile
  (el-get-bundle 'ox-qmd))

(with-delayed-execution
  (message "Install ox-qmd...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/ox-qmd"))

  (autoload-if-found '(org-qmd-export-as-markdown
                       org-qmd-convert-region-to-md
                       org-qmd-export-to-markdown) "ox-qmd" nil t))

12.8.6. ox-hugo

(eval-when-compile
  (el-get-bundle 'ox-hugo))

(with-delayed-execution
  (message "Install ox-hugo...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/ox-hugo"))
  (autoload-if-found '(org-hugo-export-as-md
                       org-hugo-export-to-md
                       org-hugo-export-wim-to-md
                       org-hugo-debug-info) "ox-hugo" nil t)
  (with-eval-after-load 'ox-hugo
    (setq org-hugo-auto-set-lastmod t)))

12.9. Org Roam

12.9.1. el-get

(eval-when-compile
  (el-get-bundle 'org-roam))

12.9.2. basic

(with-delayed-execution
  (message "Install org-roam...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/org-roam"))
  (add-to-list 'load-path (locate-user-emacs-file "el-get/org-roam/extensions"))

  (autoload-if-found '(org-roam-buffer-toggle
                       org-roam-node-find
                       org-roam-graph
                       org-roam-node-insert
                       org-roam-capture) "org-roam" nil t)
  (autoload-if-found '(org-roam-db-sync org-roam-db-autosync-enable) "org-roam-db" nil t)

  (org-roam-db-autosync-enable)

  (global-set-key (kbd "C-c n l") #'org-roam-buffer-toggle)
  (global-set-key (kbd "C-c n f") #'org-roam-node-find)
  (global-set-key (kbd "C-c n g") #'org-roam-graph)
  (global-set-key (kbd "C-c n c") #'org-roam-capture)
  (global-set-key (kbd "C-c n i") #'org-roam-node-insert)

  (with-eval-after-load 'org-roam-capture
    (setq org-roam-directory `,(concat
                                (s-trim-right (shell-command-to-string "ghq root"))
                                "/github.com/takeokunn/blog"))
    (setq org-roam-capture-templates '(("f" "Fleeting(一時メモ)" plain "%?"
                                        :target (file+head "org/fleeting/%<%Y%m%d%H%M%S>-${slug}.org"
                                                           "#+title: ${title}\n")
                                        :unnarrowed t)
                                       ("l" "Literature(文献)" plain "%?"
                                        :target (file+head "org/literature/%<%Y%m%d%H%M%S>-${slug}.org"
                                                           "#+title: ${title}\n#+url: ")
                                        :unnarrowed t)
                                       ("p" "Permanent(記事)" plain "%?"
                                        :target (file+head "org/permanent/%<%Y%m%d%H%M%S>-${slug}.org"
                                                           "#+title: ${title}\n")
                                        :unnarrowed t)))))

12.9.3. org-roam-dailies

(with-delayed-execution
  (message "Install org-roam-dailies...")

  (autoload-if-found '(org-roam-dailies-goto-today
                       org-roam-dailies-goto-yesterday
                       org-roam-dailies-goto-tomorrow
                       org-roam-dailies-capture-today
                       org-roam-dailies-goto-next-note
                       org-roam-dailies-goto-previous-note
                       org-roam-dailies-goto-date
                       org-roam-dailies-capture-date
                       org-roam-dailies-find-directory) "org-roam-dailies" nil t)

  (global-set-key (kbd "C-c n j") #'org-roam-dailies-goto-today)

  (with-eval-after-load 'org-roam-dialies
    (define-key org-roam-dailies-map (kbd "d") #'org-roam-dailies-goto-today)
    (define-key org-roam-dailies-map (kbd "y") #'org-roam-dailies-goto-yesterday)
    (define-key org-roam-dailies-map (kbd "t") #'org-roam-dailies-goto-tomorrow)
    (define-key org-roam-dailies-map (kbd "n") #'org-roam-dailies-capture-today)
    (define-key org-roam-dailies-map (kbd "f") #'org-roam-dailies-goto-next-note)
    (define-key org-roam-dailies-map (kbd "b") #'org-roam-dailies-goto-previous-note)
    (define-key org-roam-dailies-map (kbd "c") #'org-roam-dailies-goto-date)
    (define-key org-roam-dailies-map (kbd "v") #'org-roam-dailies-capture-date)
    (define-key org-roam-dailies-map (kbd ".") #'org-roam-dailies-find-directory)))

12.9.4. org-roam-export

(with-delayed-execution
  (message "Install org-roam-export...")
  (autoload-if-found '(org-roam-export--org-html--reference) "org-roam-export" nil t)
  (advice-add 'org-html--reference :override #'org-roam-export--org-html--reference))

12.9.5. org-roam-graph

(with-delayed-execution
  (message "Install org-roam-graph...")
  (autoload-if-found '(org-roam-graph--open) "org-roam-graph" nil t))

12.9.6. org-roam-overlay

(with-delayed-execution
  (message "Install org-roam-overlay...")
  (autoload-if-found '(org-roam-overlay-mode) "org-roam-overlay" nil t)
  (with-eval-after-load 'org
    (add-hook 'org-mode-hook #'org-roam-overlay-mode)))

12.9.7. org-roam-protocol

(with-delayed-execution
  (message "Install org-roam-protocol...")
  (autoload-if-found '(org-roam-protocol-open-ref org-roam-protocol-open-node) "org-roam-protocol" nil t)
  (with-eval-after-load 'org-roam-protocol
    (add-to-list 'org-protocol-protocol-alist '("org-roam-ref" :protocol "roam-ref" :function org-roam-protocol-open-ref))
    (add-to-list 'org-protocol-protocol-alist '("org-roam-node" :protocol "roam-node" :function org-roam-protocol-open-node))
    (setq org-roam-protocol-store-links t)))

12.9.8. org-roam-ui

(eval-when-compile
  (el-get-bundle 'org-roam-ui))

(with-delayed-execution
  (message "Install org-roam-ui...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/org-roam-ui"))

  (with-eval-after-load 'org-roam-ui
    (setq org-roam-ui-sync-theme t)
    (setq org-roam-ui-follow t)
    (setq org-roam-ui-update-on-save t)
    (setq org-roam-ui-open-on-start t)))

12.9.9. org-roam-timestamps

(eval-when-compile
  (el-get-bundle 'org-roam-timestamps))

(with-delayed-execution
  (message "Install org-roam-timestamps...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/org-roam-timestamps"))
  (autoload-if-found '() "org-roam-timestamps" nil t))

12.9.10. org-roam-search-node-insert

(eval-when-compile
  (el-get-bundle natask/org-roam-search))

(with-delayed-execution
  (message "Install org-roam-search...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/org-roam-search"))
  (autoload-if-found '() "org-roam-search" nil t))

12.9.11. TODO org-roam-server

(eval-when-compile
  (el-get-bundle org-roam/org-roam-server))

(with-delayed-execution
  (message "Install org-roam-server...")
  (add-to-list 'load-path (locate-user-emacs-file "el-get/org-roam-server"))
  (autoload-if-found '() "org-roam-server" nil t)

  (with-eval-after-load 'org-roam-server
    (setq org-roam-server-host "127.0.0.1")
    (setq org-roam-server-port 8080)
    (setq org-roam-server-authenticate nil)
    (setq org-roam-server-export-inline-images t)
    (setq org-roam-server-serve-files nil)
    (setq org-roam-server-served-file-extensions '("pdf" "mp4" "ogv"))
    (setq org-roam-server-network-poll t)
    (setq org-roam-server-network-arrows nil)
    (setq org-roam-server-network-label-truncate t)
    (setq org-roam-server-network-label-truncate-length 60)
    (setq org-roam-server-network-label-wrap-length 20)))

13. EXWM

13.1. exwm

(eval-when-compile
  (el-get-bundle 'exwm))

13.2. exwm-edit

(eval-when-compile
  (el-get-bundle 'exwm-edit))

(when (string= system-type "gnu/linux")
  (with-delayed-execution
    (message "Install exwm-edit...")
    (add-to-list 'load-path (locate-user-emacs-file "el-get/exwm-edit"))
    (autoload-if-found '(exwm-edit--compose-minibuffer) "exwm-edit" nil t)
    (exwm-input-set-key (kbd "C-c '") #'exwm-edit--compose-minibuffer)
    (exwm-input-set-key (kbd "C-c C-'") #'exwm-edit--compose-minibuffer)
    (with-eval-after-load 'exwm-edit
      (setq exwm-edit-bind-default-keys nil))))

13.3. exwm-modeline

(eval-when-compile
  (el-get-bundle 'exwm-modeline))

(when (string= system-type "gnu/linux")
  (with-delayed-execution
    (message "Install exwm-modeline...")
    (add-to-list 'load-path (locate-user-emacs-file "el-get/exwm-modeline"))
    (autoload-if-found '(exwm-modeline-mode) "exwm-modeline")

    (with-eval-after-load 'exwm-core
      (add-hook 'exwm-mode-hook #'exwm-modeline-mode))

    (with-eval-after-load 'exwm-modeline
      (setq exwm-modeline-short t))))

14. MyFunc

14.1. my/beginning-of-intendation

(defun my/beginning-of-intendation ()
  "move to beginning of line, or indentation"
  (interactive)
  (back-to-indentation))

14.2. my/copy-buffer

(defun my/copy-buffer ()
  (interactive)
  (save-excursion
    (mark-whole-buffer)
    (copy-region-as-kill (region-beginning) (region-end))))

(defalias 'copy-buffer 'my/copy-buffer)

14.3. my/ghq-get

(defun my/ghq-get ()
  (interactive)
  (let ((url (read-string "url > ")))
    (message
     (shell-command-to-string
      (mapconcat #'shell-quote-argument
                 (list "ghq" "get" url)
                 " ")))))

(defalias 'ghq-get 'my/ghq-get)

14.4. my/gh-browse

(defun my/gh-browse ()
  (interactive)
  (message
   (shell-command-to-string
    (mapconcat #'shell-quote-argument
               (list "gh" "browse")
               " "))))

(defalias 'gh-browse 'my/gh-browse)

14.5. my/indent-all

(defun my/indent-buffer ()
  (interactive)
  (save-excursion
    (mark-whole-buffer)
    (indent-region (region-beginning) (region-end))))

(defalias 'indent-buffer 'my/indent-buffer)

14.6. my/move-line

(defun my/move-line (arg)
  (interactive)
  (let ((col (current-column)))
    (unless (eq col 0)
      (move-to-column 0))
    (save-excursion
      (forward-line)
      (transpose-lines arg))
    (forward-line arg)))

(defun my/move-line-down ()
  (interactive)
  (my/move-line 1))

(defun my/move-line-up ()
  (interactive)
  (my/move-line -1))

(global-set-key (kbd "M-N") #'my/move-line-down)
(global-set-key (kbd "M-P") #'my/move-line-up)

14.7. my/reload-major-mode

(defun my/reload-major-mode ()
  "Reload current major mode."
  (interactive)
  (let ((current-mode major-mode))
    (fundamental-mode)
    (funcall current-mode)
    current-mode))

14.8. my/toggle-kill-emacs

(defvar my/kill-emacs-keybind-p t)

(defun my/toggle-kill-emacs ()
  (interactive)
  (if my/kill-emacs-keybind-p
      (progn
        (message "C-x C-c save-buffers-kill-emacs OFF")
        (setq my/kill-emacs-keybind-p nil)
        (global-set-key (kbd "C-x C-c") nil))
    (progn
      (message "C-x C-c save-buffers-kill-emacs ON")
      (setq my/kill-emacs-keybind-p t)
      (global-set-key (kbd "C-x C-c") 'save-buffers-kill-emacs))))

14.9. my/get-class-name-by-file-name

(defun my/get-class-name-by-file-name ()
  (interactive)
  (insert
   (file-name-nondirectory
    (file-name-sans-extension (or (buffer-file-name)
                                  (buffer-name (current-buffer)))))))

14.10. my/insert-clipboard

(defun my/insert-clipboard (arg)
  (interactive "sstring: ")
  (kill-new arg))

14.11. my/actionlint

(defun my/actionlint ()
  (interactive)
  (shell-command-to-string "actionlint"))

(defalias 'actionlint 'my/actionlint)

14.12. my/build-info

(defun my/build-info ()
  "Display build information in a buffer."
  (interactive)
  (switch-to-buffer (get-buffer-create "*Build info*"))
  (setq tab-width 4)
  (let ((buffer-read-only nil))
    (erase-buffer)
    (insert (format "GNU Emacs %s\nCommit:\t\t%s\nBranch:\t\t%s\n"
                    emacs-version
                    emacs-repository-version
                    emacs-repository-branch))
    (insert (format "System:\t\t%s\nDate:\t\t%s\n"
                    system-configuration
                    (format-time-string "%Y-%m-%d %T (%Z)" emacs-build-time)))
    (insert (format "Patch:\t\t%s ns-inline.patch\n"
                    (if (boundp 'mac-ime--cursor-type) "with" "without")))
    (insert (format "Features:\t%s\n" system-configuration-features))
    (view-mode)))

15. Footer

15.1. Magic File Name を有効にする

(setq file-name-handler-alist my/saved-file-name-handler-alist)

15.2. profilerを終了する

(when my/enable-profile
  (profiler-report)
  (profiler-stop))

Author: takeokunn

Created: 2022-11-30 Wed 19:17

Validate