1 Star 0 Fork 0

Peter-Chou/petmacs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
init.el 2.79 KB
一键复制 编辑 原始数据 按行查看 历史
Peter-Chou 提交于 2024-12-16 15:53 . use flychecker
;;; init.el --- Petmacs configurations -*- lexical-binding: t no-byte-compile: t -*-
;; Defer garbage collection further back in the startup process
(setq gc-cons-threshold most-positive-fixnum)
;; Don't pass case-insensitive to `auto-mode-alist'
(setq auto-mode-case-fold nil)
(unless (or (daemonp) noninteractive init-file-debug)
;; Suppress file handlers operations at startup
;; `file-name-handler-alist' is consulted on each call to `require' and `load'
(let ((old-value file-name-handler-alist))
(setq file-name-handler-alist nil)
(set-default-toplevel-value 'file-name-handler-alist file-name-handler-alist)
(add-hook 'emacs-startup-hook
(lambda ()
"Recover file name handlers."
(setq file-name-handler-alist
(delete-dups (append file-name-handler-alist old-value))))
101)))
;; Load path
;; Optimize: Force "lisp"" and "site-lisp" at the head to reduce the startup time.
(defun update-load-path (&rest _)
"Update `load-path'."
(dolist (dir '("site-lisp" "lisp"))
(push (expand-file-name dir user-emacs-directory) load-path)))
(defun add-subdirs-to-load-path (&rest _)
"Add subdirectories to `load-path'.
Don't put large files in `site-lisp' directory,
Otherwise the startup will be very slow."
(let ((default-directory (expand-file-name "site-lisp" user-emacs-directory)))
(normal-top-level-add-subdirs-to-load-path)))
(advice-add #'package-initialize :after #'update-load-path)
(advice-add #'package-initialize :after #'add-subdirs-to-load-path)
(update-load-path)
(require 'init-custom)
(require 'init-funcs)
(require 'init-package)
(require 'init-basic)
(require 'init-font)
(require 'init-evil)
(require 'init-tools)
(require 'init-ui)
(require 'init-highlight)
(require 'init-dashboard)
(require 'init-ibuffer)
(require 'init-window)
(require 'init-treemacs)
;; (require 'init-workspace)
(if (equal petmacs-checker 'flycheck)
(require 'init-flycheck)
(require 'init-flymake))
(require 'init-vcs)
(require 'init-projectile)
(require 'init-project)
(require 'init-dired)
(require 'init-shell)
(require 'init-yasnippet)
(require 'init-consult)
(when (petmacs-treesit-available-p)
(require 'init-treesit))
(require 'init-corfu)
(cond ((equal petmacs-lsp-mode-impl 'eglot)
(require 'init-eglot))
(t
(require 'init-lsp)))
(cond ((and (equal petmacs-dap-mode-impl 'dape) emacs/>=29p)
(require 'init-dape))
(t
(require 'init-dap)))
(require 'init-elisp)
(require 'init-c-c++)
(require 'init-python)
(require 'init-java)
(require 'init-markdown)
;; (require 'init-golang)
;; (require 'init-scala)
;; (require 'init-web)
(require 'init-org)
(require 'init-keybindings)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; init.el ends here
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/Peter-Chou/petmacs.git
git@gitee.com:Peter-Chou/petmacs.git
Peter-Chou
petmacs
petmacs
master

搜索帮助