Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/cyan-bats-shave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@code-hike/lighter": patch
---

Update to tm-grammars v1.24.18
2 changes: 1 addition & 1 deletion lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
6 changes: 6 additions & 0 deletions lib/src/dynamic-imports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ export async function importGrammar(langId: string): Promise<any> {
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":
Expand Down Expand Up @@ -418,6 +420,8 @@ export async function importGrammar(langId: string): Promise<any> {
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":
Expand All @@ -428,6 +432,8 @@ export async function importGrammar(langId: string): Promise<any> {
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":
Expand Down
112 changes: 83 additions & 29 deletions lib/src/language-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ export const LANG_NAMES = [
"liquid",
"lisp",
"lit",
"llvm",
"log",
"logo",
"lua",
Expand Down Expand Up @@ -290,13 +291,15 @@ export const LANG_NAMES = [
"vimscript",
"vue",
"vue-html",
"vue-vine",
"vy",
"vyper",
"wasm",
"wenyan",
"wgsl",
"wiki",
"wikitext",
"wit",
"wl",
"wolfram",
"xml",
Expand Down Expand Up @@ -420,6 +423,7 @@ export type LanguageName =
| "lean"
| "less"
| "liquid"
| "llvm"
| "log"
| "logo"
| "lua"
Expand Down Expand Up @@ -519,11 +523,13 @@ export type LanguageName =
| "viml"
| "vue"
| "vue-html"
| "vue-vine"
| "vyper"
| "wasm"
| "wenyan"
| "wgsl"
| "wikitext"
| "wit"
| "wolfram"
| "xml"
| "xsl"
Expand Down Expand Up @@ -640,6 +646,7 @@ export type ScopeName =
| "source.lean4"
| "source.css.less"
| "text.html.liquid"
| "source.llvm"
| "text.log"
| "source.logo"
| "source.lua"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -906,6 +915,7 @@ export const aliasOrIdToScope: Record<LanguageAlias, ScopeName> = {
"lean4": "source.lean4",
"less": "source.css.less",
"liquid": "text.html.liquid",
"llvm": "source.llvm",
"log": "text.log",
"logo": "source.logo",
"lua": "source.lua",
Expand Down Expand Up @@ -1044,6 +1054,7 @@ export const aliasOrIdToScope: Record<LanguageAlias, ScopeName> = {
"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",
Expand All @@ -1053,6 +1064,7 @@ export const aliasOrIdToScope: Record<LanguageAlias, ScopeName> = {
"wikitext": "source.wikitext",
"mediawiki": "source.wikitext",
"wiki": "source.wikitext",
"wit": "source.wit",
"wolfram": "source.wolfram",
"wl": "source.wolfram",
"xml": "text.xml",
Expand Down Expand Up @@ -1117,44 +1129,62 @@ export const scopeToLanguageData: Record<ScopeName, LanguageData> = {
"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": {
Expand Down Expand Up @@ -1207,6 +1237,7 @@ export const scopeToLanguageData: Record<ScopeName, LanguageData> = {
"text.html.php.blade": {
"id": "blade",
"embeddedScopes": [
"text.html.derivative",
"text.html.basic",
"text.xml",
"source.sql",
Expand Down Expand Up @@ -1380,7 +1411,9 @@ export const scopeToLanguageData: Record<ScopeName, LanguageData> = {
},
"source.erlang": {
"id": "erlang",
"embeddedScopes": []
"embeddedScopes": [
"text.html.markdown"
]
},
"source.fnl": {
"id": "fennel",
Expand Down Expand Up @@ -1575,9 +1608,7 @@ export const scopeToLanguageData: Record<ScopeName, LanguageData> = {
},
"source.imba": {
"id": "imba",
"embeddedScopes": [
"source.ts"
]
"embeddedScopes": []
},
"source.ini": {
"id": "ini",
Expand Down Expand Up @@ -1686,6 +1717,10 @@ export const scopeToLanguageData: Record<ScopeName, LanguageData> = {
"source.js"
]
},
"source.llvm": {
"id": "llvm",
"embeddedScopes": []
},
"text.log": {
"id": "log",
"embeddedScopes": []
Expand Down Expand Up @@ -1741,6 +1776,7 @@ export const scopeToLanguageData: Record<ScopeName, LanguageData> = {
"source.js",
"source.json",
"source.json.comments",
"source.json.lines",
"source.css.less",
"source.objc",
"source.swift",
Expand All @@ -1764,6 +1800,8 @@ export const scopeToLanguageData: Record<ScopeName, LanguageData> = {
"source.elixir",
"text.tex.latex",
"text.bibtex",
"source.abap",
"source.rst",
"text.html.derivative"
]
},
Expand All @@ -1773,7 +1811,7 @@ export const scopeToLanguageData: Record<ScopeName, LanguageData> = {
"source.css",
"source.css.less",
"source.css.scss",
"source.js"
"source.ts"
]
},
"source.matlab": {
Expand Down Expand Up @@ -2285,7 +2323,6 @@ export const scopeToLanguageData: Record<ScopeName, LanguageData> = {
"source.vue": {
"id": "vue",
"embeddedScopes": [
"text.html.basic",
"text.html.markdown",
"text.pug",
"source.stylus",
Expand All @@ -2304,7 +2341,8 @@ export const scopeToLanguageData: Record<ScopeName, LanguageData> = {
"source.yaml",
"source.toml",
"source.graphql",
"text.html.derivative"
"text.html.derivative",
"text.html.basic"
]
},
"text.html.vue-html": {
Expand All @@ -2314,6 +2352,18 @@ export const scopeToLanguageData: Record<ScopeName, LanguageData> = {
"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": []
Expand Down Expand Up @@ -2384,6 +2434,10 @@ export const scopeToLanguageData: Record<ScopeName, LanguageData> = {
"source.json"
]
},
"source.wit": {
"id": "wit",
"embeddedScopes": []
},
"source.wolfram": {
"id": "wolfram",
"embeddedScopes": []
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down