Skip to content

Comments

feat: add language aliases for TUI syntax highlighting#14250

Open
mocksoul wants to merge 1 commit intoanomalyco:devfrom
mocksoul:feat/language-aliases-highlighting
Open

feat: add language aliases for TUI syntax highlighting#14250
mocksoul wants to merge 1 commit intoanomalyco:devfrom
mocksoul:feat/language-aliases-highlighting

Conversation

@mocksoul
Copy link

@mocksoul mocksoul commented Feb 19, 2026

Issue for this PR

Closes #12211

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds a LANGUAGE_ALIASES map to the TUI code block highlighter so that common code fence language names that don't have their own tree-sitter parser resolve to an existing one.

For example, jsonc now highlights as JSON, tsx as TypeScript, ```sh as Bash, etc.

18 aliases added: jsonc, json5, jsonl, sh, zsh, shell, c++, c#, yml, py, rb, rs, hs, js, jsx, ts, tsx, md.

How did you verify your code works?

Tested locally in TUI — code blocks with jsonc, jsx, tsx, sh and other aliased languages now render with proper syntax highlighting.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions
Copy link
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@mocksoul
Copy link
Author

I guess CI failures are unrelated to this PR — two Windows e2e tests (prompt-async-prompt...endpoint-is-unreachable and prompt-can-send-a-prompt-and-receive-a-reply) fail on all retries. All other checks pass: unit, typecheck, e2e linux, nix-eval.

ljepson pushed a commit to ljepson/opencode that referenced this pull request Feb 20, 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.

[FEATURE]: JSX and TSX syntax highlighting for markdown-injected

1 participant