Remove unused snippets

This commit is contained in:
Oliver Davies 2025-01-03 18:00:00 +00:00
parent b11a558f66
commit f1466f269c
5 changed files with 0 additions and 116 deletions

View file

@ -1,31 +0,0 @@
local ls = require "luasnip"
local fmta = require("luasnip.extras.fmt").fmta
return {
run = fmta(
[=[
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
function help {
printf "%s <<task>> [args]\n\nTasks:\n" "${0}"
compgen -A function | grep -v "^_" | cat -n
printf "\nExtended help:\n Each task has comments for general usage\n"
}
# Include any local tasks.
# https://stackoverflow.com/a/6659698
[[ -e "${BASH_SOURCE%/*}/run.local" ]] && source "${BASH_SOURCE%/*}/run.local"
TIMEFORMAT="Task completed in %3lR"
time "${@:-help}"
]=],
{}
),
}

View file

@ -1,21 +1,10 @@
local ls = require "luasnip" local ls = require "luasnip"
local fmt = require("luasnip.extras.fmt").fmt local fmt = require("luasnip.extras.fmt").fmt
local rep = require("luasnip.extras").rep
local f, i = ls.function_node, ls.insert_node local f, i = ls.function_node, ls.insert_node
return { return {
pcall = fmt(
[[
local status_ok, {} = pcall(require, "{}")
if not status_ok then
return
end
]],
{ i(1), rep(1) }
),
req = fmt([[local {} = require "{}"]], { req = fmt([[local {} = require "{}"]], {
f(function(import_name) f(function(import_name)
local parts = vim.split(import_name[1][1], ".", true) local parts = vim.split(import_name[1][1], ".", true)

View file

@ -1,20 +0,0 @@
local fmt = require("luasnip.extras.fmt").fmt
local ls = require "luasnip"
local i = ls.insert_node
local M = {
frontmatter = fmt(
[[
---
title: {}
---
{}
]],
{ i(1), i(0) }
),
link = fmt([[[{}]({}){} ]], { i(1), i(2), i(0) }),
}
return M

View file

@ -1,23 +0,0 @@
local fmta = require("luasnip.extras.fmt").fmta
local ls = require "luasnip"
local c = ls.choice_node
local i = ls.insert_node
local t = ls.text_node
local M = {
vimplugin = fmta(
[[
{
plugin = <>.<>;
type = "lua";
config = ''
<>
'';
}<>
]],
{ c(1, { t "vimPlugins", t "customVim" }), i(2), i(3), i(0) }
),
}
return M

View file

@ -1,31 +0,0 @@
local fmta = require("luasnip.extras.fmt").fmta
local ls = require "luasnip"
local i = ls.insert_node
local M = {
stories = fmta(
[[
{% stories <name> with { title: '<title>' } %}
<finish>
{% endstories %}
]],
{ name = i(1), title = i(2), finish = i(0) }
),
story = fmta(
[[
{% story <name> with {
name: '<label>',
args: {},
} %}
<finish>
{% endstory %}
]],
{ name = i(1, "default"), label = i(2), finish = i(0) }
),
}
return M