-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathduck_nvim.lua
39 lines (36 loc) · 855 Bytes
/
duck_nvim.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
return {
"tamton-aquib/duck.nvim",
dependencies = {
"arshlib.nvim",
},
cmd = { "Duck", "Cook" },
config = function()
local quick = require("arshlib.quick")
local duck = require("duck")
quick.command("Duck", function(args)
local count = args.count
if count == 0 then
count = 1
end
local fn = duck.hatch
if #args.args > 0 then
fn = function()
duck.hatch(args.args)
end
end
for _ = 1, count, 1 do
fn()
end
end, { count = true, nargs = "?" })
quick.command("Cook", function(args)
local count = args.count
if count == 0 then
count = 1
end
for _ = 1, count, 1 do
duck.cook()
end
end, { count = true })
end,
enabled = require("config.util").is_enabled("tamton-aquib/duck.nvim"),
}