From 55faf3d3c4a78adee9e1e4ab880217c0d36b3ce8 Mon Sep 17 00:00:00 2001 From: Jordan Ribbink Date: Wed, 8 Oct 2025 18:37:51 -0700 Subject: [PATCH] Update to tm-grammars v1.24.18 --- .changeset/cyan-bats-shave.md | 5 ++ lib/package.json | 2 +- lib/src/dynamic-imports.ts | 6 ++ lib/src/language-data.ts | 112 +++++++++++++++++++++++++--------- yarn.lock | 8 +-- 5 files changed, 99 insertions(+), 34 deletions(-) create mode 100644 .changeset/cyan-bats-shave.md diff --git a/.changeset/cyan-bats-shave.md b/.changeset/cyan-bats-shave.md new file mode 100644 index 0000000..c41503d --- /dev/null +++ b/.changeset/cyan-bats-shave.md @@ -0,0 +1,5 @@ +--- +"@code-hike/lighter": patch +--- + +Update to tm-grammars v1.24.18 diff --git a/lib/package.json b/lib/package.json index fe857a7..1a05ba2 100644 --- a/lib/package.json +++ b/lib/package.json @@ -54,6 +54,6 @@ "funding": "https://github.com/sponsors/code-hike", "dependencies": { "ansi-sequence-parser": "1.1.1", - "tm-grammars": "^1.22.0" + "tm-grammars": "^1.24.18" } } diff --git a/lib/src/dynamic-imports.ts b/lib/src/dynamic-imports.ts index 6de27bf..2934e33 100644 --- a/lib/src/dynamic-imports.ts +++ b/lib/src/dynamic-imports.ts @@ -220,6 +220,8 @@ export async function importGrammar(langId: string): Promise { return import("tm-grammars/grammars/less.json"); case "liquid": return import("tm-grammars/grammars/liquid.json"); + case "llvm": + return import("tm-grammars/grammars/llvm.json"); case "log": return import("tm-grammars/grammars/log.json"); case "logo": @@ -418,6 +420,8 @@ export async function importGrammar(langId: string): Promise { return import("tm-grammars/grammars/vue.json"); case "vue-html": return import("tm-grammars/grammars/vue-html.json"); + case "vue-vine": + return import("tm-grammars/grammars/vue-vine.json"); case "vyper": return import("tm-grammars/grammars/vyper.json"); case "wasm": @@ -428,6 +432,8 @@ export async function importGrammar(langId: string): Promise { return import("tm-grammars/grammars/wgsl.json"); case "wikitext": return import("tm-grammars/grammars/wikitext.json"); + case "wit": + return import("tm-grammars/grammars/wit.json"); case "wolfram": return import("tm-grammars/grammars/wolfram.json"); case "xml": diff --git a/lib/src/language-data.ts b/lib/src/language-data.ts index c42f119..2ea98ca 100644 --- a/lib/src/language-data.ts +++ b/lib/src/language-data.ts @@ -155,6 +155,7 @@ export const LANG_NAMES = [ "liquid", "lisp", "lit", + "llvm", "log", "logo", "lua", @@ -290,6 +291,7 @@ export const LANG_NAMES = [ "vimscript", "vue", "vue-html", + "vue-vine", "vy", "vyper", "wasm", @@ -297,6 +299,7 @@ export const LANG_NAMES = [ "wgsl", "wiki", "wikitext", + "wit", "wl", "wolfram", "xml", @@ -420,6 +423,7 @@ export type LanguageName = | "lean" | "less" | "liquid" + | "llvm" | "log" | "logo" | "lua" @@ -519,11 +523,13 @@ export type LanguageName = | "viml" | "vue" | "vue-html" + | "vue-vine" | "vyper" | "wasm" | "wenyan" | "wgsl" | "wikitext" + | "wit" | "wolfram" | "xml" | "xsl" @@ -640,6 +646,7 @@ export type ScopeName = | "source.lean4" | "source.css.less" | "text.html.liquid" + | "source.llvm" | "text.log" | "source.logo" | "source.lua" @@ -739,11 +746,13 @@ export type ScopeName = | "source.viml" | "source.vue" | "text.html.vue-html" + | "source.vue-vine" | "source.vyper" | "source.wat" | "source.wenyan" | "source.wgsl" | "source.wikitext" + | "source.wit" | "source.wolfram" | "text.xml" | "text.xml.xsl" @@ -906,6 +915,7 @@ export const aliasOrIdToScope: Record = { "lean4": "source.lean4", "less": "source.css.less", "liquid": "text.html.liquid", + "llvm": "source.llvm", "log": "text.log", "logo": "source.logo", "lua": "source.lua", @@ -1044,6 +1054,7 @@ export const aliasOrIdToScope: Record = { "vimscript": "source.viml", "vue": "source.vue", "vue-html": "text.html.vue-html", + "vue-vine": "source.vue-vine", "vyper": "source.vyper", "vy": "source.vyper", "wasm": "source.wat", @@ -1053,6 +1064,7 @@ export const aliasOrIdToScope: Record = { "wikitext": "source.wikitext", "mediawiki": "source.wikitext", "wiki": "source.wikitext", + "wit": "source.wit", "wolfram": "source.wolfram", "wl": "source.wolfram", "xml": "text.xml", @@ -1117,44 +1129,62 @@ export const scopeToLanguageData: Record = { "text.html.basic", "source.yaml", "text.csv", - "source.c", + "source.css", + "source.ini", + "source.java", + "source.lua", + "source.makefile", + "source.perl", + "source.r", + "source.ruby", + "source.php", + "source.sql", + "source.asp.vb.net", + "text.xml", + "text.xml.xsl", + "source.batchfile", "source.clojure", "source.coffee", + "source.c", "source.cpp", - "source.css", - "source.cs", "source.diff", "source.dockerfile", - "source.elixir", - "source.elm", - "source.erlang", + "text.git-commit", + "text.git-rebase", "source.go", "source.groovy", - "source.haskell", - "source.java", + "text.pug", "source.js", "source.json", - "source.js.jsx", - "source.julia", - "source.kotlin", + "source.json.comments", "source.css.less", - "source.makefile", "source.objc", - "source.ocaml", - "source.perl", + "source.swift", + "source.css.scss", + "source.perl.6", + "source.powershell", "source.python", - "source.r", - "source.ruby", + "source.julia", + "source.regexp.python", "source.rust", - "source.sass", "source.scala", - "source.css.scss", "source.shell", - "source.sql", - "source.swift", - "source.toml", "source.ts", - "text.xml" + "source.tsx", + "source.cs", + "source.fsharp", + "source.dart", + "text.html.handlebars", + "text.html.markdown", + "text.log", + "source.erlang", + "source.elixir", + "text.tex.latex", + "text.bibtex", + "source.abap", + "source.rst", + "source.haskell", + "source.kotlin" ] }, "source.asm.x86_64": { @@ -1207,6 +1237,7 @@ export const scopeToLanguageData: Record = { "text.html.php.blade": { "id": "blade", "embeddedScopes": [ + "text.html.derivative", "text.html.basic", "text.xml", "source.sql", @@ -1380,7 +1411,9 @@ export const scopeToLanguageData: Record = { }, "source.erlang": { "id": "erlang", - "embeddedScopes": [] + "embeddedScopes": [ + "text.html.markdown" + ] }, "source.fnl": { "id": "fennel", @@ -1575,9 +1608,7 @@ export const scopeToLanguageData: Record = { }, "source.imba": { "id": "imba", - "embeddedScopes": [ - "source.ts" - ] + "embeddedScopes": [] }, "source.ini": { "id": "ini", @@ -1686,6 +1717,10 @@ export const scopeToLanguageData: Record = { "source.js" ] }, + "source.llvm": { + "id": "llvm", + "embeddedScopes": [] + }, "text.log": { "id": "log", "embeddedScopes": [] @@ -1741,6 +1776,7 @@ export const scopeToLanguageData: Record = { "source.js", "source.json", "source.json.comments", + "source.json.lines", "source.css.less", "source.objc", "source.swift", @@ -1764,6 +1800,8 @@ export const scopeToLanguageData: Record = { "source.elixir", "text.tex.latex", "text.bibtex", + "source.abap", + "source.rst", "text.html.derivative" ] }, @@ -1773,7 +1811,7 @@ export const scopeToLanguageData: Record = { "source.css", "source.css.less", "source.css.scss", - "source.js" + "source.ts" ] }, "source.matlab": { @@ -2285,7 +2323,6 @@ export const scopeToLanguageData: Record = { "source.vue": { "id": "vue", "embeddedScopes": [ - "text.html.basic", "text.html.markdown", "text.pug", "source.stylus", @@ -2304,7 +2341,8 @@ export const scopeToLanguageData: Record = { "source.yaml", "source.toml", "source.graphql", - "text.html.derivative" + "text.html.derivative", + "text.html.basic" ] }, "text.html.vue-html": { @@ -2314,6 +2352,18 @@ export const scopeToLanguageData: Record = { "source.js" ] }, + "source.vue-vine": { + "id": "vue-vine", + "embeddedScopes": [ + "source.css", + "source.css.scss", + "source.css.less", + "source.stylus", + "source.css.postcss", + "source.vue", + "source.js" + ] + }, "source.vyper": { "id": "vyper", "embeddedScopes": [] @@ -2384,6 +2434,10 @@ export const scopeToLanguageData: Record = { "source.json" ] }, + "source.wit": { + "id": "wit", + "embeddedScopes": [] + }, "source.wolfram": { "id": "wolfram", "embeddedScopes": [] diff --git a/yarn.lock b/yarn.lock index 4f05ee5..991533b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2867,10 +2867,10 @@ tinyspy@^2.2.0: resolved "https://registry.yarnpkg.com/tinyspy/-/tinyspy-2.2.0.tgz#9dc04b072746520b432f77ea2c2d17933de5d6ce" integrity sha512-d2eda04AN/cPOR89F7Xv5bK/jrQEhmcLFe6HFldoeO9AJtps+fqEnh486vnT/8y4bw38pSyxDcTCAq+Ks2aJTg== -tm-grammars@^1.22.0: - version "1.22.0" - resolved "https://registry.yarnpkg.com/tm-grammars/-/tm-grammars-1.22.0.tgz#5bba813016cad974183854a936775671f7dc3f2d" - integrity sha512-sjtT/JxrBHyHfkuLu/Fyp2FNZSVZCbroyZfRKzFQ76d3678AMKiXbUlTKdvv7uyW7ssrNP7WB+9/7iBal6P/XA== +tm-grammars@^1.24.18: + version "1.24.18" + resolved "https://registry.yarnpkg.com/tm-grammars/-/tm-grammars-1.24.18.tgz#ad516c12156a296a2d12377888eb677b2cca323a" + integrity sha512-QGeNrSfWIrxvlYE0ZFOw59V3gifDACk1NCdTcmq0smxzD0XvOS2RSOa5GKuNLaf3pt9PgKV7b85VWGtkd0yTLQ== tmp@^0.0.33: version "0.0.33"