lukas-tr / vscode-materialdesignicons-intellisense

Provides intellisense, search and hover preview for Material Design Icons
https://marketplace.visualstudio.com/items?itemName=lukas-tr.materialdesignicons-intellisense
MIT License
35 stars 7 forks source link
google-material intellisense material material-design materialdesignicons preview preview-icon vscode-extension

Material Design Icons Intellisense

Visual Studio Marketplace Downloads Visual Studio Marketplace Installs Visual Studio Marketplace Version

[!NOTE] While I will still fix bugs and merge pull requests, I will no longer actively improve this extension as I have switched to a different editor.


Logo

Provides intellisense, search and hover preview of Material Design Icons. Also available on Open VSX.

Features

Intellisense

Intellisense

Hover

Hover

Decoration

Decoration

Explorer

Explorer

Configuration

Configuration

Search

Search

Lint

Lint

Supported Icon Sets

FAQ

The preview doesn't show up in intellisense

The intellisense preview can be toggled with Ctrl + Space by default. You can also find the shortcut via Preferences: Open Keyboard Shortcuts and searching for toggleSuggestionDetails.

Should I use the webfont?

This extension provides intellisense for both @mdi/font and @mdi/js. Due to the size of the webfont, you should consider using @mdi/js instead (read this guide for further information).

How to add support for other libraries?

You can add custom matchers to materialdesigniconsIntellisense.matchers. Create an issue or add a pull request if your matcher should be available to other people.

{
    "match": "\\bmdi:{param}\\b", // regex for hover, decoration and completion, possible cases below
    "insert": "mdi:{param}", // insert from explorer
    "displayName": "kebab-case (web font)", // shown by `materialdesigniconsIntellisense.changeInsertStyle` command
    "name": "kebabCase", // any string, should be unique
    "insertPrefix": null, // optional, string inserted before `match`
    "insertSuffix": null, // optional, string inserted after icon name
}

You can also add prefixes/suffixes to existing entries. This example would allow you to insert <i class="mdi-alert"></i> by typing mdi-alEnter.

{
    "match": "\\bmdi-{param}\\b",
    "insert": "mdi-{param}",
    "displayName": "kebab-case (web font)",
    "name": "kebabCase",
    "insertPrefix": "<i class=\"",
    "insertSuffix": "\"></i>"
}

Cases:

Changelog

CHANGELOG.md