Mithril Emmet support for VS Code
Add Emmet (zen-coding) support for Mithril inside vscode, can also be used to create hyperscript.
This extension is a modification of FallenMax's work. He should get the most credit in regard to parsing the output from emmet.
Screenshot
Usage
Use VS Code Command: Expand Emmet to Mithril
Optionally, You can bind mithrilEmmet.expand
to a shortcut via File -> Preferences -> Keyboard Shortcuts
.
Example:
[{
"key": "cmd+alt+e",
"command": "mithrilEmmet.expand",
"when": "editorFocus"
},
{
"key": "ctrl+alt+e",
"command": "mithrilEmmet.expand",
"when": "editorFocus"
}]
Configuration
{
"mithrilEmmet.vnodeFactoryFunctionName": "m", // Specifies the name of vnode factory function. E.g. for mithril, use 'm'; for hyperscript, use 'h'.
"mithrilEmmet.outputDefaultTagName": true // If false, default tag name ('div') will be obmitted, i.e. '.some-class' instead of 'div.some-class'
}
Known Issues
- Some emmet snippets are not supported (e.g.
!!!
=> <!DOCTYPE html>
)
- Automatic numbering is not supported (yet!)
- ~~Custom Attributes are not supported (yet - need to replace the emmet parser which will take some time.)~~
Release Notes
0.1.0
First release - Sprang from v 0.6.0 of FallenMax's mithril-emmet. I restarted the versioning system as he has not updated his since February of last year.