Skip to content

feat(plugins): expose static CodeMirror highlighter - #2769

Merged
bajrangCoder merged 2 commits into
mainfrom
feat/plugin-code-highlight
Aug 19, 2026
Merged

bajrangCoder merged 2 commits into
mainfrom
feat/plugin-code-highlight

Conversation

@bajrangCoder

@bajrangCoder bajrangCoder commented Aug 19, 2026 •

Copy link
Copy Markdown
Member
  • update plugin types
  • update the docs

@greptile-apps

greptile-apps Bot commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR exposes the static CodeMirror highlighter through Acode’s plugin API and lets custom editor tabs adopt its theme-aware styles.

  • Adds public highlighting, cache, stylesheet, and CSS-class APIs.
  • Adds opt-in highlighting styles for custom-tab shadow roots.
  • Keeps fallback and constructed styles synchronized with editor-theme changes.
  • Adds unit and integration coverage, including detached shadow hosts.

Confidence Score: 5/5

The PR appears safe to merge.

The fallback style remains registered while its detached shadow host still owns it, and theme changes update its CSS; no blocking failure remains.

Important Files Changed

Filename Overview
src/utils/codeHighlight.js Adds reusable theme-aware stylesheet APIs and correctly retains detached fallback styles so subsequent theme updates continue synchronizing them.
src/lib/acode.js Exposes a frozen static-highlighter module through both codeHighlight and codemirror.highlight plugin entry points.
src/lib/editorFile.js Allows custom editor tabs to opt into static highlighting styles within their shadow roots.
tests/unit/codeHighlight.test.js Covers highlighting, escaping, stylesheet adoption, duplicate prevention, theme synchronization, and the previously reported detached-host fallback behavior.

Reviews (2): Last reviewed commit: "fix" | Re-trigger Greptile

Comment thread src/utils/codeHighlight.js Outdated
@bajrangCoder

Copy link
Copy Markdown
Member Author

@greptile

@bajrangCoder
bajrangCoder added this pull request to the merge queue Aug 19, 2026
Merged via the queue into main with commit b143d7e Aug 19, 2026
11 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in The Code Board - Acode Aug 19, 2026
@bajrangCoder
bajrangCoder deleted the feat/plugin-code-highlight branch August 19, 2026 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant