To install the plugin, yoy may need luasnip
installed
vim.opt.runtimepath:append("path/to/plugin/directory")
require("snipml").setup({
default_tag = "div",
default_count = 1,
lang_triggers = { "html" },
indent = " ",
self_closing_tags = { img = true, input = true, br = true },
default_tag_content = {
a = "click here",
button = "submit",
},
default_tag_attributes = {
img = { "src", "alt" },
a = { "href" },
label = { "for" },
input = { "type", "id", "name" },
},
enable_repeat = true,
enable_nesting = true,
enable_base = true,
})
example cases:
you may need this structure asap:
<nav>
<ul>
<li><a href="">click here !</a></li>
</ul>
</nav>
you can achieve this by doing:
nav>ul>li>a
then press tab... and magic !