Skip to content

Commit

Permalink
Merge pull request #48 from vkarpov15/vkarpov15/feat-add-polar
Browse files Browse the repository at this point in the history
upgrade tm-grammars to v1.22.0 for polar support
  • Loading branch information
pomber authored Dec 31, 2024
2 parents 319283c + be24a91 commit 8a4e90e
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/perfect-buttons-do.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@code-hike/lighter": patch
---

add Polar grammar
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.21.10"
"tm-grammars": "^1.22.0"
}
}
2 changes: 2 additions & 0 deletions lib/src/dynamic-imports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,8 @@ export async function importGrammar(langId: string): Promise<any> {
return import("tm-grammars/grammars/plsql.json");
case "po":
return import("tm-grammars/grammars/po.json");
case "polar":
return import("tm-grammars/grammars/polar.json");
case "postcss":
return import("tm-grammars/grammars/postcss.json");
case "powerquery":
Expand Down
8 changes: 8 additions & 0 deletions lib/src/language-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ export const LANG_NAMES = [
"php",
"plsql",
"po",
"polar",
"postcss",
"pot",
"potx",
Expand Down Expand Up @@ -447,6 +448,7 @@ export type LanguageName =
| "php"
| "plsql"
| "po"
| "polar"
| "postcss"
| "powerquery"
| "powershell"
Expand Down Expand Up @@ -666,6 +668,7 @@ export type ScopeName =
| "source.php"
| "source.plsql.oracle"
| "source.po"
| "source.polar"
| "source.css.postcss"
| "source.powerquery"
| "source.powershell"
Expand Down Expand Up @@ -941,6 +944,7 @@ export const aliasOrIdToScope: Record<LanguageAlias, ScopeName> = {
"po": "source.po",
"pot": "source.po",
"potx": "source.po",
"polar": "source.polar",
"postcss": "source.css.postcss",
"powerquery": "source.powerquery",
"powershell": "source.powershell",
Expand Down Expand Up @@ -1926,6 +1930,10 @@ export const scopeToLanguageData: Record<ScopeName, LanguageData> = {
"id": "po",
"embeddedScopes": []
},
"source.polar": {
"id": "polar",
"embeddedScopes": []
},
"source.css.postcss": {
"id": "postcss",
"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.21.10:
version "1.21.10"
resolved "https://registry.yarnpkg.com/tm-grammars/-/tm-grammars-1.21.10.tgz#978b2fa8ceea6bda6df39bf888af0e216cd0e909"
integrity sha512-0TSAeQ90vvh0xRGdLw/HZG3K4M9gE1rwhGDB29QtoA5h2eRRD8tlGwukBJKx/y23l9EDbMP3+2QFeJqMsVOgBQ==
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==

tmp@^0.0.33:
version "0.0.33"
Expand Down

0 comments on commit 8a4e90e

Please sign in to comment.