-
-
Notifications
You must be signed in to change notification settings - Fork 347
feat(starlight): handle Expressive Code's configuration file #1451
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
feat(starlight): handle Expressive Code's configuration file #1451
Conversation
webpro
left a comment
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.
Nice PR! Much appreciated 🌟
| if (expressiveCodeProp && ts.isPropertyAssignment(expressiveCodeProp)) { | ||
| const initializer = expressiveCodeProp.initializer; | ||
| if (initializer.kind === ts.SyntaxKind.FalseKeyword) { | ||
| isExpressiveCodeEnabled = false; |
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.
Perhaps we could do an early bail out here?
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.
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.
Yeah, anything we can do to improve performance. If we have our answer, we can stop iterating.
commit: |
|
@webpro @sushichan044 Because expressive-code isn't exclusively a starlight feature, it felt funny to me to shoehorn this into the starlight plugin. So I took a try at reworking this branch into it's own knip plugin for expressive-code and opened that as #1493. |
|
Everyone comes in with their own agenda, no solution is perfect here (as Starlight has expressive-code built-in). Your solution is great though! Let's close this one and roll with yours 🙏 |
fixes #1450
Now the starlight plugin checks whether Expressive Code is enabled.
If enabled, adds Expressive Code's config file as an entry.