Skip to content

Commit

Permalink
chore: switch nixpkgs to nixos-unstable, treefmt
Browse files Browse the repository at this point in the history
also adds some common excludes to treefmt
  • Loading branch information
nazarewk committed Oct 25, 2024
1 parent 03ad54b commit d13782e
Show file tree
Hide file tree
Showing 14 changed files with 320 additions and 216 deletions.
10 changes: 5 additions & 5 deletions .devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"image": "std-vscode",
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
}
}
"image": "std-vscode",
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
}
}
1 change: 1 addition & 0 deletions .github/workflows/update-subflake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ nix store add-path --name source .

# update the subflake lockfile to the (now existing) store path
(cd ./src/local && nix flake lock --update-input std && git add -f flake.lock)
(cd ./src/mdbook && nix flake lock --update-input std && git add -f flake.lock)
(cd ./src/tests && nix flake lock --update-input std && git add -f flake.lock)
# continue normally ...
88 changes: 44 additions & 44 deletions docs/theme/highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ var hljs = (function () {
? e
: n
: "start" === n[0].event
? e
: n
? e
: n
: e.length
? e
: n;
? e
: n;
}
function c(e) {
s +=
Expand Down Expand Up @@ -281,7 +281,7 @@ var hljs = (function () {
0 !== e.index && n.ignoreMatch();
},
},
e
e,
)
);
},
Expand Down Expand Up @@ -348,10 +348,10 @@ var hljs = (function () {
return n
? +n
: (function (e) {
return N.includes(e.toLowerCase());
})(e)
? 0
: 1;
return N.includes(e.toLowerCase());
})(e)
? 0
: 1;
}
const R = t,
y = r,
Expand Down Expand Up @@ -464,7 +464,7 @@ var hljs = (function () {
r.endSameAsBegin &&
(r.endRe = RegExp(
t.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"),
"m"
"m",
)),
r.skip
? (A += t)
Expand All @@ -481,7 +481,7 @@ var hljs = (function () {
i +
'" for mode "' +
(y.className || "<unnamed>") +
'"'
'"',
);
throw ((e.mode = y), e);
}
Expand Down Expand Up @@ -529,7 +529,7 @@ var hljs = (function () {
if ("illegal" === r.type && "" === i) return 1;
if (B > 1e5 && B > 3 * r.index)
throw Error(
"potential infinite loop, way more iterations than matches"
"potential infinite loop, way more iterations than matches",
);
return (A += i), i.length;
}
Expand All @@ -543,7 +543,7 @@ var hljs = (function () {
function n(n, t) {
return RegExp(
d(n),
"m" + (e.case_insensitive ? "i" : "") + (t ? "g" : "")
"m" + (e.case_insensitive ? "i" : "") + (t ? "g" : ""),
);
}
class t {
Expand Down Expand Up @@ -593,7 +593,7 @@ var hljs = (function () {
}
return a;
})(e),
!0
!0,
)),
(this.lastIndex = 0);
}
Expand Down Expand Up @@ -649,7 +649,7 @@ var hljs = (function () {
}
if (e.contains && e.contains.includes("self"))
throw Error(
"ERR: contains `self` is not supported at the top-level of a language. See documentation."
"ERR: contains `self` is not supported at the top-level of a language. See documentation.",
);
return (function t(s, o) {
const l = s;
Expand Down Expand Up @@ -683,7 +683,7 @@ var hljs = (function () {
s.lexemes && c)
)
throw Error(
"ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) "
"ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ",
);
return (
(l.keywordPatternRe = n(s.lexemes || c || /\w+/, !0)),
Expand Down Expand Up @@ -718,15 +718,15 @@ var hljs = (function () {
e.cached_variants
? e.cached_variants
: (function e(n) {
return !!n && (n.endsWithParent || e(n.starts));
})(e)
? r(e, { starts: e.starts ? r(e.starts) : null })
: Object.isFrozen(e)
? r(e)
: e
return !!n && (n.endsWithParent || e(n.starts));
})(e)
? r(e, { starts: e.starts ? r(e.starts) : null })
: Object.isFrozen(e)
? r(e)
: e
);
})("self" === e ? s : e);
})
}),
)),
s.contains.forEach(function (e) {
t(e, l);
Expand All @@ -736,7 +736,7 @@ var hljs = (function () {
const n = new a();
return (
e.contains.forEach((e) =>
n.addRule(e.begin, { rule: e, type: "begin" })
n.addRule(e.begin, { rule: e, type: "begin" }),
),
e.terminator_end &&
n.addRule(e.terminator_end, { type: "end" }),
Expand Down Expand Up @@ -847,8 +847,8 @@ var hljs = (function () {
? "<br>"
: e
: f.tabReplace
? e.replace(/\t/g, f.tabReplace)
: e
? e.replace(/\t/g, f.tabReplace)
: e,
)
: e;
}
Expand All @@ -865,7 +865,7 @@ var hljs = (function () {
(console.warn(g.replace("{}", t[1])),
console.warn(
"Falling back to no-highlight mode for this block.",
e
e,
)),
r ? t[1] : "no-highlight"
);
Expand Down Expand Up @@ -957,8 +957,8 @@ var hljs = (function () {
(console.error(
"Language definition for '{}' could not be registered.".replace(
"{}",
e
)
e,
),
),
!l)
)
Expand All @@ -979,7 +979,7 @@ var hljs = (function () {
var n = T(e);
if (n) return n;
throw Error(
"The '{}' language is required, but not loaded.".replace("{}", e)
"The '{}' language is required, but not loaded.".replace("{}", e),
);
},
autoDetection: I,
Expand Down Expand Up @@ -1127,7 +1127,7 @@ hljs.registerLanguage(
],
};
};
})()
})(),
);
hljs.registerLanguage(
"markdown",
Expand Down Expand Up @@ -1252,7 +1252,7 @@ hljs.registerLanguage(
}
);
};
})()
})(),
);
hljs.registerLanguage(
"perl",
Expand Down Expand Up @@ -1347,7 +1347,7 @@ hljs.registerLanguage(
{ name: "Perl", aliases: ["pl", "pm"], keywords: n, contains: a }
);
};
})()
})(),
);
hljs.registerLanguage(
"plaintext",
Expand All @@ -1360,7 +1360,7 @@ hljs.registerLanguage(
disableAutodetect: !0,
};
};
})()
})(),
);
hljs.registerLanguage(
"ini",
Expand Down Expand Up @@ -1427,15 +1427,15 @@ hljs.registerLanguage(
"(\\s*\\.\\s*",
g,
")*",
n("(?=", /\s*=\s*[^#\s]/, ")")
n("(?=", /\s*=\s*[^#\s]/, ")"),
),
className: "attr",
starts: { end: /$/, contains: [i, c, r, t, l, s] },
},
],
};
};
})()
})(),
);
hljs.registerLanguage(
"json",
Expand Down Expand Up @@ -1481,7 +1481,7 @@ hljs.registerLanguage(
{ name: "JSON", contains: t, keywords: e, illegal: "\\S" }
);
};
})()
})(),
);
hljs.registerLanguage(
"ruby",
Expand Down Expand Up @@ -1626,7 +1626,7 @@ hljs.registerLanguage(
contains: r.concat(g).concat(d),
};
};
})()
})(),
);
hljs.registerLanguage(
"yaml",
Expand Down Expand Up @@ -1737,7 +1737,7 @@ hljs.registerLanguage(
}
);
};
})()
})(),
);
hljs.registerLanguage(
"haskell",
Expand Down Expand Up @@ -1837,7 +1837,7 @@ hljs.registerLanguage(
],
};
};
})()
})(),
);
hljs.registerLanguage(
"nix",
Expand Down Expand Up @@ -1876,7 +1876,7 @@ hljs.registerLanguage(
{ name: "Nix", aliases: ["nixos"], keywords: n, contains: s }
);
};
})()
})(),
);
hljs.registerLanguage(
"bash",
Expand Down Expand Up @@ -1953,7 +1953,7 @@ hljs.registerLanguage(
],
};
};
})()
})(),
);
hljs.registerLanguage(
"shell",
Expand All @@ -1972,7 +1972,7 @@ hljs.registerLanguage(
],
};
};
})()
})(),
);
hljs.registerLanguage(
"python",
Expand Down Expand Up @@ -2092,5 +2092,5 @@ hljs.registerLanguage(
}
);
};
})()
})(),
);
Loading

0 comments on commit d13782e

Please sign in to comment.