推荐一个自己写的Emacs配置:DoingEmacs
Github:GitHub - doing1024/doingemacs: 一个开箱即用📦的Emacs发行版欢迎任何形式的意见或建议!
好像没配submodule或者没把site-lisp里各个包的.git文件夹删掉,导致缺文件
应该是要
git clone --recursive
或者
git clone --recurse-submodules
感谢大佬,已修正
Warning (initialization): An error occurred while loading ‘/home/jmj/.emacs.d/init.el’:
File is missing: Cannot open load file, No such file or directory, mwim
您是不是按旧方法安装的,最新方法见Readme
archlinux
不过我好几天每更新了,我现在更新一下试试看
github 主页上的方法和 readme.md里面都是一样的啊,而且我还在自己的.emacs.d/site-lisp 里面找到mwin.el了
大佬久等了,bug修好了 原因:对git submodule不了解
这应该是没问题了吧?
我去用npm安装了ts,现在是这样:
Warning: setting attribute ‘:background’ of face ‘isearch-fail’: nil value is invalid, use ‘unspecified’ instead.
.emacs.d/site-lisp/window-numbering.el/window-numbering.el: Warning: ‘decf’ is an obsolete alias (as of 27.1); use ‘cl-decf’ instead.
.emacs.d/site-lisp/window-numbering.el/window-numbering.el: Warning: Use keywords rather than deprecated positional arguments to define-minor-mode' .emacs.d/site-lisp/org-bullets/org-bullets.el: Warning: Use keywords rather than deprecated positional arguments to
define-minor-mode’
Warning: setting attribute ‘:distant-foreground’ of face ‘hl-line’: nil value is invalid, use ‘unspecified’ instead.
Loading /home/jmj/.emacs.d/config/custom-set-var.el (source)…done
For information about GNU Emacs and the GNU system, type C-h C-a.
Warning: setting attribute ‘:background’ of face ‘isearch-fail’: nil value is invalid, use ‘unspecified’ instead.
Warning: setting attribute ‘:distant-foreground’ of face ‘hl-line’: nil value is invalid, use ‘unspecified’ instead.
Package cl is deprecated
LSP :: Connected to [ts-ls:2767/starting /home/jmj/google-plugin].
LSP :: [lsp-volar] Typescript is not detected correctly. Please ensure the npm package typescript is installed in your project or system (npm install -g typescript), otherwise open an issue
Error processing message (void-function lsp-lens–enable).
Warning: setting attribute ‘:distant-foreground’ of face ‘hl-line’: nil value is invalid, use ‘unspecified’ instead.
Warning: setting attribute ‘:background’ of face ‘isearch-fail’: nil value is invalid, use ‘unspecified’ instead. [2 times]
Warning: setting attribute ‘:distant-foreground’ of face ‘hl-line’: nil value is invalid, use ‘unspecified’ instead.
Beginning of buffer [12 times]
submodule 的方式其实在我看来其实不太适合给他人做配置的,自己用还可以,但是其他人用的时候,自己添加包的方式是自己克隆,这就不算优雅了,其实还有升级及依赖等问题。当然其实分享配置供参考还是挺好的。
考虑到大多数朋友都使用较新的Emacs,单独安装lsp-mode实在多余(主要还是lsp-mode依赖太多),所以使用eglot代替lsp-mode,功能不变
确实确实,昨晚一晚上都在折腾这货,最终决定砍掉submodule
对于git不熟练的我来说,git纯用来托管代码,别的记不住
更新:用use-package代替require,仍然在本地托管包,use-package仅代替require,不负责下载包
1 你得重新思考下怎么写配置,site-lisp里的包哪来的?按你的说法use-package不负责下载包,那就是你之前用的submodule放入了自己的git中进行管理?可人家的包修改之后呢,你怎么做之后的升级?
2 b站有位老哥做过特别基础的配置是如何写的,你可以参考一下。或者看看坛子里大佬做的配置:
感谢大佬提示,正想搞这个东西,本来准备来提问的
感觉想在我的电脑写个脚本,定期从原仓库更新并且发布到git
然后在emacs中写个函数,先把user-custom备份了,然后在克隆最新版,再把user-custom写回去。
你是手动把每一个包的所有代码都复制粘贴到 site-lisp 底下?那以后咋更新呢?更新也手动再复制粘贴一次?