Skip to content

Commit 905d632

Browse files
committed
feat(highlight): add nix syntax highlighting (anomalyco#6386)
1 parent bd8c6dd commit 905d632

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
@@ -249,5 +249,19 @@ export default {
249249
],
250250
},
251251
},
252+
{
253+
filetype: "nix",
254+
// TODO: Replace with official tree-sitter-nix WASM when published
255+
// See: https://github.com/nix-community/tree-sitter-nix/issues/66
256+
wasm: "https://github.com/ast-grep/ast-grep.github.io/raw/40b84530640aa83a0d34a20a2b0623d7b8e5ea97/website/public/parsers/tree-sitter-nix.wasm",
257+
queries: {
258+
highlights: [
259+
"https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/refs/heads/master/queries/nix/highlights.scm",
260+
],
261+
locals: [
262+
"https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/refs/heads/master/queries/nix/locals.scm",
263+
],
264+
},
265+
},
252266
],
253267
}

0 commit comments

Comments
 (0)