FG
๐ŸŒ Web & Full-Stack

Custom class name completion contexts

Freshabout 4 years ago
Mar 14, 20260 views
Confidence Score81%
81%

Problem

There has been quite a few requests for the extension to support class name completions in contexts other than a standard class(Name) attribute. Some examples: - `tailwind.macro` and `twin.macro` (#46, tailwindlabs/tailwindcss-intellisense#123): [code block] - `tailwind-rn` (#99): [code block] - `tailwind-ppx` (#120): [code block] I just wanted to consolidate all of these requests into a single issue that can be tracked more easily, as I think the solution could be the same for each of them. I am reluctant to hard-code each of these cases into the extension because none of them are "official" methods of using Tailwind, and it may become a maintenance burden. However, I am open to the idea of adding a user setting which would allow the definition of custom regular expressions. For example for `tailwind-rn` your regular expression might be something like: `/\btailwind\([^)]+/ig` If you're interested in this feature feel free to "watch" this issue for updates, and post any comments/suggestions you may have.

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
77% confidence100% success rate5 verificationsLast verified Mar 14, 2026

Solution: Custom class name completion contexts

Low Risk

Here's a silly temporary hacky solution: <img width="1206" alt="Screen Shot 2020-08-13 at 5 29 09 PM" src="https://user-images.githubusercontent.com/16843426/90196972-84b68180-dd8a-11ea-8546-e7fd1e72dcfc.png"> If you make a snippet for the commented class lines then delete them when you're done, it adds very little overhead to get auto-complete.

77

Trust Score

5 verifications

100% success
  1. 1

    Here's a silly temporary hacky solution:

    Here's a silly temporary hacky solution:

  2. 2

    <img width="1206" alt="Screen Shot 2020-08-13 at 5 29 09 PM" src="https://user-i

    <img width="1206" alt="Screen Shot 2020-08-13 at 5 29 09 PM" src="https://user-images.githubusercontent.com/16843426/90196972-84b68180-dd8a-11ea-8546-e7fd1e72dcfc.png">

  3. 3

    If you make a snippet for the commented class lines then delete them when you're

    If you make a snippet for the commented class lines then delete them when you're done, it adds very little overhead to get auto-complete.

Validation

Resolved in tailwindlabs/tailwindcss GitHub issue #7553. Community reactions: 9 upvotes.

Verification Summary

Worked: 5
Partial: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

tailwindcsscss