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

Suggestions showing for all props in React Native project #1277

Closed
RobertOstermann opened this issue Mar 20, 2025 · 4 comments
Closed

Suggestions showing for all props in React Native project #1277

RobertOstermann opened this issue Mar 20, 2025 · 4 comments
Labels
question Further information is requested

Comments

@RobertOstermann
Copy link

What version of VS Code are you using?

For example: 1.99.0-insider

What version of Tailwind CSS IntelliSense are you using?

For example: v0.14.9

What version of Tailwind CSS are you using?

For example: v3.4.17

What package manager are you using?

For example: bun

What operating system are you using?

For example: macOS

Tailwind config

/** @type {import('tailwindcss').Config} */
module.exports = {
  // NOTE: Update this to include the paths to all of your component files.
  content: ['./src/**/*.{js,jsx,ts,tsx}'],
  presets: [require('nativewind/preset')],
  theme: {
    extend: {},
  },
  plugins: [],
};

VS Code settings

{
"tailwindCSS.classAttributes": [
    "class",
    "className",
    "ngClass",
    "class:list"
  ],
  "tailwindCSS.emmetCompletions": false,
  "tailwindCSS.suggestions": true,
}

Reproduction URL

Describe your issue

I am seeing the entire list of tailwind suggestions appear for any prop in my React Native Expo project. This should be limited to just the specified class attributes.

Image
@RobertOstermann RobertOstermann changed the title Suggestions showing for all props, not just the specified tailwindCSS.classAttributes Suggestions showing for all props, not just the specified tailwindCSS.classAttributes Mar 20, 2025
@thecrypticace
Copy link
Contributor

Not seeing this locally. Can you provide a reproduction please

@thecrypticace thecrypticace added the question Further information is requested label Mar 20, 2025
@thecrypticace thecrypticace changed the title Suggestions showing for all props, not just the specified tailwindCSS.classAttributes Suggestions showing for all props in React Native project Mar 20, 2025
@RobertOstermann
Copy link
Author

RobertOstermann commented Mar 20, 2025

Here is a GitHub Repo that I see the issue in.

  • Run bun install
  • Navigate to src/app/index.tsx
  • Place cursor inside the accessibilityHint and trigger the suggestions with command palette "Trigger Suggest" (or the corresponding keyboard command)
  • I am seeing all the suggestions show up despite this not being a class attribute

@thecrypticace
Copy link
Contributor

thecrypticace commented Mar 20, 2025

Ah. It's your class regex

["([\"'`][^\"'`]*.*?[\"'`])", "[\"'`]([^\"'`]*).*?[\"'`]"]

That makes it show up in any string

@RobertOstermann
Copy link
Author

Ah ok, thanks for the quick help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants