Zulip Chat Archive
Stream: lean4
Topic: How to execute .lean file non interactively?
Shange Tang (Aug 17 2024 at 19:37):
Hi, I am new on Lean4. Currently I am trying to write and execute Lean code in VSCode. I need to move my mouse to the end of each line to see the current goal or error message.
However I am wondering how can I execute the entire .lean file and output the goal/error messages for every line? Just like executing a .py file in command line.
Henrik Böving (Aug 17 2024 at 19:38):
Usually we work with the lake
build system and run lake build
on the CLI
Mario Carneiro (Aug 17 2024 at 19:38):
you can run lake lean <name of file>
to run just one file
Mario Carneiro (Aug 17 2024 at 19:39):
but you shouldn't need to move your mouse to see the current goal or error messages
Shange Tang (Aug 17 2024 at 19:46):
Thank you so much! That helps a lot.
Kim Morrison (Aug 18 2024 at 00:02):
The "Error Lens" extension in VSCode is also extremely helpful.
Damiano Testa (Aug 18 2024 at 08:41):
There was also a recent thread with a possibly similar question:
Maybe the show_goals
command from there is useful.
Last updated: May 02 2025 at 03:31 UTC