Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tailwind's experimental.classRegex doesn't seem to be working #22445

Open
1 task done
silvenon opened this issue Dec 27, 2024 · 0 comments
Open
1 task done

Tailwind's experimental.classRegex doesn't seem to be working #22445

silvenon opened this issue Dec 27, 2024 · 0 comments
Labels
admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue

Comments

@silvenon
Copy link

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

The classes are recognized by Tailwind's LSP as long as they're inside the attributes, but extracting them outside and getting Zed to recognize them using lsp.tailwind-language-server.settings.experimental.classRegex doesn't work like it does in VS Code, despite being mentioned in Zed's documentation.

  1. create an empty project
  2. npm init -y
  3. npm install tailwindcss
  4. create a JS file containing clsx("relative")
  5. create a local Zed settings file recognizing that stuff inside clsx are classes:
{
  "lsp": {
    "tailwind-language-server": {
      "settings": {
        "experimental": {
          "classRegex": [
            "clsx\\(([^]*?)\\)"
            // or this
            ["clsx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
            // I don't know which one is better, I just copy and paste them
          ]
        }
      }
    }
  }
}

Zed Version and System Specs

Zed: v0.166.1 (Zed)
OS: macOS 15.2.0
Memory: 16 GiB
Architecture: aarch64

If applicable, add screenshots or screencasts of the incorrect state / behavior

No response

If applicable, attach your Zed.log file to this issue.

No response

@silvenon silvenon added admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue labels Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue
Projects
None yet
Development

No branches or pull requests

1 participant