This extensions provides language support for ftHTML preprocesser
Support includes, but not limited to:
This extension contributes the following settings (prefix them with
An icon does not show up in the solution explorer treeview for any
.fthtml files because its not a natively recognized language extension yet. If you would like to enable a file icon for .ftHTML files and are already using the Seti theme (that's enabled by default when using visual studio code), I extended the vs-seti-icon theme. I didn't change anything but add an icon for
To enable this type this in your command palette:
>Preferences: File Icon Theme
And select Seti (Visual Studio Code & ftHTML)
Your fthtml markup is validated on every save (configurable) or everytime you open an
.fthtml file. This is to not be confused with a linter. The difference is this will stop validating on the first error found and report it to the 'Problems' Panel. The import thing to address here is this does not also validate imported files/templates when expressed in the syntax:
div "hello world"
The "imports/footer" file's syntax gets omitted when validating
- Quickly convert a 'simple' element to a parent element.
The following examples will all match as eligible for this code action
div <string | macro>
div (...atrs) <string | macro>
In addition to snippets this extension supports all language specific macros, functions, keywords and embedded code block code completions.
The following snippets can be used to quickly insert text:
vars - Produces a vars directive environment for defining variables (includes closing)
html - Produces a complete HTML5 equivalent template
comment - comment "$"
doctype - doctype "$"
import - import "$"
template - Produces a template block for binding property values to an import statement
child - Produces a snippet for an element with children
childWithAttributes - Produces a snippet for an element with attributes and children
Go To Definitions
Quickly peek or go to definitions for import files, template files or user defined variables.
For variables, global vars defined in the
fthtmlconfig.json file are also included
All language specific functions, macros and keywords are documented for on-hover events and shortcut previews. For functions, all arguments are documented as well and can be seen using the parameter hints functionality
Symbols are identified for imports and user defined variables