doc: update quickstart

This commit is contained in:
Sebastian Ullrich 2022-05-18 17:43:14 +02:00
parent c3a9831388
commit d13fac6f45

View file

@ -9,11 +9,10 @@ See [Setup](./setup.md) for other ways, supported platforms, and more details on
![installing the vscode-lean4 extension](images/code-ext.png)
1. Create a new file using "File > New File" and click the `Select a language` link and type in `lean4` and hit ENTER. You should see the following popup:
1. Create a new file using "File > New Text File" (`Ctrl+N`). Click the `Select a language` prompt, type in `lean4`, and hit ENTER. You should see the following popup:
![elan](images/install_elan.png)
Click the "Install Lean using Elan" link and follow the progress
pressing ENTER in the terminal window to install lean. You should see some progress output like this:
Click the "Install Lean using Elan" button. You should see some progress output like this:
```
info: syncing channel updates for 'nightly'
@ -21,14 +20,14 @@ See [Setup](./setup.md) for other ways, supported platforms, and more details on
info: downloading component 'lean'
```
1. While it is installing you can paste the following Lean program into the new file:
1. While it is installing, you can paste the following Lean program into the new file:
```lean
#eval Lean.versionString
```
When the install finishes the Lean Language Server should start automatically and you should get a syntax-highlighting and a "Lean Infoview" popping up on the right. You will see the output of the #eval statement when
you place your cursor at the end of the #eval statement.
When the installation has finished, the Lean Language Server should start automatically and you should get syntax-highlighting and a "Lean Infoview" popping up on the right. You will see the output of the `#eval` statement when
you place your cursor at the end of the statement.
![successful setup](images/code-success.png)
@ -36,7 +35,7 @@ You are set up!
## Create a Lean Project
You can now create a Lean project in a new folder. Run `lake init foo` from the "View > Terminal" to create a package, followed by `lake build` to get an executable version of your Lean program.
You can now create a Lean project in a new folder. Run `lake init foo` from "View > Terminal" to create a package, followed by `lake build` to get an executable version of your Lean program.
On Linux/macOS, you first have to follow the instructions printed by the Lean installation or log out and in again for the Lean executables to be available in you terminal.
Note: Packages **have** to be opened using "File > Open Folder..." for imports to work.
@ -46,5 +45,5 @@ Saved changes are visible in other files after running "Lean 4: Refresh File Dep
**The InfoView says "Waiting for Lean server to start..." forever.**
Check that the VS Code Terminal is not prompting you with `Press ENTER key to start Lean:`. If so click in the terminal window and pressthe ENTER key.
If that doesn't work try also running the VS Code command `Developer: Reload Window`.
Check that the VS Code Terminal is not showing some installation errors from `elan`.
If that doesn't work, try also running the VS Code command `Developer: Reload Window`.