-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Labels
Description
Is your feature request related to a problem? Please describe.
In many cases, developers will provide code groups for multiple programming languages at the same time. I hope that after the user switches one, other code groups can automatically follow, and it is best to be persistent.
#2773, a solution is proposed here, but I don't think it's good enough
- Only supports tab, but code group needs it more
- This is a very commonly used feature, I think it should be officially supported, not by a plugin
Describe the solution you'd like
::: code-group
```js [config.js] :js <-- key
const config = {
// ...
}
export default config
```
```ts [config.ts] :ts
import type { UserConfig } from 'vitepress'
const config: UserConfig = {
// ...
}
export default config
```
:::
Describe alternatives you've considered
No response
Additional context
No response
Validations
- Follow our Code of Conduct
- Read the docs.
- Read the Contributing Guidelines.
- Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.
johnstairs, LiamEderzeel, Lehoczky, krienow, Albermonte and 7 moremaxnorth