projectile在根目录下projectile-find-file会卡住

一不小心按快捷键按错了,就会触发projectile-find-file,结果当前目录是系统根目录,然后Emacs就卡死(我知道是解析的文件太多的原因),只能force quit了。

能不能给这个函数设置一个报警机制,或者限定在一个目录下起作用,比如/Documents/Projects/这个目录

你自己写一个函数把它包起来就好了。比如检查一下default-directory。

(setq projectile-require-project-root t)

这样设置后就只会在project里能够使用projectile-find-file https://projectile.readthedocs.io/en/latest/configuration/#using-projectile-everywhere

2 个赞

https://github.com/emacs-helm/helm-ls-git 这个比 helm-projectile 快太多了.