[!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.
Provides intellisense, search and hover preview of Material Design Icons. Also available on Open VSX.
mdi
, mdi-
or mdi:
(can be changed)materialdesigniconsIntellisense.iconColor
: RGB color of the preview icon.materialdesigniconsIntellisense.iconSize
: Size of the preview icon in pixels.materialdesigniconsIntellisense.selector
: Languages where completion and hover are active. Languages can be set through the MDI: Select languages
command.materialdesigniconsIntellisense.includeAliases
: Also include icon aliases in completion items.materialdesigniconsIntellisense.matchers
: Customize how icon names are matched and inserted. See FAQ.materialdesigniconsIntellisense.iconColor
: RGB color of the preview icon.materialdesigniconsIntellisense.iconSize
: Size of the preview icon in pixels.materialdesigniconsIntellisense.selector
: Languages where completion and hover are active.materialdesigniconsIntellisense.iconColor
: RGB color of the preview icon.materialdesigniconsIntellisense.enableDecorations
: Show decorationsmaterialdesigniconsIntellisense.decoration.size
: Set decoration width and heightmaterialdesigniconsIntellisense.decoration.margin
: Set decoration marginmaterialdesigniconsIntellisense.iconColor
: RGB color of the preview icon.materialdesigniconsIntellisense.insertStyle
: Switch between kebab case, camel case and Home Assistant syntax.materialdesigniconsIntellisense.mdiVersion
: @mdi/svg
version to use. This can either be latest
or a specific version like 5.2.45
.materialdesigniconsIntellisense.enableLinter
: Lint Home Assistant and kebab case icon namesmaterialdesigniconsIntellisense.ignoredIcons
: Icons ignored by the lintermaterialdesigniconsIntellisense.linter.ignorePaths
: Paths ignored by linter (glob)materialdesigniconsIntellisense.light
: Use Material Design Icons Light instead of Material Design Icons
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
.
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).
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-al
Enter.
{
"match": "\\bmdi-{param}\\b",
"insert": "mdi-{param}",
"displayName": "kebab-case (web font)",
"name": "kebabCase",
"insertPrefix": "<i class=\"",
"insertSuffix": "\"></i>"
}
Cases:
{camel}
accessPoint{param}
access-point{pascal}
AccessPoint{constant}
ACCESS_POINT{dot}
access.point{header}
Access-Point{no}
access point{path}
access/point{snake}
access_point