LoginSignup
2
3

More than 5 years have passed since last update.

auto-complete.el が遅いと感じたら

Posted at

.zshenvのせいかも!?

c-mode-common-hook に以下が追加されてます。

(defun ac-cc-mode-setup ()
  (setq ac-sources (append '(ac-source-gtags) ac-sources)))

ac-source-gtagsの中で、以下の関数が実行されています。
shell-command-to-stringが実行される際、.zshenvが読み込まれるので、
.zshenvの中で重たい処理をしていると応答が帰ってくるまで時間がかかってました。

(shell-command-to-string (format "global -ciq %s" ac-prefix)) "\n")

対策

.zshrc.local を、 .zshrc で読み込むようにして、 .zshrc.local で重たい処理をするようにしました。

2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3