unocss-preset-completion
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

unocss-preset-completion npm

Custom auto completion preset for UnoCSS

Features

  • Auto completion support in functions, like clsx(), cn() and so on
  • Auto completion support in css directives, like --at-apply, --uno and so on
  • Customizable

Install

npm i -D unocss-preset-completion unocss
yarn i -D unocss-preset-completion unocss
pnpm i -D unocss-preset-completion unocss
bun i -D unocss-preset-completion unocss

Usage

// uno.config.ts
import { defineConfig } from 'unocss'
import { presetClassCompletion, presetDirectiveCompletion } from 'unocss-preset-completion'

export default defineConfig({
  presets: [
    // ...
    presetClassCompletion(),
    presetDirectiveCompletion(),
  ],
})

Customization

// uno.config.ts
import { defineConfig } from 'unocss'
import { presetCompletion } from 'unocss-preset-completion'

export default defineConfig({
  presets: [
    // ...
    presetCompletion({
      autocompleteFunctions: ['youCustomFunction']
    }),
    presetDirectiveCompletion({
      directives: ['--your-directive']
    }),
  ],
})

License

MIT

Package Sidebar

Install

npm i unocss-preset-completion

Weekly Downloads

88

Version

0.2.0

License

MIT

Unpacked Size

14.5 kB

Total Files

5

Last publish

Collaborators

  • subframe7536