Skip to content

Add syntax highlighting for 8 common languages - #2

Merged
ChrisjanWust merged 4 commits into
mainfrom
feat/more-language-highlighting
Sep 8, 2026
Merged

Add syntax highlighting for 8 common languages#2
ChrisjanWust merged 4 commits into
mainfrom
feat/more-language-highlighting

Conversation

@ChrisjanWust

Copy link
Copy Markdown
Owner

Linked issue

Mirrors upstream PR getpaseo#4461.

Type of change

  • Bug fix
  • New feature
  • Enhancement
  • Refactor
  • Docs

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

  • Add highlighting for TOML, Shell, SQL, Ruby, Kotlin, PowerShell, Lua, and Protocol Buffers.
  • Recognize .toml, .sh, .bash, .zsh, .sql, .rb, .kt, .kts, .ps1, .psm1, .lua, and .proto.
  • Reuse existing dependencies and syntax colors.
  • Follow the existing language registration and test patterns.

Non-goals

  • Validation, autocomplete, or formatting.
  • Filename or shebang detection for extensionless scripts.
  • Extending the bundled tokenizers’ syntax coverage.
  • SQL dialect selection; .sql uses the standard SQL tokenizer.

QA

Ran the focused highlighting and language registry tests:

npx vitest run packages/highlight/src/__tests__/highlighter.test.ts packages/highlight/src/__tests__/parsers.test.ts --bail=1

Test Files  2 passed (2)
     Tests  35 passed (35)

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:server
  • npm run typecheck
  • npm run lint
  • npm run format

The 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 format completed without changing tracked files outside tmp/.
  • npm run lint passed with 0 warnings and 0 errors.
  • npm run typecheck was blocked by missing checkout dependencies or generated packages, including zod-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 typecheck and npm run lint. The fixture checks were performed by me, a human.

image

Created a couple of files; all of them render correctly:

92034

Checklist

  • Plugin changes follow the SDK import boundaries (if applicable) — N/A
  • One focused change
  • npm run typecheck passes — verified in the implementation checkout; fixture checkout limitation noted above
  • npm run lint passes
  • npm run format passes
  • QA evidence — automated results and human fixture checks documented, screenshots attached
  • Tests added or updated where it made sense

@ChrisjanWust
ChrisjanWust merged commit 79cfaca into main Sep 8, 2026
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.

1 participant