summaryrefslogtreecommitdiff
path: root/fnl/conf/init.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/conf/init.fnl')
-rw-r--r--fnl/conf/init.fnl11
1 files changed, 11 insertions, 0 deletions
diff --git a/fnl/conf/init.fnl b/fnl/conf/init.fnl
index b548d04..f47d230 100644
--- a/fnl/conf/init.fnl
+++ b/fnl/conf/init.fnl
@@ -48,3 +48,14 @@
(fn [ctx]
(vim.cmd ":Dispatch git push"))
{})
+
+(vim.api.nvim_create_user_command :Grunt
+ (fn [ctx]
+ (if (= (. ctx.fargs 1) :plan)
+ (vim.cmd (.. ":Dispatch " (if ctx.bang "TF_LOG=DEBUG " "") "terragrunt "
+ (table.concat ctx.fargs
+ " ")))
+ (vim.cmd (.. ":Start " (if ctx.bang "TF_LOG=DEBUG " "") "terragrunt "
+ (table.concat ctx.fargs
+ " ")))))
+ {:nargs "*" :bang true})