Skip to content

LelouchFR/snipml.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

snipml.nvim

Install plugin

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 !

About

Tag language shortcuts for neovim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages