Skip to content

Commit

Permalink
Add first pass at task lua snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
handdara committed Nov 27, 2024
1 parent 4c3e977 commit c00a684
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions fst/him/nvim-nrw/lua/handdara/snippets/markdown.lua
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ local ssuSched = [[
| 0730 | : | | 1530 | | | 2330 | :no-screens: | |
| 0745 | V | | 1545 | | | 2345 | V | |]]
local daySchedules = { ssuSched, mwfSched, tthSched, mwfSched, tthSched, mwfSched, ssuSched, }
local sDaily = s('daily', d(1, function()
local sdaily = s('daily', d(1, function()
local ts = u.timestamp()
return sn(nil, fmt(bDaily, {
t('[[p' .. u.dtnum2str(ts.mo_num) .. '-' .. ts.mo .. '-' .. ts.yr .. ']]'),
Expand All @@ -159,9 +159,30 @@ local sDaily = s('daily', d(1, function()
}))
end))

local btask = [[
---
tag: {1}/quest{2}
desc: {3}
repo: handdara/{4}
branch: {5}
---
# :{6}/quest{7}:
]]
local stask = s('task', fmt(btask, {
i(1, 'project'),
i(2, '#'),
i(3, 'description'),
i(4, 'repository'),
i(5, '~'),
rep(1),
rep(2),
}))

local snips = {
sdateheader,
sDaily,
sdaily,
stask,
}

ls.add_snippets("markdown", snips)
Expand Down

0 comments on commit c00a684

Please sign in to comment.