antfu / vscode-iconify

🙂 Iconify IntelliSense for VS Code
https://marketplace.visualstudio.com/items?itemName=antfu.iconify
MIT License
453 stars 33 forks source link

How is the custom icon displayed? #47

Closed waset closed 1 year ago

waset commented 1 year ago

Additional context

// uno.config.ts
import { defineConfig } from 'unocss'

// loader helpers
import { FileSystemIconLoader } from '@iconify/utils/lib/loader/node-loaders'

export default defineConfig({
  presets: [
    presetIcons({
      collections: {
        // a helper to load icons from the file system
        // files under `./assets/icons` with `.svg` extension will be loaded as it's file name
        // you can also provide a transform callback to change each icon (optional)
        'my-icons': FileSystemIconLoader(
          './assets/icons',
          svg => svg.replace(/#fff/, 'currentColor')
        )
      }
    })
  ]
})

How can the above custom configuration be displayed in the editor through this plug-in?

antfu commented 1 year ago

Duplicated #12

waset commented 1 year ago

@antfu oh no, sorry, i mean, let the plug-in display icons in vscode.

Pass through FileSystemIconLoader

image

It can't be done now.