Browse Source

add default diff parser for markdown fenced code blocks (#26887)

Sebastian 5 months ago
parent
commit
d821650b48
1 changed files with 8 additions and 0 deletions
  1. 8 0
      packages/opencode/parsers-config.ts

+ 8 - 0
packages/opencode/parsers-config.ts

@@ -286,5 +286,13 @@ export default {
         ],
         ],
       },
       },
     },
     },
+    {
+      filetype: "diff",
+      aliases: ["udiff", "patch"],
+      wasm: "https://github.com/tree-sitter-grammars/tree-sitter-diff/releases/download/v0.1.0/tree-sitter-diff.wasm",
+      queries: {
+        highlights: ["https://raw.githubusercontent.com/tree-sitter-grammars/tree-sitter-diff/master/queries/highlights.scm"],
+      },
+    },
   ],
   ],
 }
 }