aboutsummaryrefslogtreecommitdiff
path: root/.emacs.d/init.el
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2022-03-13 12:02:36 +0800
committerGuangxiong Lin <[email protected]>2022-03-13 12:04:38 +0800
commit49a12b3a00a06031d3965a6120d344674f36e440 (patch)
tree715418b973f6fff2f318a32d59d0537ff65a9244 /.emacs.d/init.el
parent40bfa4dd0556e923807ff54c53d4a43bf70e928e (diff)
downloaddotfiles-49a12b3a00a06031d3965a6120d344674f36e440.tar.gz
dotfiles-49a12b3a00a06031d3965a6120d344674f36e440.tar.bz2
dotfiles-49a12b3a00a06031d3965a6120d344674f36e440.zip
Improve emacs init
- Running server whenever there is no server running - Require 'init-local
Diffstat (limited to '.emacs.d/init.el')
-rw-r--r--.emacs.d/init.el16
1 files changed, 13 insertions, 3 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index 21e5d01..66a37cc 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -13,6 +13,10 @@
(defconst *is-a-mac* (eq system-type 'darwin))
(defconst *is-a-linux* (eq system-type 'gnu/linux))
+(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
+(unless (file-exists-p custom-file)
+ (write-region "" nil custom-file))
+
(require 'init-package)
(require 'init-utils)
(require 'init-evil)
@@ -29,7 +33,13 @@
(require 'init-misc)
(require 'init-appearance)
-(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
-(unless (file-exists-p custom-file)
- (write-region "" nil custom-file))
+(add-hook 'after-init-hook
+ (lambda ()
+ (require 'server)
+ (unless (server-running-p) (server-start))))
+
(load custom-file)
+
+(require 'init-local nil t)
+
+(provide 'init)