不谈Spacemacs,只谈Centaur Emacs

我专门在arch上安装了clangd和ccls,没有发现问题呀。eglot默认用clangd,clangd不存在才会用ccls。两者不存在冲突。建议你去掉私有配置再试试。

OS:debian 12.5 emacs:29.2,自编译 修改集涉及custom.el init.el init-evil.el,不过是些软件源、lsp客户端、evil插件,没有涉及到lsp server的

init.el

去掉试过吗?

刚试了下,在init.el中注释掉evil那行之后,ccls/clangd同时存在也不会有问题了,真是服了,这种狗血的事情都能发生

遇到一个问题求助大佬: 我使用的命令是:

M-x centaur-update

我的结果是:

不知道是什么原因。 我的emacs是运行在MBP M2上,版本是

又试了几次,更新完后启动是这样的:

然后使用 emacs --debug-init 启动,结果是这样的:

贴上全部日志:

 Debugger entered--Lisp error: (error "Eager macro-expansion failure: (void-function comp...")
  signal(error ("Eager macro-expansion failure: (void-function comp..."))
  error("Eager macro-expansion failure: %S" (void-function compat--plist-get))
  internal-macroexpand-for-load((with-no-warnings (pretty-hydra-define toggles-hydra (:title (pretty-hydra-title "Toggles" 'faicon "nf-fa-toggle_on") :color amaranth :quit-key ("q" "C-g")) ("Basic" (("n" (cond (... ...) (... ...)) "line number" :toggle (or (bound-and-true-p display-line-numbers-mode) (bound-and-true-p global-linum-mode))) ("a" global-aggressive-indent-mode "aggressive indent" :toggle t) ("d" global-hungry-delete-mode "hungry delete" :toggle t) ("e" electric-pair-mode "electric pair" :toggle t) ("c" flyspell-mode "spell check" :toggle t) ("s" prettify-symbols-mode "pretty symbol" :toggle t) ("l" global-page-break-lines-mode "page break lines" :toggle t) ("b" display-battery-mode "battery" :toggle t) ("i" display-time-mode "time" :toggle t) ("m" doom-modeline-mode "modern mode-line" :toggle t)) "Highlight" (("h l" global-hl-line-mode "line" :toggle t) ("h p" show-paren-mode "paren" :toggle t) ("h s" symbol-overlay-mode "symbol" :toggle t) ("h r" rainbow-mode "rainbow" :toggle t) ("h w" (setq-default show-trailing-whitespace (not show-trailing-whitespace)) "whitespace" :toggle show-trailing-whitespace) ("h d" rainbow-delimiters-mode "delimiter" :toggle t) ("h i" highlight-indent-guides-mode "indent" :toggle t) ("h t" global-hl-todo-mode "todo" :toggle t)) "Program" (("f" flymake-mode "flymake" :toggle t) ("O" hs-minor-mode "hideshow" :toggle t) ("u" subword-mode "subword" :toggle t) ("W" which-function-mode "which function" :toggle t) ("E" toggle-debug-on-error "debug on error" :toggle (default-value 'debug-on-error)) ("Q" toggle-debug-on-quit "debug on quit" :toggle (default-value 'debug-on-quit)) ("v" global-diff-hl-mode "gutter" :toggle t) ("V" diff-hl-flydiff-mode "live gutter" :toggle t) ("M" diff-hl-margin-mode "margin gutter" :toggle t) ("D" diff-hl-dired-mode "dired gutter" :toggle t)) "Theme" (("t a" (centaur-load-theme 'auto) "auto" :toggle (eq centaur-theme 'auto) :exit t) ("t m" (centaur-load-theme 'random) "random" :toggle (eq centaur-theme 'random) :exit t) ("t s" (centaur-load-theme 'system) "system" :toggle (eq centaur-theme 'system) :exit t) ("t d" (centaur-load-theme 'default) "default" :toggle (centaur-theme-enable-p 'default) :exit t) ("t p" (centaur-load-theme 'pro) "pro" :toggle (centaur-theme-enable-p 'pro) :exit t) ("t k" (centaur-load-theme 'dark) "dark" :toggle (centaur-theme-enable-p 'dark) :exit t) ("t l" (centaur-load-theme 'light) "light" :toggle (centaur-theme-enable-p 'light) :exit t) ("t w" (centaur-load-theme 'warm) "warm" :toggle (centaur-theme-enable-p 'warm) :exit t) ("t c" (centaur-load-theme 'cold) "cold" :toggle (centaur-theme-enable-p 'cold) :exit t) ("t y" (centaur-load-theme 'day) "day" :toggle (centaur-theme-enable-p 'day) :exit t) ("t n" (centaur-load-theme 'night) "night" :toggle (centaur-theme-enable-p 'night) :exit t) ("t o" (centaur-load-theme (intern ...)) "others" :toggle (not (or ... ...)) :exit t)) "Package Archive" (("p m" (centaur-set-package-archives 'melpa t) "melpa" :toggle (eq centaur-package-archives 'melpa) :exit t) ("p b" (centaur-set-package-archives 'bfsu t) "bfsu" :toggle (eq centaur-package-archives 'bfsu) :exit t) ("p i" (centaur-set-package-archives 'iscas t) "iscas" :toggle (eq centaur-package-archives 'iscas) :exit t) ("p n" (centaur-set-package-archives 'netease t) "netease" :toggle (eq centaur-package-archives 'netease) :exit t) ("p s" (centaur-set-package-archives 'sjtu t) "sjtu" :toggle (eq centaur-package-archives 'sjtu) :exit t) ("p t" (centaur-set-package-archives 'tuna t) "tuna" :toggle (eq centaur-package-archives 'tuna) :exit t) ("p u" (centaur-set-package-archives 'ustc t) "ustc" :toggle (eq centaur-package-archives 'ustc) :exit t) ("p T" (centaur-test-package-archives) "speed test" :exit t))))) t)
  eval-buffer(#<buffer  *load*-358900> nil "/Users/hubing/.emacs.d/lisp/init-hydra.el" nil t)  ; Reading at buffer position 7898
  load-with-code-conversion("/Users/hubing/.emacs.d/lisp/init-hydra.el" "/Users/hubing/.emacs.d/lisp/init-hydra.el" nil t)
  require(init-hydra)
  eval-buffer(#<buffer  *load*> nil "/Users/hubing/.emacs.d/init.el" nil t)  ; Reading at buffer position 3648
  load-with-code-conversion("/Users/hubing/.emacs.d/init.el" "/Users/hubing/.emacs.d/init.el" t t)
  load("/Users/hubing/.emacs.d/init" noerror nomessage)
  startup--load-user-init-file(#f(compiled-function () #<bytecode 0x155b861f906dbd>) #f(compiled-function () #<bytecode -0x1f3c61addc0d85b5>) t)
  command-line()
  normal-top-level()

有大佬能指导一下吗,我感觉我可能得重新安装centaur了

试试把compat这个包删掉试试,国内网络环境比较差,有的时候有的包可能下载到一半就出错了

原来如此 :pray::pray::pray:

要是能有那种release版本,自动把包封装好就好了。这样直接下一个压缩包,解压一下就可以直接走编译流程,不用走下载流程了。现在好多用需要去下载包的配置总是要在安装的时候折腾好久

你把这里的melpa改成netease就行,用国内镜像

centaur里应该只有个eglot-booster(还不是默认启用)需要代理才能下载。

国内推荐用tuna或者ustc比较稳定。

重新安装下compat包。用国内镜像速度要好很多

您好,最近在windows上使用emacs 31版本发现C++文件中开启了自动缩进2个空格,最开始的时候回车换行是自动缩进4个空格,写完第一行后;到换行的时候缩进自动变为2个空格并且换行后的缩进也是2个空格

31 还有莫名其妙的问题,看看是不是这些默认值改了:c-basic-offset, c-ts-mode-indent-offset, and c-guess-guessed-basic-offset etc.

我回退了emacs,不折腾这些有的没的了,感谢