Skip to content

Conversation

@amirhhashemi
Copy link
Contributor

@amirhhashemi amirhhashemi commented Oct 11, 2025

This PR adds several new customization options to the language switcher plugin:

  1. Users can now customize the label of the toggle button.
  2. Users can style the switcher through Expressive Code's style settings.
  3. The new conversions option provides greater control over the plugin's default behavior. Most notably, it allows users to add support for custom languages (like Svelte, Vue, etc.) if they wish.

It also includes a few improvements and fixes:

  1. Styles are now conditionally loaded only when the plugin is enabled. Previously, they were always included as part of the global index.css file.
  2. The plugin is now exported through the solidbase/plugins path. This change is important because it gives users access to helper functions used within the plugin, useful when customizing conversions.

These changes should be backward compatible.

I'll be honest, getting this all to work required a few less-than-ideal compromises, and I'm not entirely happy with the code quality. The implementation ended up being a bit more complex than I expected. To be frank, these features don't add much value for the Solid docs project, so I completely understand if you decide not to merge this PR (or only parts of it).

@netlify
Copy link

netlify bot commented Oct 11, 2025

Deploy Preview for solidbase failed.

Name Link
🔨 Latest commit 5b67575
🔍 Latest deploy log https://app.netlify.com/projects/solidbase/deploys/68ebc57d75b08b00084dc2eb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant