Syntax highlighting and indentation for lit-html. Largely inspired by vim-jsx.
- HTML (including CSS embedded in
<style>
tags) - JavaScript string interpolation (
${...}
) - nested templates (
html`${html`${}`}`
)
This plugin requires vim-javascript. If you use vim-plug for package management, installation looks like this:
Plug 'jonsmithers/experimental-lit-html-vim'
Plug 'pangloss/vim-javascript'
Note: it's generally a good idea to have let g:html_indent_style1 = "inc"
in
your vimrc for reasonable indentation of <style>
tags. See :help html-indenting
.
- The indentation logic still has some kinks.
- This plugin conflicts a bit with vim-jsx. Having both installed simultaneously may result in undesired indentation behaviors.