Skip to content

feat(tui): add syntax highlighting for kotlin, hcl, lua, toml#18198

Merged
kommander merged 1 commit intoanomalyco:devfrom
2KAbhishek:feat/add-kotlin-hcl-lua-toml-highlighting
Mar 23, 2026
Merged

feat(tui): add syntax highlighting for kotlin, hcl, lua, toml#18198
kommander merged 1 commit intoanomalyco:devfrom
2KAbhishek:feat/add-kotlin-hcl-lua-toml-highlighting

Conversation

@2KAbhishek
Copy link
Copy Markdown
Contributor

@2KAbhishek 2KAbhishek commented Mar 19, 2026

Issue for this PR

Closes #18197

Type of change

  • New feature

What does this PR do?

Adds Tree-sitter parser support for syntax highlighting in the TUI for kotlin, hcl, lua, and toml. Each language now has proper syntax highlighting when used in fenced code blocks and in diffs.

  • kotlin: fwcd/tree-sitter-kotlin
  • hcl: tree-sitter-grammars/tree-sitter-hcl
  • lua: tree-sitter-grammars/tree-sitter-lua
  • toml: tree-sitter-grammars/tree-sitter-toml

Wasm binaries are from official tree-sitter releases, queries from nvim-treesitter.

How did you verify your code works?

Tested kotlin, hcl, lua, and toml fenced code blocks in the TUI after restart. Typecheck passes (bun typecheck).

Screenshots / recordings

Before

before-fix-opencode

After

after-fix-opencode

Checklist

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

@github-actions github-actions bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Mar 19, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@kommander kommander merged commit 4aebaaf into anomalyco:dev Mar 23, 2026
15 checks passed
Andres77872 pushed a commit to Andres77872/opencode that referenced this pull request Mar 26, 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]: Add syntax highlighting support for Kotlin, HCL, Lua, and TOML

2 participants