syntax: highlight groovy, gradle, properties, asciidoc, kts - #153
Draft
big-guy wants to merge 1 commit into
Draft
Conversation
Add syntax highlighting for Gradle-ecosystem and AsciiDoc files in both the FileView/diff viewers (highlight.js) and the Monaco file editor. highlight.js (src/renderer/syntax.ts): - register groovy, properties, asciidoc languages - EXT_TO_LANG: .groovy → groovy, .gradle → groovy, .properties → properties, .adoc/.asciidoc → asciidoc; .gradle.kts resolves to kotlin via its ext Monaco (src/renderer/monaco-setup.ts + monaco-grammars/): - hand-rolled Monarch grammars for groovy and asciidoc - .groovy/.gvy/.gy/.gsh/.gradle → groovy - .gradle.kts → kotlin (built-in; compound ext checked before single) - .adoc/.asciidoc → asciidoc, .properties → ini Build scripts use the stock Groovy/Kotlin languages rather than bespoke Gradle DSL grammars. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Collaborator
Author
|
Ideally, we'd do one of these things...
This is only just enough to cover the common files I see. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds syntax highlighting for Gradle-ecosystem and AsciiDoc files in both the FileView/diff viewers (highlight.js) and the Monaco file editor.
highlight.js (
src/renderer/syntax.ts)groovy,properties, andasciidoclanguages on top of the common bundle.EXT_TO_LANG:.groovy→ groovy,.gradle→ groovy,.properties→ properties,.adoc/.asciidoc→ asciidoc..gradle.ktsresolves tokotlinvia its trailing extension.Monaco editor (
src/renderer/monaco-setup.ts+monaco-grammars/)groovyandasciidoc..groovy/.gvy/.gy/.gsh/.gradle→ groovy..gradle.kts→ kotlin (Monaco built-in; compound ext checked before the single-ext fallback)..adoc/.asciidoc→ asciidoc;.properties→ ini.Build scripts use the stock Groovy/Kotlin languages rather than bespoke Gradle DSL grammars — so Gradle DSL identifiers (
task,dependencies,implementation, …) render as plain identifiers, which is the intended trade-off for not maintaining a parameterized grammar.Verification
npm run typecheck✅npx electron-vite build✅ (renderer chunk grows ~a few KB for the two Monarch grammars)🤖 Generated with Claude Code
PR opened on behalf of @big-guy by Claude via Harness.