Vueless Docs
ComponentsGitHubWebsite
  • Installation
    • Quick start (Vue)
    • Quick start (Nuxt)
    • Class autocompletion
    • Minimal requirements
    • Storybook docs
  • Global customization
    • General
    • Colors
    • Rounding
    • Focus Outline
    • Dark mode
    • Base Classes
    • Custom tailwind classes
  • Component customization
    • General
    • Styling
    • Conditional styling
    • Extends styling from keys
    • Nested components styling
    • Classes smart merging
    • Props defaults
    • Redefining props
    • Defining custom props
    • Internationalization (i18n)
  • Creating own components
    • Vueless file structure
    • Create new component
    • Copy existing component
  • Svg Icons
    • General usage
    • Custom icons
    • Dynamic import
    • Advanced settings
  • Helpers
    • Change settings in runtime
Powered by GitBook
On this page
  • IntelliSense
  • VSCode
  • JetBrains IDEs
  1. Installation

Class autocompletion

IntelliSense

If you’re using VSCode or JetBrains IDEs (WebStorm, PHPStorm, etc.), you can set up class autocompletion.

Benefits:

  • Autocompletion when typing in the class attribute.

  • Autocompletion in objects by prefixing them with /*tw*/.

  • Autocompletion inside the config prop.

Example of an SFC with IntelliSense:

<template>
  <UCard :config="config" />
</template>

<script setup>
const config = /*tw*/ {
  card: 'bg-white dark:bg-slate-900'
}
</script>

VSCode

  • Add the following extension configuration to your VSCode settings.

.vscode/settings.json
{
  "files.associations": {
      "*.css": "tailwindcss"
  },
  "editor.quickSuggestions": {
      "strings": true
  },
  "tailwindCSS.classAttributes": ["class", "config"],
  "tailwindCSS.experimental.classRegex": [
    ["config:\\s*{([^)]*)\\s*}", "[\"'`]([^\"'`]*).*?[\"'`]"],
    ["/\\*tw\\*/\\s*{([^;]*)}", ":\\s*[\"'`]([^\"'`]*).*?[\"'`]"]
  ]
}

JetBrains IDEs

  • Add the following extension configuration below in Settings > Languages & Frameworks > Style Sheets > Tailwind CSS.

{
  "includeLanguages": {
    "javascript": "javascript"
  },
  "suggestions": true,
  "classAttributes": ["class", "config"],
  "experimental": {
    "classRegex": [
      ["config:\\s*{([^)]*)\\s*}", "[\"'`]([^\"'`]*).*?[\"'`]"],
      ["/\\*tw\\*/\\s*{([^;]*)}", ":\\s*[\"'`]([^\"'`]*).*?[\"'`]"]
    ]
  }
}

Last updated 4 months ago

Install extension.

Ensure the extension is installed in your IDE. If it’s not, install it.

Tailwind CSS IntelliSense
Tailwind CSS IntelliSense