lean4-mode icon indicating copy to clipboard operation
lean4-mode copied to clipboard

Emacs 30.1 (M3 Macos) hangs when loading lean4-mode.

Open omrischwarz opened this issue 1 year ago • 4 comments

With this added to my .emacs.d/init.el,

(add-to-list 'load-path "/Users/omri.schwarz/Projects/lean4-mode")
(require 'lean4-mode)

I cause emacs to become unresponsive the moment I M-x lean4-mode or open a .lean file. Have any of you seen this?

omrischwarz avatar May 02 '25 02:05 omrischwarz

Does it work in other editors? Does it work fine if you start a Lean LSP server from shell (lake serve)?

Any more information would be great.

mekeor avatar May 05 '25 20:05 mekeor

So, I solved the issue by uncommenting this line in my init.el:

(setq lean4-mode-required-packages '(dash f flycheck lsp-mode magit-section s))

It's still interesting why the lack of this variable would cause an infinite loop when you load lean4-mode, but stepping past the problem is as simple as this.

(Context: my work laptop bricked itself, and I have been rebuilding my old working environment one piece at a time on the new laptop. It was Lean's turn, and I accidentally commented that line in the process.)

omrischwarz avatar May 05 '25 21:05 omrischwarz

I can't make much sense of this solution because lean4-mode-required-packages variable is not used in recent versions of Lean4-Mode. But I'm happy the issue is gone.

mekeor avatar May 06 '25 20:05 mekeor

This is what I am running:

commit 76895d8939111654a472cfc617cfd43fbf5f1eb6 (HEAD -> master, tag: 1.1.2, origin/master, origin/HEAD) Author: Mekeor Melire Date: Tue Dec 10 21:09:42 2024 +0100

Release version 1.1.2

omrischwarz avatar May 06 '25 21:05 omrischwarz