From 77365945da04b67e967959e8750b7ceba6f296dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B5=E9=9D=99?= <1728366814@qq.com> Date: Thu, 12 Sep 2024 09:20:52 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=AF=BC=E5=87=BA=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E5=9D=97=E4=BF=AE=E6=94=B9=E3=80=91=E3=80=90=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E7=BB=9F=E8=AE=A1=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- init.el | 19 +++++++++++++++++++ lisp/init-org.el | 8 +++++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/init.el b/init.el index def3186..a99ffc7 100644 --- a/init.el +++ b/init.el @@ -4,6 +4,25 @@ (add-to-list 'load-path "~/.emacs.d/org-mode/lisp") (add-to-list 'load-path "~/.emacs.d/lisp") + +;; Display the total loading time in the minibuffer +(defun display-startup-echo-area-message () + "Display startup echo area message." + (message "Initialized in %s" (emacs-init-time))) +;; Benchmark loading time file by file and display it in the *Messages* buffer +(when init-file-debug + (require 'benchmark)) +(let ((lisp-dir "~/.emacs.d/lisp")) + (add-to-list 'load-path lisp-dir) + (mapc (lambda (fname) + (let ((feat (intern (file-name-base fname)))) + (if init-file-debug + (message "Feature '%s' loaded in %.2fs" feat + (benchmark-elapse (require feat fname))) + (require feat fname)))) + (directory-files lisp-dir t "\\.el"))) + + (require 'init-package) ; 配置包管理器 (require 'init-custom) ; 默认配置 (require 'init-theme) ; 主题配置 diff --git a/lisp/init-org.el b/lisp/init-org.el index 0209979..dd42e95 100644 --- a/lisp/init-org.el +++ b/lisp/init-org.el @@ -45,11 +45,12 @@ \\usepackage{fontspec} % 引入 fontspec 包 \\usepackage{xeCJK} % 引入 xeCJK 包处理中文 \\usepackage{xcolor} % 引入xcolor -\\definecolor{hltextcolor}{RGB}{255, 69, 0} % 配置颜色 +\\definecolor{hltextcolor}{RGB}{255, 69, 0} % 配置文本单词高亮颜色 +\\definecolor{bgcolor}{RGB}{245,245,245} % 定义代码块背景颜色为浅灰色 % 设置英文字体 -\\setmainfont{Consolas} +\\setmainfont{Noto Sans SC} \\setsansfont{Arial} -\\setmonofont{Consolas} % 设置等宽字体,用于代码 +\\setmonofont{Noto Sans SC} % 设置等宽字体,用于代码 % 设置中文字体 \\setCJKmainfont{Microsoft YaHei} % 设置中文主字体为微软雅黑 \\setCJKsansfont{Microsoft YaHei UI} % 设置中文无衬线字体为微软雅黑UI @@ -59,6 +60,7 @@ \\setlength{\parskip}{0.5em} % 段落间距 \\linespread{1.5} % 行间距 \\usepackage[cache=false]{minted} +\\setminted{fontsize=\\footnotesize, breaklines, breakanywhere, bgcolor=bgcolor, frame=lines, framesep=2mm} [NO-DEFAULT-PACKAGES] [NO-PACKAGES]" ("\\section{%s}" . "\\section*{%s}")