Skip to content

Commit

Permalink
feat: make name of "fetch cache for focused file" command more user-f…
Browse files Browse the repository at this point in the history
…riendly
  • Loading branch information
mhuisi committed Oct 29, 2024
1 parent a4eb1ce commit 6358b0c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion vscode-lean4/manual/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ The Lean 4 VS Code extension supports the following commands that can be run in
1. **['Project: Clean Project'](command:lean4.project.clean)**. Removes all build artifacts for the Lean project. If the project is [Mathlib](https://github.com/leanprover-community/mathlib4) or depends on it, it will also offer to download and install the current Mathlib build artifact cache after cleaning the project.
1. **['Project: Update Dependency…'](command:lean4.project.updateDependency)**. Displays a list of all dependencies that can be updated. After selecting a dependency and updating it, if the project is [Mathlib](https://github.com/leanprover-community/mathlib4) or depends on it, it will also download and install the current Mathlib build artifact cache. At the end, if the Lean toolchain of the updated project differs from the Lean toolchain of the project, the command will offer to update the Lean toolchain of the project to that of the updated dependency.
1. **['Project: Fetch Mathlib Build Cache'](command:lean4.project.fetchCache)**. Downloads and installs the current Mathlib build artifact cache if the project is [Mathlib](https://github.com/leanprover-community/mathlib4) or depends on it.
1. **['Project: Fetch Mathlib Build Cache For Focused File'](command:lean4.project.fetchFileCache)**. Downloads and installs the current Mathlib build artifact for the focused file if the project is [Mathlib](https://github.com/leanprover-community/mathlib4).
1. **['Project: Fetch Mathlib Build Cache For Current Imports'](command:lean4.project.fetchFileCache)**. Downloads and installs the current Mathlib build artifact for the focused file and all of its imports if the project is [Mathlib](https://github.com/leanprover-community/mathlib4).

<br/>

Expand Down
4 changes: 2 additions & 2 deletions vscode-lean4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,8 @@
{
"command": "lean4.project.fetchFileCache",
"category": "Lean 4",
"title": "Project: Fetch Mathlib Build Cache For Focused File",
"description": "Downloads cached Mathlib build artifacts of the focused file to avoid full elaboration"
"title": "Project: Fetch Mathlib Build Cache For Current Imports",
"description": "Downloads cached Mathlib build artifacts of the focused file and all of its imports to avoid full elaboration"
}
],
"languages": [
Expand Down
6 changes: 3 additions & 3 deletions vscode-lean4/src/projectoperations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class ProjectOperationProvider implements Disposable {
commands.registerCommand('lean4.project.clean', () => this.cleanProject()),
commands.registerCommand('lean4.project.updateDependency', () => this.updateDependency()),
commands.registerCommand('lean4.project.fetchCache', () => this.fetchMathlibCache()),
commands.registerCommand('lean4.project.fetchFileCache', () => this.fetchMathlibCacheForFocusedFile()),
commands.registerCommand('lean4.project.fetchFileCache', () => this.fetchMathlibCacheForCurrentImports()),
)
}

Expand Down Expand Up @@ -125,8 +125,8 @@ export class ProjectOperationProvider implements Disposable {
})
}

private async fetchMathlibCacheForFocusedFile() {
await this.runOperation('Fetch Mathlib Build Cache For Focused File', async lakeRunner => {
private async fetchMathlibCacheForCurrentImports() {
await this.runOperation('Fetch Mathlib Build Cache For Current Imports', async lakeRunner => {
const projectUri = lakeRunner.cwdUri!

if (!window.activeTextEditor || window.activeTextEditor.document.languageId !== 'lean4') {
Expand Down

0 comments on commit 6358b0c

Please sign in to comment.