Skip to content

chore: remove the redundant include: #stringBlock in lean4 syntax#623

Merged
mhuisi merged 1 commit intoleanprover:masterfrom
YDX-2147483647:patch-1
Jun 9, 2025
Merged

chore: remove the redundant include: #stringBlock in lean4 syntax#623
mhuisi merged 1 commit intoleanprover:masterfrom
YDX-2147483647:patch-1

Conversation

@YDX-2147483647
Copy link
Copy Markdown
Contributor

@YDX-2147483647 YDX-2147483647 commented Jun 9, 2025

#stringBlock is a block in the lean 3 / lean 4 syntax file, and it was added in 48ad018 on 2020-06-23, when people were developing in the legacy vscode-lean repo.
Later, #stringBlock was removed in ca65431 on 2021-01-18 when migrating from lean 3 to lean 4.
Somehow, the include line was forgotten. This PR now removes the line.

In fact, VS Code’s parser (vscode-textmate) will tolerate missing includes, so the original syntax works.
(You could verify it by amending ~/.vscode/extensions/leanprover.lean4-0.0.207/syntaxes/lean4.json and reloading the VS Code window.)

However, including the inexistent #stringBlock will cause problems for a downstream project.
If you are concerned about the details, please refer to sharkdp/bat#3286.

`#stringBlock` was added in 48ad018 on 2020-06-23, when people were developing in the legacy vscode-lean repo.
Later, `#stringBlock` was removed in ca65431 on 2021-01-18 when migrating from lean 3 to lean 4. However, the `include` line was forgotten.

In fact, VS Code’s parser (vscode-textmate) will tolerate missing includes, so the original syntax works.
YDX-2147483647 added a commit to YDX-2147483647/bat that referenced this pull request Jun 9, 2025
Resolves sharkdp#3286

1. `lean4.json` → `lean4.tmLanguage`

    1. Download `vscode-lean4/syntaxes/lean4.json` from leanprover/vscode-lean4#623.
    2. Install the VS Code extension [TextMate Languages (pedro-w)](https://marketplace.visualstudio.com/items?itemName=pedro-w.tmlanguage).
    3. Open `lean4.json` in VS Code, <kbd>F1</kbd>, and “Convert to tmLanguage PLIST File”.

2. `lean4.tmLanguage` → `lean4.sublime-syntax`

    Open `lean4.tmLanguage` in Sublime text, “Tools → Developer → New Syntax from lean4.tmLanguage…”.
@mhuisi
Copy link
Copy Markdown
Collaborator

mhuisi commented Jun 9, 2025

Thanks!

@mhuisi mhuisi changed the title fix: remove the redundant include: #stringBlock in lean4 syntax chore: remove the redundant include: #stringBlock in lean4 syntax Jun 9, 2025
@mhuisi mhuisi merged commit b8fc222 into leanprover:master Jun 9, 2025
@YDX-2147483647 YDX-2147483647 deleted the patch-1 branch June 9, 2025 10:09
YDX-2147483647 added a commit to YDX-2147483647/bat that referenced this pull request Jun 10, 2025
Resolves sharkdp#3286

1. `lean4.json` → `lean4.tmLanguage`

    1. Download `vscode-lean4/syntaxes/lean4.json` from leanprover/vscode-lean4#623 (now merged).
    2. Install the VS Code extension [TextMate Languages (pedro-w)](https://marketplace.visualstudio.com/items?itemName=pedro-w.tmlanguage).
    3. Open `lean4.json` in VS Code, <kbd>F1</kbd>, and “Convert to tmLanguage PLIST File”.

2. `lean4.tmLanguage` → `lean4.sublime-syntax`

    Open `lean4.tmLanguage` in Sublime text, “Tools → Developer → New Syntax from lean4.tmLanguage…”.
YDX-2147483647 added a commit to YDX-2147483647/bat that referenced this pull request Jun 10, 2025
Resolves sharkdp#3286

1. `lean4.json` → `lean4.tmLanguage`

    1. Download `vscode-lean4/syntaxes/lean4.json` from leanprover/vscode-lean4#623 (now merged).
    2. Install the VS Code extension [TextMate Languages (pedro-w)](https://marketplace.visualstudio.com/items?itemName=pedro-w.tmlanguage).
    3. Open `lean4.json` in VS Code, <kbd>F1</kbd>, and “Convert to tmLanguage PLIST File”.

2. `lean4.tmLanguage` → `lean4.sublime-syntax`

    Open `lean4.tmLanguage` in Sublime text, “Tools → Developer → New Syntax from lean4.tmLanguage…”.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants