Add syntax highlighting for 8 common languages - #4461
Open
ChrisjanWust wants to merge 4 commits into
Open
Conversation
Contributor
|
| Filename | Overview |
|---|---|
| packages/highlight/src/parsers.ts | Registers existing CodeMirror tokenizers for the requested extensions using the established language-registry pattern. |
| packages/highlight/src/tests/highlighter.test.ts | Adds behavior-level smoke tests confirming each new tokenizer emits expected syntax styles. |
| packages/highlight/src/tests/parsers.test.ts | Verifies support detection and extension enumeration for all newly registered extensions. |
Reviews (1): Last reviewed commit: "feat(highlight): add seven common langua..." | Re-trigger Greptile
12 tasks
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.
Linked issue
None.
Type of change
Reasoning
Configuration files, scripts, and queries in these languages currently appear without syntax highlighting. Registering the existing tokenizers makes them easier to read in Paseo’s editor, source viewer, and diffs.
Goals
.toml,.sh,.bash,.zsh,.sql,.rb,.kt,.kts,.ps1,.psm1,.lua, and.proto.Non-goals
.sqluses the standard SQL tokenizer.QA
Ran the focused highlighting and language registry tests:
Each new language has a smoke test exercising its actual tokenizer. Tests failed before registration and passed afterward. Kept per-language tests small and unspecific.
Also passed:
npm run build:servernpm run typechecknpm run lintnpm run formatThe macOS dev desktop app launched successfully alongside the installed app using separate daemon ports and runtime state.
I then manually checked one representative fixture in
tmp/for each extension:.toml,.sh,.bash,.zsh,.sql,.rb,.kt,.kts,.ps1,.psm1,.lua, and.proto. Highlighting worked in every file.The fixtures exercise declarations, strings, functions, conditionals, shell variables, SQL statements, and protocol definitions. The Lua fixture also covers tables, locals, a function, a loop, conditionals, string formatting, and function calls.
During fixture preparation:
npm run formatcompleted without changing tracked files outsidetmp/.npm run lintpassed with 0 warnings and 0 errors.npm run typecheckwas blocked by missing checkout dependencies or generated packages, includingzod-aot,@types/node, and CodeMirror packages. The earlier implementation checks listed above passed; this later attempt did not complete.A subsequent check in the implementation checkout passed both
npm run typecheckandnpm run lint. The fixture checks were performed by me, a human.Created a couple of files; all of them render correctly:
Checklist
npm run typecheckpasses — verified in the implementation checkout; fixture checkout limitation noted abovenpm run lintpassesnpm run formatpasses