Skip to content

Commit a5564f7

Browse files
authored
feat: add Swift syntax highlighting support (#4434)
1 parent a15c97b commit a5564f7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

packages/opencode/parsers-config.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,5 +212,19 @@ export default {
212212
],
213213
},
214214
},
215+
{
216+
filetype: "swift",
217+
wasm: "https://github.com/alex-pinkus/tree-sitter-swift/releases/download/0.7.1/tree-sitter-swift.wasm",
218+
queries: {
219+
highlights: [
220+
// NOTE: Using parser repo queries instead of nvim-treesitter due to incompatible #lua-match? predicates
221+
// "https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/refs/heads/master/queries/highlights.scm
222+
"https://raw.githubusercontent.com/alex-pinkus/tree-sitter-swift/main/queries/highlights.scm",
223+
],
224+
locals: [
225+
"https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/refs/heads/master/queries/swift/locals.scm",
226+
],
227+
},
228+
},
215229
],
216230
}

0 commit comments

Comments
 (0)