-
-
Notifications
You must be signed in to change notification settings - Fork 587
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
Add Starlight types to defineEcConfig
, export StarlightExpressiveCodeOptions
#1437
Conversation
🦋 Changeset detectedLatest commit: 4598bf4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
This looks good to me @hippotastic!
One question though: shouldn’t this be documented somewhere? Or is the intention people start with the astro.config
version and then only use this based on terminal logging?
It is documented on the EC website, including examples that show usage of the function. Yes, it is my intention that users start with the Astro config, and the majority of users should also be able to keep using the Astro config, as most parts of the EC options are serializable. Only advanced users who know plugins or advanced configurations (probably through the EC website) will run into the scenario where the Code component tells them that they need to move their EC config to the file. The EC website contains examples which use the function, and I included the full Code component error message to ensure it pops up when using the search function: https://expressive-code.com/key-features/code-component/#using-an-ecconfigmjs-file If we think that more guidance is needed, I could add a docs link to the Code component's error message. But I thought I'd wait and see if I receive any reports on this before making the message even longer. :) |
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.
Ok sounds good! Thanks @hippotastic 🙌
Description
defineEcConfig
function and exportsStarlightExpressiveCodeOptions
. Both can be imported from@astrojs/starlight/expressive-code
.This provides Starlight types and IntelliSense support for your Expressive Code configuration options inside an
ec.config.mjs
file. See the Expressive Code documentation for more information.