diff options
| author | Nanderty <psopka@sopka.ch> | 2025-08-25 20:16:25 +0200 |
|---|---|---|
| committer | Nanderty <psopka@sopka.ch> | 2025-08-25 20:16:25 +0200 |
| commit | 0efd381ea3ad13e075a1623acf4bbecbf952fff7 (patch) | |
| tree | b73eef4ba6d447cd7934615a6df77e9de73b3995 /lua/Snippets/html | |
| parent | 4614b58ff7f2e4fb8baab5288ae6f5a799dd83af (diff) | |
| download | neovim-config-0efd381ea3ad13e075a1623acf4bbecbf952fff7.tar.gz neovim-config-0efd381ea3ad13e075a1623acf4bbecbf952fff7.tar.bz2 neovim-config-0efd381ea3ad13e075a1623acf4bbecbf952fff7.zip | |
html snippets
Diffstat (limited to 'lua/Snippets/html')
| -rw-r--r-- | lua/Snippets/html/elements.lua | 17 | ||||
| -rw-r--r-- | lua/Snippets/html/environments.lua | 173 |
2 files changed, 190 insertions, 0 deletions
diff --git a/lua/Snippets/html/elements.lua b/lua/Snippets/html/elements.lua new file mode 100644 index 0000000..36c4c17 --- /dev/null +++ b/lua/Snippets/html/elements.lua @@ -0,0 +1,17 @@ +local helper = require('Snippets.luasniphelpers') + +return { + + s({ trig = 'hr', snippetType = 'autosnippet' }, + { + t('<hr>'), + }, + { condition = helper.line_begin } + ), + + s({ trig = 'brk', snippetType = 'autosnippet' }, + { + t('<br />'), + } + ), +} diff --git a/lua/Snippets/html/environments.lua b/lua/Snippets/html/environments.lua index 5a896c6..f4b55e2 100644 --- a/lua/Snippets/html/environments.lua +++ b/lua/Snippets/html/environments.lua @@ -2,6 +2,76 @@ local helper = require('Snippets.luasniphelpers') return { + s({ trig = 'sct', snippetType = 'autosnippet' }, + fmta( + [[ + <<section>> + <> + <</section>> + ]], + { + i(1), + } + ) + ), + + s({ trig = 'prf', snippetType = 'autosnippet' }, + fmta( + [[ + <<pre>> + <> + <</pre>> + ]], + { + i(1), + } + ) + ), + + s({ trig = 'ccd', snippetType = 'autosnippet' }, + fmta( + [[ + <<code>><><</code>> + ]], + { + i(1), + } + ) + ), + + s({ trig = 'vrb', snippetType = 'autosnippet' }, + fmta( + [[ + <<var>><><</var>> + ]], + { + i(1), + } + ) + ), + + s({ trig = 'tlc', snippetType = 'autosnippet' }, + fmta( + [[ + <<i>><><</i>> + ]], + { + i(1), + } + ) + ), + + s({ trig = 'mfs', snippetType = 'autosnippet' }, + fmta( + [[ + <<em>><><</em>> + ]], + { + i(1), + } + ) + ), + s({ trig = 'prg', snippetType = 'autosnippet' }, fmta( [[ @@ -16,6 +86,73 @@ return { { condition = helper.line_begin } ), + s({ trig = 'stg', snippetType = 'autosnippet' }, + fmta( + [[ + <<strong>><><</strong>> + ]], + { + i(1), + } + ), + { condition = helper.line_begin } + ), + + s({ trig = 'nls', snippetType = 'autosnippet' }, + fmta( + [[ + <<ul>> + <<li>> + <> + <</li>> + <</ul>> + ]], + { + i(1), + } + ), + { condition = helper.line_begin } + ), + + s({ trig = 'rls', snippetType = 'autosnippet' }, + fmta( + [[ + <<ol>> + <<li>> + <> + <</li>> + <</ol>> + ]], + { + i(1), + } + ), + { condition = helper.line_begin } + ), + + s({ trig = 'lst', snippetType = 'autosnippet' }, + fmta( + [[ + <<li>> + <> + <</li>> + ]], + { + i(1), + } + ), + { condition = helper.line_begin } + ), + + s({ trig = 'tms', snippetType = 'autosnippet' }, + fmta( + [[<<time>><><</time>>]], + { + i(1) + } + ) + ), + s({ trig = 'lnk', snippetType = 'autosnippet' }, fmta( [[<<a href="<>">><><</a>>]], @@ -26,4 +163,40 @@ return { ) ), + s({ trig = 'hd1', snippetType = 'autosnippet' }, + fmta( + [[<<h1>><><</h1>>]], + { + i(1), + } + ) + ), + + s({ trig = 'hd2', snippetType = 'autosnippet' }, + fmta( + [[<<h2>><><</h2>>]], + { + i(1), + } + ) + ), + + s({ trig = 'hd3', snippetType = 'autosnippet' }, + fmta( + [[<<h3>><><</h3>>]], + { + i(1), + } + ) + ), + + s({ trig = 'hd4', snippetType = 'autosnippet' }, + fmta( + [[<<h4>><><</h4>>]], + { + i(1), + } + ) + ), + } |
