Spacemacs 每次开启都会卡很久

每次打开spacemacs都会卡一段时间,可是我看message信息已经加载完所有的包了,后面的请问一下是什么导致他卡那么久?message信息如下,状态栏已经显示Open the quickhelp. 了:

for more info.  Customize `exec-path-from-shell-arguments' to remove "-i" when done, or disable `exec-path-from-shell-check-startup-files' to disable this message.
smooth-scrolling enabled.
(Spacemacs) Warning: tern binary not found!
Spacemacs is ready.
Skipping check for new version (reason: dotfile)
Loading /Users/Leo/.emacs.d/.cache/recentf...done
Open the quickhelp.
SPC C-g is undefined
Updating buffer list...
Formats have changed, recompiling...done
Updating buffer list...done
ibuffer-projectile: groups set
Commands: m, u, t, RET, g, k, S, D, Q; q to quit; h for help
command-execute: Buffer is read-only: #<buffer *Ibuffer*>
1 个赞

可能是 tramp 的原因,你查看一下 Spacemacs 的 FAQ 文档吧,里面有说明。

果然是这个问题,我把解决方案贴过来了,大家参考:

1.14 Why is Spacemacs hanging on startup?

This is probably related to Helm using Tramp which tries to figure out some SSH/DNS settings at startup. The root cause is probably your ISP redirecting non-existing addresses to their own servers.

Try using these settings in the user-init function in your .spacemacs configuration:

(setq tramp-ssh-controlmaster-options
      "-o ControlMaster=auto -o ControlPath='tramp.%%C' -o ControlPersist=no")

See issue #3422 and helm issue #1000 for details. If for any reason this code is not working, you can try to put these settings directly in ~/.ssh/config:

Host *
ControlMaster auto
ControlPath ~/.ssh/master -%r@%h:%p
ControlPersist = no

spacemacs/doc/FAQ.org at develop · syl20bnr/spacemacs · GitHub

2 个赞