snippets: add an HTML snippets for MC

Co-Authored-by: iGor milhit <igor@milhit.ch>
iGor milhit 2023-08-02 16:26:13 +02:00
parent 544891631a
commit 694ef949b4
Signed by: igor
GPG Key ID: 692D97C3D0228A99
1 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,34 @@
-- My HTML snippets
-- Set the local variables (shortcuts)
local ls = require("luasnip")
local s = ls.snippet
local i = ls.insert_node
local fmt = require("luasnip.extras.fmt").fmt
return {
s(
{
trig = "mcim",
name = "Main article structure for MC portal",
dscr = "Insert an HTML structure to add bibliographic description on the clinical medicine portal"
},
-- Below, the duplicate of brackets is for escaping delimiters
fmt(
[[
<article class="mc-{1}-main">
<style>
.mc-{1}-item li:not([class])::before,
.mc-{1}-item li::before {{}}
</style>
</article>
]],
{
i(1, "Class identifier")
},
{
repeat_duplicates = true
}
)
)
}