From 1c11e1bba56d2b510f0bc007fe4211cc1b40dd5f Mon Sep 17 00:00:00 2001 From: Filip Papranec Date: Tue, 25 Apr 2023 09:54:43 +0000 Subject: [PATCH 1/2] Add guide to enable autocomplete for Jetbrains --- readme.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/readme.md b/readme.md index 8673322..fd9395a 100644 --- a/readme.md +++ b/readme.md @@ -100,6 +100,23 @@ Here some additional (optional) steps to enable classes autocompletion using `cl ``` +
+ + + JetBrains IDEs + + +1. Add the following to the ["Tailwind CSS" config in settings](https://blog.jetbrains.com/webstorm/2023/03/webstorm-2023-1/#markup_languages_and_css): + + ```json + { + "tailwindCSS.experimental.classRegex": [ + ["clsx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"] + ] + } + ``` +
+ ## Related - [obj-str](https://github.com/lukeed/obj-str) - A smaller (96B) and similiar utility that only works with Objects. From 764322cf50cc848753513554468bef47b7a1d7ec Mon Sep 17 00:00:00 2001 From: Filip Papranec Date: Tue, 25 Apr 2023 10:09:06 +0000 Subject: [PATCH 2/2] Update regex in snippet to match ide settings --- readme.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index fd9395a..cc9727f 100644 --- a/readme.md +++ b/readme.md @@ -110,9 +110,11 @@ Here some additional (optional) steps to enable classes autocompletion using `cl ```json { - "tailwindCSS.experimental.classRegex": [ - ["clsx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"] - ] + "experimental": { + "classRegex": [ + ["clsx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"] + ] + } } ```