diff options
| author | Abhishek Keshri <[email protected]> | 2026-03-23 20:45:24 +0530 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-03-23 16:15:24 +0100 |
| commit | 4aebaaf067c288917dbb04abce9b4515ef934f5f (patch) | |
| tree | 76fe2f6f41fa6ba028d660733d91bbc70a8cbc9b | |
| parent | 77b3b46788623317115ae920cf0072e54aa2643c (diff) | |
| download | opencode-4aebaaf067c288917dbb04abce9b4515ef934f5f.tar.gz opencode-4aebaaf067c288917dbb04abce9b4515ef934f5f.zip | |
feat(tui): add syntax highlighting for kotlin, hcl, lua, toml (#18198)
| -rw-r--r-- | packages/opencode/parsers-config.ts | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/packages/opencode/parsers-config.ts b/packages/opencode/parsers-config.ts index 0b10d8bbe..b4951afa2 100644 --- a/packages/opencode/parsers-config.ts +++ b/packages/opencode/parsers-config.ts @@ -102,6 +102,14 @@ export default { }, }, { + filetype: "kotlin", + wasm: "https://github.com/fwcd/tree-sitter-kotlin/releases/download/0.3.8/tree-sitter-kotlin.wasm", + queries: { + highlights: ["https://raw.githubusercontent.com/fwcd/tree-sitter-kotlin/0.3.8/queries/highlights.scm"], + locals: ["https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/master/queries/kotlin/locals.scm"], + }, + }, + { filetype: "ruby", wasm: "https://github.com/tree-sitter/tree-sitter-ruby/releases/download/v0.23.1/tree-sitter-ruby.wasm", queries: { @@ -159,6 +167,15 @@ export default { // }, }, { + filetype: "hcl", + wasm: "https://github.com/tree-sitter-grammars/tree-sitter-hcl/releases/download/v1.2.0/tree-sitter-hcl.wasm", + queries: { + highlights: [ + "https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/master/queries/hcl/highlights.scm", + ], + }, + }, + { filetype: "json", wasm: "https://github.com/tree-sitter/tree-sitter-json/releases/download/v0.24.8/tree-sitter-json.wasm", queries: { @@ -204,6 +221,16 @@ export default { }, }, { + filetype: "lua", + wasm: "https://github.com/tree-sitter-grammars/tree-sitter-lua/releases/download/v0.5.0/tree-sitter-lua.wasm", + queries: { + highlights: [ + "https://raw.githubusercontent.com/tree-sitter-grammars/tree-sitter-lua/v0.5.0/queries/highlights.scm", + ], + locals: ["https://raw.githubusercontent.com/tree-sitter-grammars/tree-sitter-lua/v0.5.0/queries/locals.scm"], + }, + }, + { filetype: "ocaml", wasm: "https://github.com/tree-sitter/tree-sitter-ocaml/releases/download/v0.24.2/tree-sitter-ocaml.wasm", queries: { @@ -237,6 +264,15 @@ export default { }, }, { + filetype: "toml", + wasm: "https://github.com/tree-sitter-grammars/tree-sitter-toml/releases/download/v0.7.0/tree-sitter-toml.wasm", + queries: { + highlights: [ + "https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/master/queries/toml/highlights.scm", + ], + }, + }, + { filetype: "nix", // TODO: Replace with official tree-sitter-nix WASM when published // See: https://github.com/nix-community/tree-sitter-nix/issues/66 |
