Skip to content

Kyure-A/.emacs.d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

init.org

Introduction

Author

Kyure_A

Repository

https://github.com/Kyure-A/.emacs.d

Screen shot

./assets/emacs_screenshot.png

Configurations

Initialize

Header

;;; init.el ---  -*- lexical-binding: t -*-

;; Author: Kyure_A <twitter.com/@kyureq>
;; Maintainer: Kyure_A <twitter.com/@kyureq>

;;; Commentary:

;;              .mmmmmmmmmmmmmm.                   .cccccccc!                .(.
;;  .+eeeee.   .??:   +m<   <mm.    .aaaaaaaa.    ccC!           .+sssss{    (!!
;; .ee:        .mm:   +mm   .mm_   .aa>   (aaA    cCC           .ss>         1!:
;; .ee_        .mm:   +mm   .mm_   .aa{    aaA    ccC           .sss.        !!
;; .ee_ <ee    .mm:   +mm   .mm_   .aa{ .(AaaA    cCC`           .<sssss    .!:
;; .ee_        .mm:   +mm   .mm_   .aa{ .??aaA    cCCc......         .ss:   ..
;; .eee....    .<<!   ?<<   .<<`   .aa{    aaA     ?CCCCCCC!    ....(s=: .!!-
;;  .?eeeee`                       .AA!    AAA                  .ssss<s!   .!!

;;; Code:  

User Info

(setq user-full-name "Kyure_A")
(setq user-mail-address "k@kyre.moe")

Disable Magic File Name at startup

(defconst init/saved-file-name-handler-alist file-name-handler-alist)
(setq file-name-handler-alist nil)
(add-hook 'emacs-startup-hook (lambda () (setq file-name-handler-alist init/saved-file-name-handler-alist)))

setup tracker

(defvar setup-tracker--level 0)
(defvar setup-tracker--parents nil)
(defvar setup-tracker--times nil)

(when load-file-name
  (push load-file-name setup-tracker--parents)
  (push (current-time) setup-tracker--times)
  (setq setup-tracker--level (1+ setup-tracker--level)))

(add-variable-watcher
 'load-file-name
 (lambda (_ v &rest __)
   (cond ((equal v (car setup-tracker--parents))
          nil)
         ((equal v (cadr setup-tracker--parents))
          (setq setup-tracker--level (1- setup-tracker--level))
          (let* ((now (current-time))
                 (start (pop setup-tracker--times))
                 (elapsed (+ (* (- (nth 1 now) (nth 1 start)) 1000)
                             (/ (- (nth 2 now) (nth 2 start)) 1000))))
            (with-current-buffer (get-buffer-create "*setup-tracker*")
              (save-excursion
                (goto-char (point-min))
                (dotimes (_ setup-tracker--level) (insert "> "))
                (insert
                 (file-name-nondirectory (pop setup-tracker--parents))
                 " (" (number-to-string elapsed) " msec)\n")))))
         (t
          (push v setup-tracker--parents)
          (push (current-time) setup-tracker--times)
          (setq setup-tracker--level (1+ setup-tracker--level))))))

with-delayed-execution

Source

(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)

(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)))

autoload-if-found

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

cl-lib

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

(with-delayed-execution-priority-high
  (require 'cl-lib))

el-clone

(eval-when-compile
  (unless (file-directory-p "~/.emacs.d/elpa/el-clone")
    (if (fboundp 'package-vc-install)
        (package-vc-install "https://github.com/Kyure-A/el-clone.git")
      (customize-set-variable 'package-archives '(("kelpa" . "https://kelpa.kyre.moe/")))
      (package-initialize)
      (package-install 'el-clone))))

(eval-and-compile
  (add-to-list 'load-path "~/.emacs.d/elpa/el-clone")
  (require 'el-clone))

Keybindings

global-set-key

Special Keys

(global-set-key (kbd "<f2>") 'toggle-eat)
(global-set-key (kbd "<f3>") 'dashboard-open)
(global-set-key (kbd "RET") 'smart-newline)
(global-set-key (kbd "C-RET") 'newline)
(global-set-key (kbd "<backspace>") 'smart-hungry-delete-backward-char)
(global-set-key (kbd "C-<backspace>") 'backward-delete-word)
(global-set-key (kbd "C-<left>") 'centaur-tabs-forward)
(global-set-key (kbd "C-<right>") 'centaur-tabs-backward)
(global-set-key (kbd "C-<return>") 'newline)
(global-set-key (kbd "C-SPC") 'toggle-input-method)

C-x

(global-set-key (kbd "C-x g") 'magit-status)
(global-set-key (kbd "C-x M-g") 'magit-dispatch-popup)
(global-set-key (kbd "C-x i") 'nil)
(global-set-key (kbd "C-x i i") 'ivy-yasnippet)
(global-set-key (kbd "C-x i n") 'yas-new-snippet)
(global-set-key (kbd "C-x u") 'undo-tree-visualize)
(global-set-key (kbd "C-x C-z") 'nil)
(global-set-key (kbd "C-x C-c") 'nil)

C-c

(global-set-key (kbd "C-c e b") 'eval-buffer)
(global-set-key (kbd "C-c e m") 'menu-bar-mode)
(global-set-key (kbd "C-c o") 'Kyure_A/open)
(global-set-key (kbd "C-c p") 'smartparens-global-mode)
(global-set-key (kbd "C-c s") 'Kyure_A/start-repl)
(global-set-key (kbd "C-c t") 'centaur-tabs-counsel-switch-group)
(global-set-key (kbd "C-c r") 'vr/replace)

C-l (eglot)

(global-set-key (kbd "C-l") 'nil)
(global-set-key (kbd "C-l C-l") 'eglot)

C-*

(global-set-key (kbd "C-a") 'mwim-beginning-of-code-or-line)
(global-set-key (kbd "C-d") 'smart-hungry-delete-backward-char)
(global-set-key (kbd "C-e") 'mwim-end-of-code-or-line)
(global-set-key (kbd "C-h") 'smart-hungry-delete-backward-char)
(global-set-key (kbd "C-m") 'smart-newline)
(global-set-key (kbd "C-o") 'nil)
(global-set-key (kbd "C-u") 'undo-tree-undo)
(global-set-key (kbd "C-r") 'undo-tree-redo)
(global-set-key (kbd "C-s") 'swiper)
(global-set-key (kbd "C-z") 'undo-tree-undo)
(global-set-key (kbd "C-/") 'other-window)
(global-set-key (kbd "C-;") 'smart-hungry-delete-forward-char)

M-*

(global-set-key (kbd "M-k") 'puni-backward-kill-line)
(global-set-key (kbd "M-x") 'counsel-M-x)

yes/no

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

avy

(eval-when-compile
  (el-clone :repo "abo-abo/avy"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/avy"))
  (with-eval-after-load 'avy
    (setq avy-all-windows nil)
    (setq avy-background t)))

mwim

(eval-when-compile
  (el-clone :repo "alezost/mwim.el"))

(with-delayed-execution-priority-high
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/mwim"))
  (autoload-if-found '(mwim-beginning-of-code-or-line
                       mwim-end-of-code-or-line)
                     "mwim"))

smart-hungry-delete

(eval-when-compile
  (el-clone :repo "hrehfeld/emacs-smart-hungry-delete"))

(with-delayed-execution-priority-high
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/emacs-smart-hungry-delete"))
  (with-eval-after-load 'smart-hungry-delete
    (smart-hungry-delete-add-default-hooks))
  (autoload-if-found '(smart-hungry-delete-forward-char
                       smart-hungry-delete-backward-char)
                     "smart-hungry-delete"))

smart-newline

(eval-when-compile
  (el-clone :repo "ainame/smart-newline.el"))

(with-delayed-execution-priority-high
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/smart-newline"))
  (autoload-if-found '(smart-newline) "smart-newline"))

Common

Mouse

(setq mouse-wheel-progressive-speed nil)
(setq scroll-preserve-screen-position 'always)

Scroll

good-scroll

cause bug?

(eval-when-compile
  (el-clone :repo "io12/good-scroll.el"))

(with-delayed-execution-priority-high
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/good-scroll"))
  (autoload-if-found '(good-scroll-mode) "good-scroll")
  (good-scroll-mode t))

sublimity

(eval-when-compile
  (el-clone :repo "zk-phi/sublimity"))

(with-delayed-execution-priority-high
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/sublimity"))
  (autoload-if-found '(sublimity-mode) "sublimity")
  (sublimity-mode t)
  (with-eval-after-load 'sublimity
    (setq sublimity-attractive-centering-width 200)
    (setq sublimity-scroll-weight 15)
    (setq sublimity-scroll-drift-length 10)))

Indent

(setq-default indent-tabs-mode nil)

save-place-mode

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

electric-pair-mode

(with-delayed-execution
  (electric-pair-mode t))

System Language Setting

(set-language-environment "Japanese")
(prefer-coding-system 'utf-8)
(set-default 'buffer-file-coding-system 'utf-8)

Overwrite Region

(with-delayed-execution
  (delete-selection-mode t))

auto yes (async-shell-command)

Source

(defun auto-yes (old-fun &rest args)
  (cl-letf (((symbol-function 'y-or-n-p) (lambda (prompt) t))
             ((symbol-function 'yes-or-no-p) (lambda (prompt) t)))
    (apply old-fun args)))

(advice-add #'async-shell-command :around #'auto-yes)

shut up (async-shell-command)

(add-to-list 'display-buffer-alist '("*Async Shell Command*" display-buffer-no-window (nil)))

After save

(defun my/compile-init-org ()
  (shell-command-to-string
   (mapconcat #'shell-quote-argument
              `("emacs" "-Q" "--batch" "--eval" "(progn (require 'ob-tangle) (org-babel-tangle-file \"~/.emacs.d/README.org\" \"~/.emacs.d/init.el\" \"emacs-lisp\"))")
              " ")))

(defun my/compile-early-init-org ()
  (shell-command-to-string
   (mapconcat #'shell-quote-argument
              `("emacs" "-Q" "--batch" "--eval" "(progn (require 'ob-tangle) (org-babel-tangle-file \"~/.emacs.d/early-init.org\" \"~/.emacs.d/early-init.el\" \"emacs-lisp\"))")
              " ")))


(defun my/compile-init-files ()
  (interactive)
  (my/compile-early-init-org)
  (my/compile-init-org)
  (byte-compile-file "~/.emacs.d/early-init.el")
  (byte-compile-file "~/.emacs.d/init.el"))

(add-hook 'org-mode-hook
          (lambda ()
            (add-hook 'after-save-hook #'my/compile-init-files)))

Show Clock

(with-delayed-execution
  (display-time-mode t)
  (setq display-time-interval 1)
  (setq display-time-string-forms '((format "%s:%s:%s" 24-hours minutes seconds)))
  (setq display-time-day-and-date t))

Auto revert

(with-delayed-execution
  (global-auto-revert-mode t)
  (setq auto-revert-interval 1))

which function

(with-delayed-execution
  (which-function-mode t))

recent file

(with-delayed-execution
  (recentf-mode t)
  (setq recently-file (locate-user-emacs-file "recently"))
  (setq recentf-max-saved-items 150)
  (setq recentf-auto-cleanup 'never)
  (setq recentf-exclude '("/recentf" "COMMIT_EDITMSG" "/.?TAGS" "^/sudo:" "/\\.emacs\\.d/games/*-scores" "/\\.emacs\\.d/\\.tmp/")))

(eval-when-compile
  (el-clone :repo "emacsmirror/recently"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/recently"))
  (autoload-if-found '(recently-mode) "recently")
  (recently-mode t))

load custom.el

(setq custom-file (locate-user-emacs-file "custom.el"))

debug-on-error

(setq debug-on-error t)

disable make lockfiles

(setq create-lockfiles nil)

backup directories

(setq backup-directory-alist '((".*" . "~/.tmp")))

auto save

(setq auto-save-file-name-transforms '((".*" "~/.tmp/" t)))
(setq auto-save-list-file-prefix nil)
(setq auto-save-default nil)

native compile

(custom-set-variables '(warning-suppress-types '((comp))))
(with-eval-after-load 'comp
  (setq native-comp-async-jobs-number 8)
  (setq native-comp-speed 3)
  (setq native-comp-always-compile t))

Emacs Lisp Libraries

aio

(eval-when-compile
  (el-clone :repo "skeeto/emacs-aio"))

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

ansi

(eval-when-compile
  (el-clone :repo "rejeep/ansi"))

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

async

(eval-when-compile
  (el-clone :repo "jwiegley/emacs-async"))

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

async-await

(eval-when-compile
  (el-clone :repo "chuntaro/emacs-async-await"))

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

bui

(eval-when-compile
  (el-clone :repo "alezost/bui.el"))

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

cfrs

(eval-when-compile
    (el-clone :repo "Alexander-Miller/cfrs"))

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

compat

(eval-when-compile
  (el-clone :repo "phikal/compat.el"))

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

dash

(eval-when-compile
  (el-clone :repo "magnars/dash.el"))

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

dotenv

(eval-when-compile
  (el-clone :repo "pkulev/dotenv.el"))

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

eask

(eval-when-compile
  (el-clone :repo "emacs-eask/eask")
  (el-clone :repo "emacs-eask/eask-mode"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/eask"))
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/eask-mode"))
  (autoload-if-found '(eask-mode) "eask-mode" nil t)
  (add-to-list 'auto-mode-alist '("Eask" . eask-mode)))

el-project

(eval-when-compile
  (el-clone :repo "Kyure-A/el-project"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/el-project"))
  (require 'el-project))

eldoc

(with-delayed-execution
  (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)))

elsa

(eval-when-compile
  (el-clone :repo "emacs-elsa/Elsa"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/Elsa"))
  (autoload-if-found '(elsa-run) "elsa")
  (with-eval-after-load 'elsa
    (elsa-lsp-register)))

(eval-when-compile
  (el-clone :repo "emacs-elsa/flycheck-elsa"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/flycheck-elsa"))

  (autoload-if-found '(flycheck-elsa-setup) "flycheck-elsa")
  (add-hook 'emacs-lisp-mode-hook #'flycheck-mode)

  (with-eval-after-load 'elisp-mode
    (setq flycheck-elsa-backend 'eask)
    (add-hook 'emacs-lisp-mode-hook #'flycheck-elsa-setup)))

elquery

(eval-when-compile
  (el-clone :repo "AdamNiederer/elquery"))

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

emacsql

(eval-when-compile
  (el-clone :repo "magit/emacsql"))

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

epl

(eval-when-compile
  (el-clone :repo "cask/epl"))

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

f

(eval-when-compile
  (el-clone :repo "rejeep/f.el"))

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

frame-local

(eval-when-compile
  (el-clone :repo "sebastiencs/frame-local"))

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

ht

(eval-when-compile
  (el-clone :repo "Wilfred/ht.el"))

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

iter2

(eval-when-compile
  (el-clone :repo "doublep/iter2"))

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

Keg

(eval-when-compile
  (el-clone :repo "conao3/keg.el"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/keg"))
  (add-to-list 'auto-mode-alist '("Keg" . emacs-lisp-mode)))

lgr

(eval-when-compile
  (el-clone :repo "Fuco1/emacs-lgr"))

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

llm

(eval-when-compile
  (el-clone :repo "ahyatt/llm"))

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

lisp-interaction-mode

(with-delayed-execution
  (define-key lisp-interaction-mode-map (kbd "C-j") #'eval-print-last-sexp))

package-build

(eval-when-compile
  (el-clone :repo "melpa/package-build"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/package-build"))
  (require 'package-build))

package-lint

(eval-when-compile
  (el-clone :repo "purcell/package-lint"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/package-lint"))
  (autoload-if-found '(package-lint-current-buffer) "package-lint")
  (require 'package-lint))

pos-tip

(eval-when-compile
  (el-clone :repo "tjarvstrand/pos-tip"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/pos-tip")))

promise

(eval-when-compile
  (el-clone :repo "chuntaro/emacs-promise"))

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

s

(eval-when-compile
  (el-clone :repo "magnars/s.el"))

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

shrink-path

(eval-when-compile
  (el-clone :repo "zbelial/shrink-path.el"))

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

simple-httpd

(eval-when-compile
  (el-clone :repo "skeeto/emacs-web-server"))

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

spinner

(eval-when-compile
  (el-clone :repo "Malabarba/spinner.el"))

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

tablist

(eval-when-compile
  (el-clone :repo "politza/tablist"))

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

transient

(eval-when-compile
  (el-clone :repo "magit/transient"
            :load-paths `(,(locate-user-emacs-file "el-clone/transient/lisp"))))

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

trinary

(eval-when-compile
  (el-clone :repo "emacs-elsa/trinary-logic"))

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

pfuture

(eval-when-compile
  (el-clone :repo "Alexander-Miller/pfuture"))

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

pkg-info

(eval-when-compile
  (el-clone :repo "emacsorphanage/pkg-info"))

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

queue

(eval-when-compile
  (el-clone :repo "emacsmirror/queue"))

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

recur

(eval-when-compile
  (el-clone :repo "ROCKTAKEY/recur"))

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

request

(eval-when-compile
  (el-clone :repo "tkf/emacs-request"))

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

shut-up

(eval-when-compile
  (el-clone :repo "cask/shut-up"))

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

undercover

(eval-when-compile
  (el-clone :repo "sviridov/undercover.el"))

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

validate

(eval-when-compile
  (el-clone :repo "Malabarba/validate.el"))

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

websocket

(eval-when-compile
  (el-clone :repo "ahyatt/emacs-websocket"))

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

yaml

(eval-when-compile
  (el-clone :repo "zkry/yaml.el"))

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

Language Server

eglot

(with-delayed-execution-priority-high
  (autoload-if-found '(eglot eglot-ensure) "eglot"))

(eval-when-compile
  (el-clone :url "https://gist.github.com/ee156d1a3574442ac1d8a357834cf17e.git"
            :repo "eglot-codelens")
  (el-clone :repo "jdtsmith/eglot-booster"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/eglot-booster"))
  (autoload-if-found '(eglot-booster-mode) "eglot-booster")
  (with-eval-after-load 'eglot
    (eglot-booster-mode)))

;; (with-delayed-execution
;;    (add-to-list 'load-path (locate-user-emacs-file "el-clone/eglot-codelens"))
;;    (autoload-if-found '(eglot-lens-mode) "eglot-codelens")
;;    (with-eval-after-load 'eglot
;;      (eglot-lens-mode)))

Nix

(with-eval-after-load 'eglot
  (add-to-list 'eglot-server-programs '(nix-mode . ("nixd")))
  (add-hook 'nix-mode-hook #'eglot-ensure))

Rust

Source

(with-eval-after-load 'eglot
  (add-to-list 'eglot-server-programs
               `(rust-mode . ("rust-analyzer" :initializationOptions
                              ( :procMacro (:enable t)
                                :cargo ( :buildScripts (:enable t)
                                         :features "all")))))
  (add-hook 'rust-mode-hook #'eglot-ensure))

SATySFi

(with-eval-after-load 'eglot
  (add-to-list 'eglot-server-programs '(satysfi-mode . ("satysfi-language-server")))
  (add-to-list 'eglot-server-programs '(satysfi-ts-mode . ("satysfi-language-server")))
  (add-hook 'satysfi-mode-hook #'eglot-ensure)
  (add-hook 'satysfi-ts-mode-hook #'eglot-ensure))

TypeScript

Source

(defun deno-project-p ()
  "Predicate for determining if the open project is a Deno one."
  (let ((p-root (cdr (project-current))))
    (or (file-exists-p (concat p-root "deno.json"))
        (file-exists-p (concat p-root "deno.jsonc")))))

(defun node-project-p ()
  "Predicate for determining if the open project is a Node one."
  (let ((p-root (cdr (project-current))))
    (file-exists-p (concat p-root "package.json"))))

(defun es-server-program (_)
  "Decide which server to use for ECMA Script based on project characteristics."
  (cond ((deno-project-p) '("deno" "lsp" :initializationOptions (:enable t :lint t)))
        ((node-project-p) '("typescript-language-server" "--stdio"))
        (t nil)))

(with-eval-after-load 'eglot
  (add-to-list 'eglot-server-programs '((js-mode web-mode) . es-server-program))
  (add-hook 'web-mode-hook #'eglot-ensure)
  (add-hook 'js-mode-hook #'eglot-ensure))

Treesitter

(setopt treesit-language-source-alist
      '((astro "https://github.com/virchau13/tree-sitter-astro")
        (css "https://github.com/tree-sitter/tree-sitter-css")
        (satysfi "https://github.com/monaqa/tree-sitter-satysfi")
        (tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src")))

Programming Languages

Arduino Style C

(eval-when-compile
  (el-clone :url "https://repo.or.cz/arduino-mode.git"
            :repo "arduino-mode"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/arduino-mode"))
  (autoload-if-found '(arduino-mode) "arduino-mode")
  (add-to-list 'auto-mode-alist '("\\.ino$" . arduino-mode)))

astro

(eval-when-compile
  (el-clone :repo "Sorixelle/astro-ts-mode"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/astro-ts-mode"))
  (autoload-if-found '(astro-ts-mode) "astro-ts-mode")
  (add-to-list 'auto-mode-alist '("\\.astro$" . astro-ts-mode)))

Common Lisp

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

(eval-when-compile
  (el-clone :repo "joaotavora/sly"
            :load-paths `(,(locate-user-emacs-file "el-clone/sly/lib")
                          ,(locate-user-emacs-file "el-clone/sly/contrib")
                          ,(locate-user-emacs-file "el-clone/sly/slynk"))))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/sly"))
  (autoload-if-found '(sly) "sly")
  (setq inferior-lisp-program "/usr/bin/sbcl")
  (defun start-sly ()
    "Make Sly startup behavior similar to Slime"
    (interactive)
    (split-window-right)
    (sly)))

Flutter

dart

(eval-when-compile
  (el-clone :repo "bradyt/dart-mode"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/dart-mode"))
  (autoload-if-found '(dart-mode) "dart-mode")
  (add-to-list 'auto-mode-alist '("\\.dart$" . dart-mode))
  (with-eval-after-load 'dart
    (add-hook 'dart-mode-hook #'flycheck-mode)
    (setq dart-enable-analysis-server t)))

flutter

(eval-when-compile
  (el-clone :repo "amake/flutter.el"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/flutter"))
  (autoload-if-found '(flutter-run-or-hot-reload) "flutter")
  (with-eval-after-load 'flutter
    (add-hook 'dart-mode (lambda () (add-hook 'after-save-hook #'flutter-run-or-hot-reload nil t)))))

Dockerfile

(eval-when-compile
  (el-clone :repo "spotify/dockerfile-mode"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/dockerfile-mode"))
  (autoload-if-found '(dockerfile-mode) "dockerfile-mode")
  (add-to-list 'auto-mode-alist '("\\Dockerfile$" . dockerfile-mode))
  (with-eval-after-load 'dockerfile-mode
    (add-hook 'dockerfile-mode-hook #'flycheck-mode)))

F#

(eval-when-compile
  (el-clone :repo "fsharp/emacs-fsharp-mode"))

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

Hylang

(eval-when-compile
  (el-clone :repo "hylang/hy-mode"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/hy-mode"))
  (autoload-if-found '(hy-mode) "hy")
  (add-hook 'hy-mode (lambda () (setq hy-shell-interpreter-args
                            (concat "--repl-output-fn=hy.contrib.hy-repr.hy-repr "
                                    hy-shell-interpreter-args)))))

mcfunction

(eval-when-compile
  (el-clone :repo "rasensuihei/mcf"))
(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/mcf"))
  (autoload-if-found '(mcf-mode) "mcf")
  (add-to-list 'auto-mode-alist '("\\.mcfunction$" . mcf-mode)))

Nix

(eval-when-compile
  (el-clone :repo "NixOS/nix-mode"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/nix-mode"))
  (require 'nix-mode)
  (autoload-if-found '(nix-mode) "nix-mode")
  (autoload-if-found '(nix-drv-mode) "nix-drv-mode")
  (autoload-if-found '(company-nix) "nix-company")
  (add-to-list 'auto-mode-alist '("\\.nix$" . nix-mode)))

pwsh

(eval-when-compile
  (el-clone :repo "jschaf/powershell.el"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/powershell"))
  (autoload-if-found '(powershell powershell-mode) "powershell")
  (add-to-list 'auto-mode-alist '("\\.ps1$" . powershell-mode)))

Rust

(eval-when-compile
  (el-clone :repo "rust-lang/rust-mode"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/rust-mode"))
  (autoload-if-found '(rust-mode) "rust-mode")
  (add-to-list 'auto-mode-alist '("\\.rs$" . rust-mode))
  (require 'rust-mode)
  (with-eval-after-load 'rust-mode
    (setq rust-format-on-save nil)
    (add-to-list 'exec-path (expand-file-name "~/.cargo/bin"))
    (setq lsp-rust-server 'rust-analyzer)))

SATySFi

(eval-when-compile
  (el-clone :repo "hanazuki/satysfi.el")
  (el-clone :repo "Kyure-A/satysfi-ts-mode"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/satysfi"))
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/satysfi-ts-mode"))
  (require 'satysfi-mode)
  (autoload-if-found '(satysfi-mode) "satysfi")
  (autoload-if-found '(satysfi-ts-mode) "satysfi-ts-mode")
  (add-to-list 'auto-mode-alist '("\\.saty$" . satysfi-ts-mode))
  (add-to-list 'auto-mode-alist '("\\.satyh$" . satysfi-ts-mode))
  (setq satysfi-command "satysfi"))

Svelte

(eval-when-compile
  (el-clone :repo "leafOfTree/svelte-mode"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/svelte-mode"))
  (autoload-if-found '(svelte-mode) "svelte-mode")
  (add-to-list 'auto-mode-alist '("\\.svelte$" . svelte-mode)))

Markup Languages

CSV

(eval-when-compile
  (el-clone :repo "emacsmirror/csv-mode"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/csv-mode"))
  (autoload-if-found '(csv-mode) "csv-mode")
  (add-to-list 'auto-mode-alist '("\\.csv$" . csv-mode)))

Markdown

(eval-when-compile
  (el-clone :repo "jrblevin/markdown-mode"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/markdown-mode"))
  (require 'markdown-mode)
  (autoload-if-found '(markdown-mode gfm-mode) "markdown-mode")
  (add-to-list 'auto-mode-alist '("\\.md$" . gfm-mode))
  (add-to-list 'auto-mode-alist '("\\.markdown$" . gfm-mode))
  (with-eval-after-load 'markdown
    (setq markdown-command "github-markup")
    (setq markdown-command-needs-filename t)))

Mermaid

(eval-when-compile
  (el-clone :repo "abrochard/mermaid-mode"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/mermaid-mode"))
  (require 'mermaid-mode)
  (add-to-list 'auto-mode-alist '("\\.mmd$" . mermaid-mode))
  (add-to-list 'auto-mode-alist '("\\.mermaid$" . mermaid-mode)))

Org-mode

org-mode

(with-eval-after-load 'org
  (setq org-directory "~/document/org")
  (setq org-latex-pdf-process '("lualatex --draftmode %f"
                              "lualatex %f"))
  (setq org-startup-truncated nil)
  (setq org-enforce-todo-dependencies t)
  (setq org-support-shift-select t)
  (setq org-latex-pdf-process '("lualatex --draftmode %f"
                             "lualatex %f"))
  (setq org-latex-default-class "ltjsarticle"))

org-modern

(eval-when-compile
  (el-clone :repo "minad/org-modern"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/org-modern"))
  (autoload-if-found '(org-modern-mode) "org-modern")
  (add-hook 'org-mode-hook #'org-modern-mode)
  (add-hook 'org-agenda-finalize-hook #'org-modern-agenda))

org-roam

(eval-when-compile
  (el-clone :repo "org-roam/org-roam"
            :load-paths `(,(locate-user-emacs-file "el-clone/org-roam/extensions")))
  (el-clone :repo "org-roam/org-roam-ui"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/org-roam"))
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/org-roam/extensions"))
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/org-roam-ui"))
  (autoload-if-found '(org-roam-mode) "org-roam")
  (autoload-if-found '(org-roam-ui-mode) "org-roam-ui")
  (with-eval-after-load 'org
    (require 'org-roam))
  (with-eval-after-load 'org-roam-mode
    (add-hook 'org-roam-mode-hook #'org-roam-ui-mode)))

org-tempo

(with-delayed-execution
  (with-eval-after-load 'org
    (require 'org-tempo)))

org-ai

(eval-when-compile
  (el-clone :repo "rksm/org-ai"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/org-ai"))
  (autoload-if-found '(org-ai-mode) "org-ai")
  (with-eval-after-load 'org
    (add-hook 'org-mode-hook #'org-ai-mode)))

VHDL

(with-delayed-execution
  (autoload-if-found '(vhdl-mode) "vhdl")
  (add-to-list 'auto-mode-alist '("\\.hdl$" . vhdl-mode)))

Web-mode

(eval-when-compile
  (el-clone :repo "fxbois/web-mode"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/web-mode"))
  (autoload-if-found '(web-mode) "web-mode")
  (require 'web-mode)
  (add-to-list 'auto-mode-alist '("\\.[agj]sp$" . 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 '("\\.html$" . web-mode))
  (add-to-list 'auto-mode-alist '("\\.liquid$" . web-mode))
  (add-to-list 'auto-mode-alist '("\\.mustache" . 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 '("\\.js$" . web-mode))
  (add-to-list 'auto-mode-alist '("\\.json$" . web-mode))
  (add-to-list 'auto-mode-alist '("\\.mjs$" . web-mode))
  (add-to-list 'auto-mode-alist '("\\.cjs$" . web-mode))
  (add-to-list 'auto-mode-alist '("\\.ts$" . web-mode))
  (add-to-list 'auto-mode-alist '("\\.tsx$" . web-mode))
  (add-to-list 'auto-mode-alist '("\\.mts$" . web-mode))
  (add-to-list 'auto-mode-alist '("\\.cts$" . web-mode))
  (add-hook 'web-mode-hook #'flycheck-mode)
  (with-eval-after-load 'web-mode
    (setq web-mode-markup-indent-offset 2)
    (setq web-mode-enable-auto-pairing t)
    (setq web-mode-enable-auto-closing t)
    (setq web-mode-tag-auto-close-style 2)
    (setq web-mode-enable-auto-quoting nil)
    (setq web-mode-enable-current-column-highlight t)
    (setq web-mode-enable-current-element-highlight t)
    (setq web-mode-comment-style 2)
    (setq web-mode-enable-auto-indentation nil)))

YAML

(eval-when-compile
  (el-clone :repo "yoshiki/yaml-mode"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/yaml-mode"))
  (autoload-if-found '(yaml-mode) "yaml-mode")
  (add-to-list 'auto-mode-alist '("\\.yml$" . yaml-mode))
  (add-to-list 'auto-mode-alist '("\\.yaml$" . yaml-mode))
  (with-eval-after-load 'yaml-mode
    (add-hook 'yaml-mode-hook #'flycheck-mode)))

shell-script

(eval-when-compile
  (el-clone :repo "damon-kwok/modern-sh")
  (el-clone :repo "federicotdn/flymake-shellcheck"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/modern-sh"))
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/flymake-shellcheck"))
  (autoload-if-found '(sh-mode) "sh-mode")
  (add-to-list 'auto-mode-alist '("\\.sh$" . sh-mode))
  (add-to-list 'auto-mode-alist '("\\.zsh$" . sh-mode))
  (autoload-if-found '(flymake-shell-check-load) "flymake-shell-check")
  (with-eval-after-load 'sh-mode
    (add-hook 'sh-mode-hook 'flymake-shellcheck-load)
    (add-hook 'sh-mode-hook #'modern-sh-mode)))

Shell

Eat

(eval-when-compile
  (el-clone :url "https://codeberg.org/akib/emacs-eat.git"
            :repo "emacs-eat"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/emacs-eat"))
  (autoload-if-found '(eat) "eat")
  (defun toggle-eat ()
    (interactive)
    (let ((kill-buffer-query-functions nil))
      (if (get-buffer "*eat*")
        (progn (kill-buffer "*eat*")
               (eat))
      (eat)))))

exec-path-from-shell

(eval-when-compile
  (el-clone :repo "purcell/exec-path-from-shell"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/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-check-startup-files nil)
    (setq exec-path-from-shell-arguments nil)
    (setq exec-path-from-shell-variables '("ASDF_CONFIG_FILE" "ASDF_DATA_DIR" "ASDF_DEFAULT_TOOL_VERSIONS_FILENAME" "ASDF_DIR"
                                        "GPG_AGENT_INFO" "GPG_KEY_ID" "PATH" "SHELL" "TEXMFHOME" "WSL_DISTRO_NAME" "http_proxy"))))

mistty

(eval-when-compile
  (el-clone :repo "szermatt/mistty"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/mistty"))
  (autoload-if-found '(mistty) "mistty"))

Extensions

ace-window

(eval-when-compile
  (el-clone :repo "abo-abo/ace-window"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/ace-window")))

aggressive-indent

(eval-when-compile
  (el-clone :repo "Malabarba/aggressive-indent-mode"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/aggressive-indent-mode"))
  (autoload-if-found '(aggressive-indent-mode global-aggressive-indent-mode) "aggressive-indent-mode")
  (require 'aggressive-indent)
  (global-aggressive-indent-mode t))

cape

(eval-when-compile
  (el-clone :repo "minad/cape"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/cape"))
  (autoload-if-found '(cape-file cape-dabbrev cape-elisp-block cape-history cape-keyword) "cape")
  (with-eval-after-load 'minibuffer
    (add-to-list 'completion-at-point-functions #'cape-dabbrev)
    (add-to-list 'completion-at-point-functions #'cape-file)
    (add-to-list 'completion-at-point-functions #'cape-elisp-block)
    (add-to-list 'completion-at-point-functions #'cape-history)))

Centaur-tabs

(eval-when-compile
  (el-clone :repo "ema2159/centaur-tabs"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/centaur-tabs"))
  ;; (autoload-if-found '(centaur-tabs-mode) "centaur-tabs")
  (require 'centaur-tabs)
  (centaur-tabs-mode)
  (with-eval-after-load 'centaur-tabs
    (centaur-tabs-group-by-projectile-project)
    (centaur-tabs-headline-match)
    (centaur-tabs-enable-buffer-reordering)
    (centaur-tabs-change-fonts "arial" 90)
    (setq centaur-tabs-height 30)
    (setq centaur-tabs-hide-tabs-hooks nil)
    (setq centaur-tabs-set-icons t)
    (setq centaur-tabs-set-bar 'under)
    (setq x-underline-at-descent-line t)
    (setq centaur-tabs-style "box")
    (setq centaur-tabs-set-modified-marker t)
    (setq centaur-tabs-show-navigation-buttons t)
    (setq centaur-tabs-adjust-buffer-order t)
    (setq centaur-tabs-cycle-scope 'groups)))

corfu

corfu

(eval-when-compile
  (el-clone :repo "minad/corfu"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/corfu"))
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/corfu/extensions"))
  (autoload-if-found '(global-corfu-mode) "corfu")
  (global-corfu-mode)
  (with-eval-after-load 'corfu
    (setq corfu-auto t)
    (setq corfu-auto-delay 0)
    (setq corfu-cycle t)
    (setq corfu-on-exact-match nil))
  (with-eval-after-load 'indent
    (setq tab-always-indent 'complete)))

Dashboard

dashboard-recover-layout-p

(defvar dashboard-recover-layout-p nil
  "Whether recovers the layout.")

dashboard-goto-recent-files

Source

(defun dashboard-goto-recent-files ()
  "Go to recent files."
  (interactive)
  (let ((func (local-key-binding "r")))
    (and func (funcall func))))

open-dashboard

Source

(defun open-dashboard ()
  "Open the *dashboard* buffer and jump to the first widget."
  (interactive)
  (setq dashboard-recover-layout-p t)
  ;; Display dashboard in maximized window
  (delete-other-windows)
  ;; Refresh dashboard buffer
  (dashboard-open)
  ;; Jump to the first section
  (dashboard-goto-recent-files))

quit-dashboard

(defun quit-dashboard ()
  "Quit dashboard window."
  (interactive)
  (quit-window t)
  (and dashboard-recover-layout-p
       (and (bound-and-true-p winner-mode) (winner-undo))
       (setq dashboard-recover-layout-p nil)))

projectile

(eval-when-compile
  (el-clone :repo "bbatsov/projectile"))

(with-delayed-execution-priority-high
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/projectile"))
  (autoload-if-found '(projectile-mode) "projectile")
  (projectile-mode t))

dashboard

(eval-when-compile
  (el-clone :repo "emacs-dashboard/emacs-dashboard"))

(with-delayed-execution-priority-high
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/emacs-dashboard"))
  (autoload-if-found '(dashboard-mode dashboard-open) "dashboard")
  (setq dashboard-items '((bookmarks . 5)
                          (recents  . 5)
                          (projects . 5)))
  (setq initial-buffer-choice (lambda () (get-buffer "*dashboard*")))
  (setq dashboard-center-content t)
  (setq dashboard-set-heading-icons t)
  (setq dashboard-set-file-icons t)
  (setq dashboard-banner-logo-title "Kyure_A's Emacs")
  (setq dashboard-footer-messages '("ใ€ŒไปŠๆ—ฅใ‚‚ไธ€ๆ—ฅใŒใ‚“ใฐใ‚‹ใžใ„๏ผใ€ - ๆถผ้ขจ้’่‘‰"
                                    "ใ€Œใชใ‚“ใ ใ‹ใƒ›ใƒณใƒˆใซๅ…ฅ็คพใ—ใŸๆฐ—ๅˆ†ใงใ™๏ผใ€ - ๆถผ้ขจ้’่‘‰"
                                    "ใ€Œใใ—ใฆใใฎใƒใ‚ฐใฎ็จ‹ๅบฆใงๅฎŸๅŠ›ใ‚‚็Ÿฅใ‚Œใ‚‹ใ‚ใ‘ใงใ™ใ€- ้˜ฟๆณขๆ นใ†ใฟใ“"
                                    "ใ€Œใˆใƒผใƒผ๏ผใชใ‚‹ใฃใกใฎๆ‹…ๅฝ“็ฎ‡ๆ‰€ใŒใƒใ‚ฐใ ใ‚‰ใ‘๏ผ๏ผŸใ€ - ๆกœใญใญ"
                                    "ใ€ŒC++ ใ‚’ๅฎŒๅ…จใซ็†่งฃใ—ใฆใ—ใพใฃใŸใ‹ใ‚‚ใ—ใ‚Œใชใ„ใ€ - ๆกœใญใญ"
                                    "ใ€Œใ“ใ‚Œใงใ‚‚ใƒ‡ใƒใƒƒใ‚ฐใฏใƒ—ใƒญ็ดšใ ใ— ไปŠใฏใƒ—ใƒญใ‚ฐใƒฉใƒ ใฎ็Ÿฅ่ญ˜ใ ใฃใฆใ‚ใ‚‹ใ‚“ใ ใ‹ใ‚‰ใพใ‹ใ›ใฆใ‚ˆใญ๏ผใ€ - ๆกœใญใญ"))
  (setq dashboard-startup-banner (if (or (eq window-system 'x) (eq window-system 'ns) (eq window-system 'w32)) "~/.emacs.d/assets/banner.png" "~/.emacs.d/assets/banner.txt"))
  (open-dashboard)
  (with-eval-after-load 'dashboard
    (dashboard-setup-startup-hook)
    (define-key dashboard-mode-map (kbd "<f3>") #'quit-dashboard)
    (define-key dashboard-mode-map (kbd "p") #'previous-line)
    (define-key dashboard-mode-map (kbd "n") #'next-line)
    (define-key dashboard-mode-map (kbd "b") #'backward-char)
    (define-key dashboard-mode-map (kbd "f") #'forward-char)))

Daredevil SKK

(eval-when-compile
  (el-clone :repo "skk-dev/ddskk"))

(with-delayed-execution-priority-high
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/ddskk"))
  (autoload-if-found '(skk-mode) "skk-autoloads"))

dirvish/dired

dirvish

(eval-when-compile
  (el-clone :repo "alexluigit/dirvish"
            :load-paths `(,(locate-user-emacs-file "el-clone/dirvish/extensions"))))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/dirvish"))
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/dirvish/extensions"))

  (autoload-if-found '(dirvish-override-dired-mode) "dirvish")
  (dirvish-override-dired-mode)
  ;; (autoload-if-found '(dirvish-peek-mode) "dirvish-peek")
  ;; (dirvish-peek-mode)
  ;; (autoload-if-found '(dirvish-side-follow-mode) "dirvish-side")
  ;; (dirvish-side-follow-mode)

  (with-eval-after-load 'dirvish
    (with-eval-after-load 'nerd-icons
      (setq dirvish-attributes '(vc-state subtree-state nerd-icons collapse git-msg file-time file-size))
      (setq dirvish-subtree-state-style 'nerd)
      (setq dirvish-path-separators (list
                                     (format "  %s " (nerd-icons-codicon "nf-cod-home"))
                                     (format "  %s " (nerd-icons-codicon "nf-cod-root_folder"))
                                     (format " %s " (nerd-icons-faicon "nf-fa-angle_right")))))
    (setq dirvish-preview-dispatchers (cl-substitute 'pdf-preface 'pdf dirvish-preview-dispatchers))))

dired

(with-eval-after-load 'dired
  (setq dired-recursive-copies 'always)
  (put 'dired-find-alternate-file 'disabled nil)
  (define-key dired-mode-map (kbd "RET") #'dired-open-in-accordance-with-situation)
  (define-key dired-mode-map (kbd "<left>") #'dired-up-directory)
  (define-key dired-mode-map (kbd "<right>") #'dired-open-in-accordance-with-situation))

dired-async

(eval-when-compile
  (el-clone :repo "jwiegley/emacs-async"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/emacs-async"))
  (autoload-if-found '(dired-async-mode) "dired-async")
  (dired-async-mode t))

dired-k

(eval-when-compile
  (el-clone :repo "emacsorphanage/dired-k"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/dired-k"))
  (autoload-if-found '(dired-k) "dired-k")
  (add-hook 'dired-initial-position-hook #'dired-k))

dired-open-in-accordance-with-situation

Source

(defun dired-open-in-accordance-with-situation ()
  (interactive)
  (let ((file (dired-get-filename)))
    (if (file-directory-p file)
        (dired-find-alternate-file)
      (dired-find-file))))

dired-preview

(eval-when-compile
  (el-clone :repo "protesilaos/dired-preview"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/dired-preview"))
  (autoload-if-found '(dired-preview-global-mode) "dired-preview" nil t)
  ;; (dired-preview-global-mode t)
  )

dired-toggle-sudo

(eval-when-compile
  (el-clone :repo "renard/dired-toggle-sudo"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/dired-toggle-sudo"))
  (require 'dired-toggle-sudo))

editorconfig

(eval-when-compile
  (el-clone :repo "editorconfig/editorconfig-emacs"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/editorconfig-emacs"))
  (autoload-if-found '(editorconfig-mode) "editorconfig")
  (editorconfig-mode t))

embark

(eval-when-compile
  (el-clone :repo "oantolin/embark"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/embark"))

  (autoload-if-found '(embark-act embark-dwim embark-prefix-help-command) "embark")
  (global-set-key (kbd "C-.") #'embark-act)
  ;; (global-set-key (kbd "C-h B") #'embark-prefix-help-command)
  )

eval-in-repl

(eval-when-compile
  (el-clone :repo "kaz-yos/eval-in-repl"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/eval-in-repl")))

Flycheck

(eval-when-compile
  (el-clone :repo "Kyure-A/flycheck"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/flycheck"))
  (autoload-if-found '(flycheck-mode flycheck-define-checker) "flycheck")
  (add-hook 'prog-mode-hook #'flycheck-mode)
  (with-eval-after-load 'flycheck
    (setq flycheck-idle-change-delay 0)))

gcmh

(eval-when-compile
  (el-clone :repo "emacsmirror/gcmh"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/gcmh"))
  (autoload-if-found '(gcmh-mode) "gcmh")
  (gcmh-mode)
  (with-eval-after-load 'gcmh
    (setq gcmh-verbose t)))

hydra

(eval-when-compile
  (el-clone :repo "abo-abo/hydra"))

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

imenu-list

(eval-when-compile
  (el-clone :repo "bmag/imenu-list"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/imenu-list")))

ivy/counsel

install

;; ivy, counsel and swiper are managed as monorepo.
(eval-when-compile
  (el-clone :repo "abo-abo/swiper"))

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

counsel

(with-delayed-execution-priority-high
  (autoload-if-found '(counsel-mode) "counsel")
  (counsel-mode t)
  (with-eval-after-load 'counsel
    (define-key counsel-mode-map [remap find-file] nil)
    (setq counsel-find-file-ignore-regexp (regexp-opt '("./" "../")))
    (setq read-file-name-function #'disable-counsel-find-file)))

(defun disable-counsel-find-file (&rest args)
  "Disable `counsel-find-file' and use the original `find-file' with ARGS."
  (let ((completing-read-function #'completing-read-default)
        (completion-in-region-function #'completion--in-region))
    (apply #'read-file-name-default args)))

(eval-when-compile
  (el-clone :repo "ericdanan/counsel-projectile"))

(with-delayed-execution-priority-high
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/counsel-projectile"))
  (autoload-if-found '(counsel-projectile-mode) "counsel-projectile")
  (with-eval-after-load 'counsel
    (add-hook 'counsel-mode-hook #'counsel-projectile-mode)))

ivy

(with-delayed-execution-priority-high
  (autoload-if-found '(ivy-mode ivy-read ivy-completion-read) "ivy")
  (with-eval-after-load 'ivy
    (setq ivy-use-virtual-buffers t)
    (setq ivy-wrap t)
    (setq ivy-extra-directories t)
    (setq enable-recursive-minibuffers t)))

(eval-when-compile
  (el-clone :repo "Yevgnen/ivy-rich"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/ivy-rich"))
  (autoload-if-found '(ivy-rich-mode) "ivy-rich")
  (with-eval-after-load 'ivy
    (ivy-rich-mode t)))

(eval-when-compile
  (el-clone :repo "tumashu/ivy-posframe"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/ivy-posframe"))
  (autoload-if-found '(ivy-posframe-mode) "ivy-posframe")
  (with-eval-after-load 'ivy
    (ivy-posframe-mode t)
    (setq ivy-posframe-display-functions-alist '((t . ivy-posframe-display-at-frame-center)))))

swiper

(with-delayed-execution-priority-high
  (autoload-if-found '(swiper) "swiper"))

minimap

(eval-when-compile
  (el-clone :repo "dengste/minimap"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/minimap"))
  (autoload-if-found '(minimap-mode) "minimap")
  (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))))

multiple-cursors

https://dev.classmethod.jp/articles/emacs-multiple-cursors/

(eval-when-compile
  (el-clone :repo "magnars/multiple-cursors.el"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/multiple-cursors"))
  (autoload-if-found '(mc/edit-lines mc/mark-next-like-this mc/mark-previous-like-this mc/mark-all-like-this) "multiple-cursors")
  (global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines)
  (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))

neotree

(eval-when-compile
  (el-clone :repo "jaypei/emacs-neotree"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/emacs-neotree"))
  ;; (require 'neotree)
  ;; (autoload-if-found '(neotree-hide neotree-dir neotree-make-executor neo-open-file neo-open-dir) "neotree")
  (with-eval-after-load 'neotree
    (setq neo-smart-open t)
    (setq eo-create-file-auto-open t)
    (setq neo-theme (if (display-graphic-p) 'icons 'arrow))))

nu-fun

(eval-when-compile
  (el-clone :repo "ayanyan/nihongo-util"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/nihongo-util"))
  (require 'nu-fun)
  (setq nu-my-toten "๏ผŒ")
  (setq nu-my-kuten "๏ผŽ"))

orderless

(eval-when-compile
  (el-clone :repo "oantolin/orderless"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/orderless"))
  (autoload-if-found '(orderless orderless-try-completion orderless-all-completions) "orderless")

  (with-eval-after-load 'minibuffer
    (setq completion-styles '(orderless basic))
    (setq completion-category-overrides '((file (styles basic partial-completion))))
    (add-to-list 'completion-styles-alist
           '(orderless
             orderless-try-completion orderless-all-completions
             "Completion of multiple components, in any order."))))

paredit

(eval-when-compile
  (el-clone :repo "emacsmirror/paredit"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/paredit")))

puni

(eval-when-compile
  (el-clone :repo "AmaiKinono/puni"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/puni"))
  (autoload-if-found '(puni-global-mode) "puni")
  (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 'lisp-interaction-mode
    (add-hook 'lisp-interacton-mode-hook #'puni-disable-puni-mode)))

popwin

(eval-when-compile
  (el-clone :repo "emacsorphanage/popwin"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/popwin"))
  (autoload-if-found '(popwin-mode) "popwin")
  (popwin-mode t)
  (with-eval-after-load 'popwin
    (setq display-buffer-function 'popwin:display-buffer)
    (setq popwin:special-display-config t)
    (setq popwin:popup-window-position 'bottom)))

posframe

(eval-when-compile
  (el-clone :repo "tumashu/posframe"))

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

skewer-mode

(eval-when-compile
  (el-clone :repo "skeeto/skewer-mode")
  (el-clone :repo "mooz/js2-mode"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/skewer"))
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/js2")))

smartparens

(eval-when-compile
  (el-clone :repo "Fuco1/smartparens"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/smartparens"))
  (autoload-if-found '(smartparens-global-mode) "smartparens")
  (smartparens-global-mode)
  (show-smartparens-global-mode t))

undo-tree

(eval-when-compile
  (el-clone :repo "apchamberlain/undo-tree.el"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/undo-tree"))
  (autoload-if-found '(undo-tree-undo undo-tree-redo) "undo-tree")
  (with-eval-after-load 'undo-tree
    (global-undo-tree-mode)
    (setq undo-tree-auto-save-history t)
    (setq undo-tree-history-directory-alist  '(("." . "~/.emacs.d/.tmp")))))

visual-regexp

(eval-when-compile
  (el-clone :repo "benma/visual-regexp.el"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/visual-regexp"))
  (autoload-if-found '(vr/replace) "visual-regexp"))

which-key

(eval-when-compile
  (el-clone :repo "justbur/emacs-which-key"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/emacs-which-key"))
  (autoload-if-found '(which-key-mode) "which-key")
  (which-key-mode))

which-key-posframe

(eval-when-compile
  (el-clone :repo "yanghaoxie/which-key-posframe"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/which-key-posframe"))
  (autoload-if-found '(which-key-posframe-mode) "which-key-posframe")
  (with-eval-after-load 'which-key
    (which-key-posframe-mode)))

yasnippet

(eval-when-compile
  (el-clone :repo "joaotavora/yasnippet")
  (el-clone :repo "mkcms/ivy-yasnippet"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/yasnippet"))
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/ivy-yasnippet"))
  (autoload-if-found '(yas-global-mode yas-minor-mode) "yasnippet")
  (autoload-if-found '(ivy-yasnippet) "ivy-yasnippet")
  (yas-global-mode t)
  (with-eval-after-load 'yasnippet
    (setq yas-snippet-dirs '("~/.emacs.d/snippets"))))

yasnippet-org

(eval-when-compile
  (el-clone :repo "takeokunn/yasnippet-org"))

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

yatemplate

(eval-when-compile
  (el-clone :repo "mineo/yatemplate"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/yatemplate"))
  (autoload-if-found '(yatemplate-fill-alist) "yatemplate")
  (auto-insert-mode t)
  (yatemplate-fill-alist))

Utilities

Docker

(eval-when-compile
  (el-clone :repo "Silex/docker.el"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/docker"))
  (require 'docker))

Elcord

Allows you to integrate Rich Presence from Discord.

(eval-when-compile
  (el-clone :repo "Mstrodl/elcord"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/elcord")))  

Jobcan

(eval-when-compile
  (el-clone :repo "Kyure-A/jobcan.el"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/jobcan"))
  (require 'jobcan))

Magit

(eval-when-compile
  (el-clone :repo "magit/magit"
            :load-paths `(,(locate-user-emacs-file "el-clone/magit/lisp")))
  (el-clone :repo "magit/transient"
            :load-paths `(,(locate-user-emacs-file "el-clone/transient/lisp")))
  (el-clone :repo "magit/with-editor"
            :load-paths `(,(locate-user-emacs-file "el-clone/with-editor/lisp"))))

(with-delayed-execution-priority-high
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/magit/lisp"))
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/transient/lisp"))
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/with-editor/lisp"))
  (autoload-if-found '(global-git-commit-mode) "git-commit")
  (autoload-if-found '(magit-status magit-blame) "magit")
  (global-git-commit-mode)
  (with-eval-after-load 'magit
    (setq magit-repository-directories '(("~/ghq/" . 3)))
    (add-hook 'magit-status-mode-hook #'toggle-centaur-tabs-local-mode)))

Node.js

nodejs-repl

(eval-when-compile
  (el-clone :repo "abicky/nodejs-repl.el"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/nodejs-repl")))

nvm

(eval-when-compile
  (el-clone :repo "rejeep/nvm.el"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/nvm")))

oj

(eval-when-compile
  (el-clone :repo "conao3/oj.el"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/oj"))
  (with-eval-after-load 'oj
    (setq oj-shell-program "zsh")
    (setq oj-open-home-dir "~/oj-files/")
    (setq oj-default-online-judge 'atcoder)
    (setq oj-compiler-c "gcc")
    (setq oj-compiler-python "cpython")))

Prettier

(eval-when-compile
  (el-clone :repo "jscheid/prettier.el"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/prettier"))
  (add-hook 'after-init-hook #'global-prettier-mode))

quickrun

(eval-when-compile
  (el-clone :repo "syohex/emacs-quickrun"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/emacs-quickrun"))
  (autoload-if-found '(quickrun) "emacs-quickrun")
  (push '("*quickrun*") popwin:special-display-config)
  (defun quickrun-sc (start end)
    (interactive "r")
    (if mark-active
        (quickrun :start start :end end)
      (quickrun))))

swagg

(eval-when-compile
  (el-clone :repo "isamert/swagg.el"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/swagg")))

Visual

all-the-icons

all-the-icons

(eval-when-compile
  (el-clone :repo "domtronn/all-the-icons.el"))

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

all-the-icons-dired

(eval-when-compile
  (el-clone :repo "wyuenho/all-the-icons-dired"))

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

all-the-icons-ivy-rich

(eval-when-compile
  (el-clone :repo "seagle0128/all-the-icons-ivy-rich"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/all-the-icons-ivy-rich"))
  (autoload-if-found '(all-the-icons-ivy-rich-mode) "all-the-icons-ivy-rich")
  (all-the-icons-ivy-rich-mode t))

beacon

(eval-when-compile
  (el-clone :repo "Malabarba/beacon"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/beacon"))
  (autoload-if-found '(beacon-mode) "beacon")
  (beacon-mode t)
  (with-eval-after-load 'beacon
    (setq beacon-color "red")))

display-line-numbers

(with-delayed-execution
  (custom-set-variables '(display-line-numbers-width-start t))
  (defalias 'linum-mode 'display-line-numbers-mode))

doom-modeline

(eval-when-compile
  (el-clone :repo "seagle0128/doom-modeline"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/doom-modeline"))
  (autoload-if-found '(doom-modeline-mode) "doom-modeline")
  ;; (doom-modeline-mode t)
  (with-eval-after-load 'doom-modeline
    (setq doom-modeline-icon t)))

emojify

(eval-when-compile
  (el-clone :repo "iqbalansari/emacs-emojify"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/emojify"))
  (autoload-if-found '(global-emojify-mode) "emojify")
  (add-hook 'after-init-hook #'global-emojify-mode))

hide-modeline

(eval-when-compile
  (el-clone :repo "hlissner/emacs-hide-mode-line"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/emacs-hide-mode-line")))

lambda-line

(eval-when-compile
  (el-clone :repo "Lambda-Emacs/lambda-line"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/lambda-line"))
  (autoload-if-found '(lambda-line-mode) "lambda-line" nil t)
  (lambda-line-mode)
  (with-eval-after-load 'lambda-line-mode
    (lambda-line-icon-time t) ;; requires ClockFace font (see below)
    (lambda-line-clockface-update-fontset "ClockFaceRect") ;; set clock icon
    (lambda-line-position 'top) ;; Set position of status-line 
    (lambda-line-abbrev t) ;; abbreviate major modes
    (lambda-line-hspace "  ")  ;; add some cushion
    (lambda-line-prefix t) ;; use a prefix symbol
    (lambda-line-prefix-padding nil) ;; no extra space for prefix 
    (lambda-line-status-invert nil)  ;; no invert colors
    (lambda-line-gui-ro-symbol  " โจ‚") ;; symbols
    (lambda-line-gui-mod-symbol " โฌค") 
    (lambda-line-gui-rw-symbol  " โ—ฏ") 
    (lambda-line-space-top +.30)  ;; padding on top and bottom of line
    (lambda-line-space-bottom -.30)
    (lambda-line-symbol-position 0.1) ;; adjust the vertical placement of symbol
    ))

mini-echo

(eval-when-compile
  (el-clone :repo "liuyinz/mini-echo.el"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/mini-echo"))
  (autoload-if-found '(mini-echo-mode) "mini-echo" nil t)
  (mini-echo-mode))

mini-modeline

(eval-when-compile
  (el-clone :repo "kiennq/emacs-mini-modeline"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/emacs-mini-modeline"))
  (autoload-if-found '(mini-modeline-mode) "mini-modeline" nil t))

monokai

(eval-when-compile
  (el-clone :repo "Kyure_A/monokai-emacs"))

(with-delayed-execution-priority-high
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/monokai-emacs"))
  (require 'monokai-theme)
   (with-eval-after-load 'monokai-theme
     (load-theme 'monokai t)))
(eval-when-compile
  (el-clone :repo "Kyure-A/themes"
            :load-paths `(,(locate-user-emacs-file "el-clone/themes/extensions"))))

(with-delayed-execution-priority-high
  (message "Install doom-themes...")
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/themes"))
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/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-monokai-textmate t))

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

nano-modeline

(eval-when-compile
  (el-clone :repo "rougier/nano-modeline"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/nano-modeline"))
  (autoload-if-found '(nano-modeline-text-mode) "nano-modeline")
  ;; (nano-modeline-text-mode t)
  )

nerd-icons

nerd-icons

(eval-when-compile
  (el-clone :repo "rainstormstudio/nerd-icons.el"))

(with-delayed-execution-priority-high
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/nerd-icons"))
  (require 'nerd-icons))

nerd-icons-corfu

(eval-when-compile
  (el-clone :repo "LuigiPiucco/nerd-icons-corfu"))

(with-delayed-execution-priority-high
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/nerd-icons-corfu"))
  (autoload-if-found '(nerd-icons-corfu-formatter) "nerd-icons-corfu")
  (with-eval-after-load 'nerd-icons-corfu
    (add-to-list 'corfu-margin-formatters #'nerd-icons-corfu-formatter)
    ;; (setq nerd-icons-corfu-mapping
    ;;       '((array :style "cod" :icon "symbol_array" :face font-lock-type-face)
    ;;         (boolean :style "cod" :icon "symbol_boolean" :face font-lock-builtin-face)
    ;;         ;; ...
    ;;         (t :style "cod" :icon "code" :face font-lock-warning-face)))
    ))

page-break-lines

(eval-when-compile
  (el-clone :repo "purcell/page-break-lines"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/page-break-lines"))
  (autoload-if-found '(page-break-lines-mode global-page-break-lines-mode) "page-break-lines")
  (global-page-break-lines-mode t))

paren

(with-delayed-execution
  (show-paren-mode t)
  (with-eval-after-load 'show-paren-mode
    (set-face-underline-p 'show-paren-match-face "#ffffff")
    (setq show-paren-delay 0)
    (setq show-paren-style 'expression)))

powerline

(eval-when-compile
  (el-clone :repo "milkypostman/powerline"))

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

power-mode

(eval-when-compile
  (el-clone :repo "elizagamedev/power-mode.el"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/power-mode"))
  (require 'power-mode))

rainbow-mode

(eval-when-compile
  (el-clone :repo "emacsmirror/rainbow-mode"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/rainbow"))
  (autoload-if-found '(rainbow-mode) "rainbow")
  ;; (add-hook 'web-mode-hook #'rainbow-mode)
  )

rainbow-delimiters

(eval-when-compile
  (el-clone :repo "Fanael/rainbow-delimiters"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/rainbow-delimiters"))
  (autoload-if-found '(rainbow-delimiters-mode) "rainbow-delimiters")
  (add-hook 'prog-mode-hook 'rainbow-delimiters-mode))

solaire-mode

(eval-when-compile
  (el-clone :repo "hlissner/emacs-solaire-mode"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/emacs-solaire")))

yascroll

(eval-when-compile
  (el-clone :repo "emacsorphanage/yascroll"))

(with-delayed-execution
  (add-to-list 'load-path (locate-user-emacs-file "el-clone/yascroll"))
  (autoload-if-found '(global-yascroll-bar-mode) "yascroll")
  (global-yascroll-bar-mode t))

Functions

toggle-centaur-tabs-local-mode

(with-eval-after-load 'centaur-tabs
  (defun toggle-centaur-tabs-local-mode()
    (interactive)
    (call-interactively 'centaur-tabs-local-mode)
    (call-interactively 'centaur-tabs-local-mode)))

backward-kill-line

(defun backward-kill-line (arg)
  "Kill ARG lines backward."
  (interactive "p")
  (kill-line (- 1 arg)))

delete-word

Source

(defun delete-word (arg)
  "Delete characters forward until encountering the end of a word.
With argument ARG, do this that many times."
  (interactive "p")
  (delete-region (point) (progn (forward-word arg) (point))))

backward-delete-word

Source

(defun backward-delete-word (arg)
  "Delete characters backward until encountering the beginning of a word.
With argument ARG, do this that many times."
  (interactive "p")
  (delete-word (- arg)))

others

(defun Kyure_A/echo-choices (list message-str)
  "Displays choices in the echo area and evaluates the choice"
  (setq chosen (completing-read "Choose an option: " list))
  (cl-loop for i
           below (length list)
           do (when (equal (car (nth i list)) chosen)
                (eval (eval (cdr (nth i list)))) ;; quote ใ‚’ๅค–ใ™ใฎใŒ้›‘
                (cl-return))
           finally (message message-str)))

  (defun Kyure_A/open-recentf ()
    "Outputs a list of 10 most recently opened files to the echo area"
    (interactive)
    (let* ((recent-opened-files '()))
      (cl-loop for i below 10
               do (push (cons (nth i recentf-list) `(find-file ,(nth i recentf-list))) recent-opened-files))
      (setq recent-opened-files (reverse recent-opened-files))
      (Kyure_A/echo-choices recent-opened-files "not found")))

  (defun Kyure_A/open ()
    (interactive)
    (let* ((choices '(("dashboard" . (open-dashboard))
                      ("documents" . (if (file-exists-p "~/documents")
                                         (find-file "~/documents")
                                       (find-file "~/Documents")))
                      ("dotfiles" . (find-file "~/dotfiles"))
                      (".emacs.d" . (find-file "~/.emacs.d"))
                      ("elpa" . (find-file package-user-dir))
                      ("recent" . (open-recentf))
                      ("wsl" . (find-file "/mnt/c/Users/kyre/")))))
      (Kyure_A/echo-choices choices "invalid options")))

  (defun Kyure_A/start-repl ()
    (interactive)
    (let* ((mode-repl-pair '(("lisp-mode" . (start-sly))
                             ("hy-mode" . (hy-repl)))))
      (cl-loop for i
               below (length mode-repl-pair)
               do (when (equal (car (nth i mode-repl-pair)) (format "%s" major-mode))
                    (eval (eval (cdr (nth i mode-repl-pair))))
                    (cl-return))
               finally (message (format "[start-repl] couldn't found repl for %s" major-mode)))))

Footer

(provide 'init)

;; End:
;;; init.el ends here