Repository navigation
Highlight Elixir and Erlang files in the file editor - #13732
teamleaderleo merged 5 commits into
Conversation
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
|
All contributors have signed the CLA ✍️ ✅ |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: manaflow-ai/cmux/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe language catalog maps four BEAM-related extensions to Elixir and Erlang. The file preview resolver classifies ChangesBEAM File Extension Support
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: Merge Risk: ⚪ Minimal · up to The PR adds Elixir and Erlang syntax mappings and text previews for their source files, including 🚥 Pre-merge checks | ✅ 24 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (24 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
I have read the CLA Document v2.2 and I hereby sign the CLA |
|
dw bout the red ci imma rebase |
8c25210 to
aabbc49
Compare
@teamleaderleo done |
.exs resolves to com.apple.logic.exs, which conforms to audiovisualContent, so the preview opens Elixir scripts as media. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Adding ex, exs, erl and hrl to the known text extensions routes them through the same media-collision sniff as .ts: a text .exs opens in the editor, while a binary Logic sampler .exs keeps the media route. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged, thanks @camilohollanda :) |
|
Merge receipt for
Labeled |
648d5c1 Add a Paste Last Screenshot action with an unbound shortcut (manaflow-ai#14955) ff61677 ci: avoid partial blobs in catch-up merges (manaflow-ai#15023) 4d0d112 ci: retry transient catch-up GraphQL failures (manaflow-ai#15021) 212e808 ci: attribution scores a lone suspect and reports app-host crashes apart (manaflow-ai#14952) 4cabdf4 test: settle the window before measuring the unread sidebar-row invalidation (manaflow-ai#14568) 12ec99b Add a release-media capture tool for changelog screenshots and clips (manaflow-ai#15010) ee2cda0 Backfill Unreleased changelog and draft next release cards (manaflow-ai#14999) be4adf8 Show a brief notice when Cmd+V fails on an oversized image or a timeout (manaflow-ai#14953) 23d22d7 ci: an owned pool the run starts on now beats an earlier one it queues on (manaflow-ai#14993) 05d0190 ci: catch-up posts once per head, says less, and merges inserted declarations (manaflow-ai#15018) 4ee4b21 ci: fail stalled Swift package tests instead of waiting out the job timeout (manaflow-ai#14997) 9ce512a merge-main: run local guards only when asked (manaflow-ai#15016) d60108a ci: clear test-e2e's fixed DerivedData with clear-dirs.sh (manaflow-ai#14994) 1d7895e ci: run the shell and CLI no-socket lanes in parallel (manaflow-ai#14990) 6e7d25f Honor macOS Differentiate Without Color, Increase Contrast and Reduce Transparency (manaflow-ai#14991) 966b355 Stop interrupting focused work: sidebar jumps, Computer Use focus steal, quit dialog on logout (manaflow-ai#14961) e1f1cb2 Strip control characters from feedback attachment filenames (manaflow-ai#14783) 0758c9f test: find the onboarding window the test presented, not a leftover (manaflow-ai#15015) b35c540 fix(spm): resolve GhosttyKit/GhosttyRuntimeTestStubs target name collisions (manaflow-ai#10569) ef33bed Map .purs artifacts to the Haskell highlight.js grammar (manaflow-ai#14202) e2a167a Highlight Elixir and Erlang files in the file editor (manaflow-ai#13732) 972c449 fix: wrap Linux browser download card label (manaflow-ai#11157) f563884 Add Aside to browser data import detection (manaflow-ai#13379) 091d0ea Add cmux send --paste and hint at it for large multi-line sends (manaflow-ai#14937) 3ffcdbb test(ios): keep folder-tap stat tests off the real 2 s deadline (manaflow-ai#15017) 68d3936 test: keep CmuxTerminal pasteboard tests off the cooperative pool (manaflow-ai#15006)
Summary
The file editor shows
.ex,.erland.hrlfiles as plain text, and opens.exsfiles in the video player. The bundled highlight.js 11.11.1 registers bothelixiranderlang, so two things were missing:LanguageCataloghad no entry for these extensions, so they never reached highlighting. This PR mapsex/exstoelixiranderl/hrltoerlang..exstocom.apple.logic.exs(Logic's sampler instrument format), which conforms toaudiovisualContent, soFilePreviewKindResolverrouted Elixir scripts to media before the editor. This PR addsex,exs,erlandhrltotextExtensions, which sends them through the same media-collision sniff.tsalready uses. A text.exsopens in the editor; a binary Logic.exskeeps the media route..heex/.eexstay unmapped: highlight.js has no grammar for them, and forcingelixirorxmlwould mis-color the other half of every template.Testing
LanguageCatalogTests.mapsBeamExtensions:swift testinPackages/Shared/CmuxSyntaxHighlightingpasses 25 tests in 5 suites.FilePreviewKindResolverTests.beamSourceFilesRouteDirectlyToTextPreview:xcodebuild test -scheme cmux-unit -only-testing:cmuxTests/FilePreviewKindResolverTestspasses 5 tests, including the existing.ts/.mtsand movie cases..ex,.exsand.erlfiles open highlighted in the editor. Before the routing fix,.exsopened in the video player.highlightAutowhen a language id is unknown, so a test that looks for colored output passes even when the id is wrong (checked by swapping inelixirx).Checklist
.ex/.exs/.erlchecked in the editor)🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Highlights Elixir and Erlang source files in the file editor instead of showing them as plain text or opening them as media.
ex/exstoelixiranderl/hrltoerlangin theLanguageCatalog..exsto Logic'scom.apple.logic.exsUTI, which conforms toaudiovisualContentand previously opened Elixir scripts as media, so a text.exsopens in the editor while a binary Logic.exskeeps the media route..heexand.eexunmapped because highlight.js has no grammar for them and forcing a language would mis-color templates.Tests cover both the new mappings and the preview routing.
Written for commit 70a22d5. Summary will update on new commits.
Summary by CodeRabbit
.ex,.exs) and Erlang files (.erl,.hrl).Changelog
Added: The file editor highlights Elixir (.ex, .exs) and Erlang (.erl, .hrl) files