-
Notifications
You must be signed in to change notification settings - Fork 6
feat: support langalias #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -24,11 +24,5 @@ | |||
"changesets-changelog-clean": "^1.3.0", | |||
"typescript": "^5.8.2" | |||
}, | |||
"packageManager": "pnpm@10.4.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got some errors trying to install this version with checksums so updated it
"pnpm": { | ||
"onlyBuiltDependencies": [ | ||
"@biomejs/biome", | ||
"esbuild" | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these options can now live in pnpm-workspace in case you're wondering where they went 😅
Thanks for the PR! This looks good so far, but we need to pass
Should be fully functional with these changes :) |
code, | ||
language: 'golang', | ||
langAlias: { | ||
golang: 'go', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn’t go recognized as an alias for golang by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually it looks like go is the primary identifier for golang in shiki - https://shiki.style/languages. Does golang work as an identifier for go? I don't think it would judging by go.json in shiki-textmate-themes-grammars repo, but can't test at the moment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our usecase for this was that LLMs sometimes output \
``golang` headers for codeblocks and those weren't getting formatted. The alias here just makes it so golang gets passed to the go language spec
() => | ||
resolveLanguage( | ||
stableLang, | ||
stableOpts.customLanguages as never, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why cast as never?
No description provided.