GeezerVison is showing github.com — feat(tui): add syntax highlighting for kotlin, hcl, lua, toml (#18198) · msis/opencode@4aebaaf
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: packages/opencode/parsers-config.ts +36Lines changed: 36 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -101,6 +101,14 @@ export default { | 101 | 101 | ], | 102 | 102 | }, | 103 | 103 | }, | | 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 | + }, | 104 | 112 | { | 105 | 113 | filetype: "ruby", | 106 | 114 | wasm: "https://github.com/tree-sitter/tree-sitter-ruby/releases/download/v0.23.1/tree-sitter-ruby.wasm", | @@ -158,6 +166,15 @@ export default { | 158 | 166 | // }, | 159 | 167 | // }, | 160 | 168 | }, | | 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 | + }, | 161 | 178 | { | 162 | 179 | filetype: "json", | 163 | 180 | wasm: "https://github.com/tree-sitter/tree-sitter-json/releases/download/v0.24.8/tree-sitter-json.wasm", | @@ -203,6 +220,16 @@ export default { | 203 | 220 | ], | 204 | 221 | }, | 205 | 222 | }, | | 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 | + }, | 206 | 233 | { | 207 | 234 | filetype: "ocaml", | 208 | 235 | wasm: "https://github.com/tree-sitter/tree-sitter-ocaml/releases/download/v0.24.2/tree-sitter-ocaml.wasm", | @@ -236,6 +263,15 @@ export default { | 236 | 263 | ], | 237 | 264 | }, | 238 | 265 | }, | | 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 | + }, | 239 | 275 | { | 240 | 276 | filetype: "nix", | 241 | 277 | // TODO: Replace with official tree-sitter-nix WASM when published | |
|