From 69b3f552fd65a849b266413076d1d60721359a95 Mon Sep 17 00:00:00 2001 From: bakhacode Date: Tue, 25 Mar 2025 12:40:50 +0900 Subject: [PATCH] docs: update IntelliSense setup for Tailwind Variants This commit updates the setup instructions for enabling autocompletion for Tailwind Variants in VSCode. Previously, the setup required adding tailwindCSS.experimental.classRegex to the settings.json file, but with the newer versions of the Tailwind CSS IntelliSense extension, users can now simply add "tailwindCSS.classFunctions": ["tv"] to their settings.json file. This change simplifies the configuration, removing the need for complex regular expressions. This update also resolves the issue discussed in #247, where users were facing difficulties with the previous configuration. The new method provides a much more straightforward way of enabling autocompletion for Tailwind Variants. --- pages/docs/getting-started.mdx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pages/docs/getting-started.mdx b/pages/docs/getting-started.mdx index 1602c09..e6c74ee 100644 --- a/pages/docs/getting-started.mdx +++ b/pages/docs/getting-started.mdx @@ -115,16 +115,18 @@ To enable autocompletion for **Tailwind Variants** you can follow the instructio - If you are using **VSCode** and the [**TailwindCSS IntelliSense Extension**](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss), you have to add the following to your `settings.json` file. + If you are using **VSCode** and the [**TailwindCSS IntelliSense Extension**](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss), you can enable autocompletion for Tailwind Variants by adding the following to your `settings.json` file. ```json copy { - "tailwindCSS.experimental.classRegex": [ - ["([\"'`][^\"'`]*.*?[\"'`])", "[\"'`]([^\"'`]*).*?[\"'`]"] - ] + "tailwindCSS.classFunctions": ["tv"] } ``` +This configuration replaces the older approach where you needed to use tailwindCSS.experimental.classRegex. The new method is simpler and enables autocompletion for Tailwind Variants with just the classFunctions setting. + +For more information, check the official Tailwind CSS IntelliSense Documentation. + If you are using **Neovim**, install [**Tailwind CSS Language Server**](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#tailwindcss) and add the following to your configuration.