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

classRegex not working with Dart files in WebStorm #1081

Open
moshe5745 opened this issue Nov 4, 2024 · 1 comment
Open

classRegex not working with Dart files in WebStorm #1081

moshe5745 opened this issue Nov 4, 2024 · 1 comment
Assignees

Comments

@moshe5745
Copy link

moshe5745 commented Nov 4, 2024

What version of VS Code are you using?

WebStorm 2024.2.4

What version of Tailwind CSS IntelliSense are you using?

v0.0.26

What version of Tailwind CSS are you using?

v3.4.14

What package manager are you using?

pub

What operating system are you using?

macOS

Tailwind config

/** @type {import('tailwindcss').Config} */
module.exports = {
    content: ['./{lib,web}/**/*.dart'],
    theme: {
        extend: {},
    },
    plugins: [
        require("daisyui")
    ],
}

tailwind-intellisense-settings

{
  "includeLanguages": {
    "ftl": "html",
    "jinja": "html",
    "jinja2": "html",
    "smarty": "html",
    "tmpl": "gohtml",
    "cshtml": "html",
    "vbhtml": "html",
    "razor": "html",
    "dart": "html"
  },
  "files": {
    "exclude": [
      "**/.git/**",
      "**/node_modules/**",
      "**/.hg/**",
      "**/.svn/**"
    ]
  },
  "emmetCompletions": false,
  "classAttributes": ["class", "className", "ngClass", "classes"],
  "colorDecorators": false,
  "showPixelEquivalents": true,
  "rootFontSize": 16,
  "hovers": true,
  "suggestions": true,
  "codeActions": true,
  "validate": true,
  "lint": {
    "invalidScreen": "error",
    "invalidVariant": "error",
    "invalidTailwindDirective": "error",
    "invalidApply": "error",
    "invalidConfigPath": "error",
    "cssConflict": "warning",
    "recommendedVariantOrder": "warning"
  },
  "experimental": {
    "configFile": "tailwind.config.js",
    "classRegex": ["\\W\\s*classes:\\s*'(.*)'"]
  }
}

Describe your issue

I have a dart web project(using jaspr framework).
When I used dart_frog everything worked fine because I served regular HTML with class attribute.
But jaspr using classes for representing the UI and then renders it to the client. So basically it looks like this inside my dart files.

svg(classes: 'size-6')

So I use regex but its not working.
I know other people using exactly the same configs in VSCode and its working.

Any help?

@moshe5745 moshe5745 changed the title Intellisense not in html syntax Intellisense with regex not working Nov 5, 2024
@miniluz
Copy link

miniluz commented Nov 5, 2024

Not working for me either sadly. I'm using workspace settings, if that matters.

I'm using:

{
  "tailwindCSS.experimental.classRegex": [
    ["[cC]lass(?:es)?(?:: .*)? \\=([^;]*);", "'([^']*)'"],
    ["[cC]lass(?:es)?(?:: .*)? \\=([^;]*);", "\"([^\"]*)\""],
    ["[cC]lass(?:es)?(?:: .*)? \\=([^;]*);", "\\`([^\\`]*)\\`"]
  ]
}

@thecrypticace thecrypticace self-assigned this Nov 5, 2024
@thecrypticace thecrypticace changed the title Intellisense with regex not working classRegex not working with Dart files in WebStorm Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants