Skip to content

feat: add syntax highlighting to file viewer#414

Merged
sauravpanda merged 1 commit intomainfrom
feat/386-file-viewer-syntax-highlight
Apr 14, 2026
Merged

feat: add syntax highlighting to file viewer#414
sauravpanda merged 1 commit intomainfrom
feat/386-file-viewer-syntax-highlight

Conversation

@sauravpanda
Copy link
Copy Markdown
Owner

Summary

  • Added highlight.js with 12 common language grammars for syntax highlighting in the file explorer preview
  • Language detection via file extension with auto-detection fallback
  • Dark theme color scheme (One Dark-inspired) matching the app aesthetic
  • highlight.js is bundled into the lazy-loaded FileExplorer chunk, no impact on initial load

Fixes #386

Test plan

  • Open the file explorer and select a .ts/.js file — verify syntax colors
  • Select a .py, .rs, .json, .css, .md file — verify correct highlighting
  • Select an unknown file type — verify it falls back gracefully
  • Verify line numbers still align correctly

Add highlight.js with 12 common language grammars (TS, JS, Python,
Rust, JSON, CSS, HTML, Bash, YAML, SQL, Markdown, Go) for syntax
highlighting in the file preview pane. Uses file extension to detect
language. Falls back to auto-detection or plain text.

Includes a dark theme color scheme matching the app's aesthetic.

Fixes #386
@sauravpanda sauravpanda merged commit 06bb87e into main Apr 14, 2026
5 checks passed
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.

Add read-only file viewer for browsing worktree contents

1 participant