Feature proposal: Add a `codeToANSIFromHighlighter` variant of `codeToANSI`
Author: TomerAberbachCreated Apr 30, 2026Updated Apr 30, 2026
Clear and concise description of the problem
Right now codeToANSI always uses the singleton highlighter and there's no way to provide your own custom built one
Suggested solution
Other packages in the repo seem to provide xFromHighlighter variants, so could follow that same pattern
Alternative
No response
Additional context
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guide.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Source: shikijs/shiki