Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this feature aim to accomplish?
This feature aims to make the VSCode Intellisense compatible with Twind. Currently, the Twind extension for VSCode is broken, so I have been using the Tailwind CSS extension as a replacement.
What does it do?
This feature is a plugin for Fresh that clones the Twind config to the Tailwind config, enabling proper auto-completion of custom values. It runs during the initialization of
dev.ts
. With the start task, it automatically regenerates the Tailwind config for VSCode whenever it changes.How does it work?
First, it reads the Twind config file and applies a regex pattern to capture the inner Twind config. It checks if the config was successfully captured; if not, the promise is rejected. It then removes the
selfURL: import.meta.url,
line and wraps the Twind config withmodule.exports = {$1}
. Finally, it writes the file to the location where the Tailwind CSS extension expects thetailwind.config.js
file.When does this plugin apply?
This plugin is applied during the project initialization process. If the user selects Tailwind and VSCode, this plugin will be automatically applied. Otherwise, it will have no effect.