config: add macOS support with cross-platform compatibility
- Add platform-specific keybindings, paths, and settings for macOS - Update org-mode templates and agenda files for both Windows and Mac - Add vterm and lua-ts-mode packages (non-Windows) - Configure Chinese segmentation for macOS - Adjust font sizes and encoding settings per platform
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
;;; init-startup.el
|
||||
;;; -*- lexical-binding: t -*-
|
||||
|
||||
;; mac自动全屏
|
||||
(when *is-mac*
|
||||
(toggle-frame-fullscreen)
|
||||
(global-unset-key (kbd "<f12>"))
|
||||
(global-set-key (kbd "<f12>") 'toggle-frame-fullscreen))
|
||||
|
||||
;; 配置备份文件和自动保存文件目录
|
||||
(setq backup-directory-alist
|
||||
`((".*" . ,(expand-file-name "backup/" user-emacs-directory)))
|
||||
@@ -13,6 +19,9 @@
|
||||
(setq auto-save-file-name-transforms
|
||||
`((".*" ,(expand-file-name "auto-save-list/" user-emacs-directory) t)))
|
||||
|
||||
;; 开启水平滚动
|
||||
(put 'scroll-left 'disabled nil)
|
||||
|
||||
;; 关闭lock文件
|
||||
(setq create-lockfiles nil)
|
||||
|
||||
@@ -24,6 +33,11 @@
|
||||
(add-to-list 'exec-path (expand-file-name "H/appppppppppp/scoop/apps/"))
|
||||
(setenv "PATH" (concat (expand-file-name "H/appppppppppp/scoop/apps/") ";" (getenv "PATH"))))
|
||||
|
||||
;; 同步brew目录
|
||||
(when *is-mac*
|
||||
(add-to-list 'exec-path (expand-file-name "/opt/homebrew/bin/"))
|
||||
(setenv "PATH" (concat (expand-file-name "/opt/homebrew/bin/") ":" (getenv "PATH"))))
|
||||
|
||||
;; 当文件被外部修改时自动刷新
|
||||
(global-auto-revert-mode 1)
|
||||
|
||||
@@ -42,6 +56,7 @@
|
||||
";; SCRATCH SCRATCH SCRATCH\n\n")
|
||||
|
||||
;; 开启server mode
|
||||
(server-start)
|
||||
(unless *is-mac*
|
||||
(server-start))
|
||||
|
||||
(provide 'init-startup)
|
||||
|
||||
Reference in New Issue
Block a user