diff --git a/.gitmodules b/.gitmodules index 27a87aa..99ab068 100644 --- a/.gitmodules +++ b/.gitmodules @@ -55,3 +55,6 @@ [submodule "site-lisp/awesome-pair"] path = site-lisp/awesome-pair url = https://github.com/manateelazycat/awesome-pair.git +[submodule "site-lisp/sdcv"] + path = site-lisp/sdcv + url = https://github.com/manateelazycat/sdcv.git diff --git a/init.el b/init.el index 7a91610..229f5ab 100644 --- a/init.el +++ b/init.el @@ -110,6 +110,7 @@ If freezing sometimes, decrease it. If stuttering, increase it.") (require 'init-theme) (require 'init-vertico) (require 'init-keybindings) +(require 'init-tools) (require 'which-key) (setq which-key-show-early-on-C-h t) @@ -127,4 +128,3 @@ If freezing sometimes, decrease it. If stuttering, increase it.") (with-eval-after-load 'package (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))) - diff --git a/lisp/init-tools.el b/lisp/init-tools.el new file mode 100644 index 0000000..708a98c --- /dev/null +++ b/lisp/init-tools.el @@ -0,0 +1,22 @@ +;; -*- coding: utf-8; lexical-binding: t; -*- + +(require 'lazy-load) + + +(lazy-load-local-keys + '(("s" . sdcv-search-pointer)) + creature/map "sdcv") + +(with-eval-after-load 'sdcv + (setq sdcv-dictionary-data-dir (file-truename "~/.stardict/dic/")) + (setq sdcv-dictionary-simple-list + '("牛津英汉双解美化版" + "朗道英汉字典5.0" + "朗道汉英字典5.0")) + (setq sdcv-dictionary-complete-list + '("牛津英汉双解美化版" + "朗道英汉字典5.0" + "朗道汉英字典5.0"))) + + +(provide 'init-tools) diff --git a/site-lisp/sdcv b/site-lisp/sdcv new file mode 160000 index 0000000..f507931 --- /dev/null +++ b/site-lisp/sdcv @@ -0,0 +1 @@ +Subproject commit f50793189fdf165533be2d0056deb9eef47d4a91