summaryrefslogtreecommitdiff
path: root/core/grammar_manifest.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-21 05:29:51 -0300
committerGabriel Schneider <[email protected]>2026-11-21 05:29:51 -0300
commit63538d28cee238ff53c731f965c22e615d43bec1 (patch)
treefb00203f05512a9f14d0e8089a2f4b1919edffc9 /core/grammar_manifest.zig
parent638122f18a66669c433e332c91fc8b068019681e (diff)
parentd04f4acfb9af968caaa53d6cf10a486622c95400 (diff)
downloadpardes-63538d28cee238ff53c731f965c22e615d43bec1.tar.gz
pardes-63538d28cee238ff53c731f965c22e615d43bec1.zip
integration: the library for a browser reader on the gathered line: pardes-syntax-lib (`wqlkznns`: a dependent package names its languages, the patch view without the editor as formatPatch, build.zig's wasmModule and abi/wasm.zig, the manual) and pardes-reorg (`ukkqwpqu`: the terminals' line, the wire at 26); no conflict; its gate: .scratch/sketch/reorg/merge47, the numbers in PARDES.md (2026-11-21)
Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'core/grammar_manifest.zig')
-rw-r--r--core/grammar_manifest.zig8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/grammar_manifest.zig b/core/grammar_manifest.zig
index b4ff30b9..b0ce146c 100644
--- a/core/grammar_manifest.zig
+++ b/core/grammar_manifest.zig
@@ -17,6 +17,12 @@ pub const Grammar = struct {
query: []const u8 = "queries/highlights.scm",
/// Patterns appended to the highlights query before it is filtered.
highlights_extra: []const u8 = "",
+ /// The grammars it cannot work without, compiled in with it when a
+ /// package names it alone (build.zig's `languages`). Only markdown has
+ /// one: its inline grammar. A fence's or a raw block's language
+ /// (markdown's, typst's) is coloured when it is in the build and left
+ /// plain when it is not.
+ needs: []const []const u8 = &.{},
};
pub const all = [_]Grammar{
@@ -38,7 +44,7 @@ pub const all = [_]Grammar{
.{ .name = "json", .dep = "ts_json", .exts = &.{".json"}, .tier = .full },
.{ .name = "kotlin", .dep = "ts_kotlin", .exts = &.{ ".kt", ".kts" }, .tier = .full, .scanner = true },
.{ .name = "ocaml", .dep = "ts_ocaml", .exts = &.{ ".ml", ".mli" }, .tier = .full, .src = "grammars/ocaml/src", .scanner = true },
- .{ .name = "markdown", .dep = "ts_markdown", .exts = &.{ ".md", ".markdown" }, .tier = .full, .src = "tree-sitter-markdown/src", .scanner = true, .query = "tree-sitter-markdown/queries/highlights.scm" },
+ .{ .name = "markdown", .dep = "ts_markdown", .exts = &.{ ".md", ".markdown" }, .tier = .full, .src = "tree-sitter-markdown/src", .scanner = true, .query = "tree-sitter-markdown/queries/highlights.scm", .needs = &.{"markdown_inline"} },
// Second grammar off the SAME dep: the split_parser markdown repo ships a
// block parser and an inline parser, and bold/italic/code-span live only in
// the inline one. `.exts` is empty because no filename ever selects it — the