feat(docs): enable syntax highlighting for go, solidity, rust, and more#65
Merged
feat(docs): enable syntax highlighting for go, solidity, rust, and more#65
Conversation
Add codeHighlight.langs config to enable highlighting for languages used in the docs: solidity, rust, go, bash, python, yaml, json. The default vocs/shiki bundle includes tsx/ts/typescript but not these domain-specific languages. Amp-Thread-ID: https://ampcode.com/threads/T-019c21fd-1fec-721f-a6ef-4b31e835508b Co-authored-by: Amp <amp@ampcode.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Amp-Thread-ID: https://ampcode.com/threads/T-019c21fd-1fec-721f-a6ef-4b31e835508b Co-authored-by: Amp <amp@ampcode.com>
The codeHighlight.langs config replaces (not extends) the default list, so we need to include all the vocs defaults plus our additional languages. Amp-Thread-ID: https://ampcode.com/threads/T-019c21fd-1fec-721f-a6ef-4b31e835508b Co-authored-by: Amp <amp@ampcode.com>
The previous vocs version (082ea99) only bundled rust and solidity on top of shiki/bundle/web. The new version adds go, python, yaml, toml, dockerfile, protobuf, and sql. Also removed the codeHighlight.langs config since it wasn't being used by the shiki plugin anyway. Amp-Thread-ID: https://ampcode.com/threads/T-019c21fd-1fec-721f-a6ef-4b31e835508b Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019c21fd-1fec-721f-a6ef-4b31e835508b Co-authored-by: Amp <amp@ampcode.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
codeHighlight.langsconfig to enable highlighting for languages used in the docs.Languages enabled
The default vocs/shiki bundle includes tsx/ts/typescript but not these domain-specific languages. This uses
config.codeHighlight.langsas @jxom suggested.