Description
Printing .lean files produces no syntax highlighting (or incorrect highlighting from auto-detection).
From what I see, this happens because Lean language grammar is not bundled with highlight.js core, it lives in the separate third-party package highlightjs-lean, maintained by the leanprover-community.
Steps to reproduce
- Open any
.lean file in VS Code with the vscode-lean4 extension installed
- Print or preview with vsc-print
- Observe: code is rendered as plain text with no syntax coloring
In the screenshot below, notice that e.g. comments don't get highlighted.
Expected behavior
Lean keywords, tactics, literals, and comments are syntax-highlighted, similar to other supported languages.
Suggested fix
Add highlightjs-lean as a dependency and register it:
const leanHljs = require('highlightjs-lean');
hljs.registerLanguage('lean', leanHljs);
Description
Printing
.leanfiles produces no syntax highlighting (or incorrect highlighting from auto-detection).From what I see, this happens because Lean language grammar is not bundled with
highlight.jscore, it lives in the separate third-party packagehighlightjs-lean, maintained by the leanprover-community.Steps to reproduce
.leanfile in VS Code with the vscode-lean4 extension installedIn the screenshot below, notice that e.g. comments don't get highlighted.
Expected behavior
Lean keywords, tactics, literals, and comments are syntax-highlighted, similar to other supported languages.
Suggested fix
Add
highlightjs-leanas a dependency and register it: