Skip to content

Commit 4aebaaf

Browse files
authored
feat(tui): add syntax highlighting for kotlin, hcl, lua, toml (#18198)
1 parent 77b3b46 commit 4aebaaf

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

packages/opencode/parsers-config.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,14 @@ export default {
101101
],
102102
},
103103
},
104+
{
105+
filetype: "kotlin",
106+
wasm: "https://github.com/fwcd/tree-sitter-kotlin/releases/download/0.3.8/tree-sitter-kotlin.wasm",
107+
queries: {
108+
highlights: ["https://raw.githubusercontent.com/fwcd/tree-sitter-kotlin/0.3.8/queries/highlights.scm"],
109+
locals: ["https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/master/queries/kotlin/locals.scm"],
110+
},
111+
},
104112
{
105113
filetype: "ruby",
106114
wasm: "https://github.com/tree-sitter/tree-sitter-ruby/releases/download/v0.23.1/tree-sitter-ruby.wasm",
@@ -158,6 +166,15 @@ export default {
158166
// },
159167
// },
160168
},
169+
{
170+
filetype: "hcl",
171+
wasm: "https://github.com/tree-sitter-grammars/tree-sitter-hcl/releases/download/v1.2.0/tree-sitter-hcl.wasm",
172+
queries: {
173+
highlights: [
174+
"https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/master/queries/hcl/highlights.scm",
175+
],
176+
},
177+
},
161178
{
162179
filetype: "json",
163180
wasm: "https://github.com/tree-sitter/tree-sitter-json/releases/download/v0.24.8/tree-sitter-json.wasm",
@@ -203,6 +220,16 @@ export default {
203220
],
204221
},
205222
},
223+
{
224+
filetype: "lua",
225+
wasm: "https://github.com/tree-sitter-grammars/tree-sitter-lua/releases/download/v0.5.0/tree-sitter-lua.wasm",
226+
queries: {
227+
highlights: [
228+
"https://raw.githubusercontent.com/tree-sitter-grammars/tree-sitter-lua/v0.5.0/queries/highlights.scm",
229+
],
230+
locals: ["https://raw.githubusercontent.com/tree-sitter-grammars/tree-sitter-lua/v0.5.0/queries/locals.scm"],
231+
},
232+
},
206233
{
207234
filetype: "ocaml",
208235
wasm: "https://github.com/tree-sitter/tree-sitter-ocaml/releases/download/v0.24.2/tree-sitter-ocaml.wasm",
@@ -236,6 +263,15 @@ export default {
236263
],
237264
},
238265
},
266+
{
267+
filetype: "toml",
268+
wasm: "https://github.com/tree-sitter-grammars/tree-sitter-toml/releases/download/v0.7.0/tree-sitter-toml.wasm",
269+
queries: {
270+
highlights: [
271+
"https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/master/queries/toml/highlights.scm",
272+
],
273+
},
274+
},
239275
{
240276
filetype: "nix",
241277
// TODO: Replace with official tree-sitter-nix WASM when published

0 commit comments

Comments
 (0)