summaryrefslogtreecommitdiff
path: root/fnl/conf
diff options
context:
space:
mode:
authorMike Vink <mike.vink@stater.nl>2023-04-21 13:26:17 +0200
committerMike Vink <mike.vink@stater.nl>2023-04-21 13:26:17 +0200
commit1b6566231b8bfc8223fcbf11d1243d9328f65f4f (patch)
treec52cede0f8b7dc574fbab0d1121a8e931ba1a16b /fnl/conf
parent99e9d437548e2570346b2c666e1192cd800a0b11 (diff)
some commands
Diffstat (limited to 'fnl/conf')
-rw-r--r--fnl/conf/init.fnl33
1 files changed, 24 insertions, 9 deletions
diff --git a/fnl/conf/init.fnl b/fnl/conf/init.fnl
index 36cd4af..bf71329 100644
--- a/fnl/conf/init.fnl
+++ b/fnl/conf/init.fnl
@@ -54,15 +54,24 @@
(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 "
+ (match (. ctx.fargs 1)
+ :plan (vim.cmd (.. ":Dispatch "
+ (if ctx.bang
+ "TF_LOG=DEBUG "
+ "")
+ "terragrunt "
+ (table.concat ctx.fargs
+ " ")
+ " " :-out=gruntplan))
+ :apply (vim.cmd (.. ":Dispatch "
+ (if ctx.bang
+ "TF_LOG=DEBUG "
+ "")
+ "terragrunt "
+ (table.concat ctx.fargs
+ " ")
+ " " :gruntplan))
+ _ (vim.cmd (.. ":Start "
(if ctx.bang
"TF_LOG=DEBUG "
"")
@@ -70,3 +79,9 @@
(table.concat ctx.fargs
" ")))))
{:nargs "*" :bang true})
+
+(vim.api.nvim_create_user_command :K9s
+ (fn [ctx]
+ (vim.cmd (.. ":Start k9s --context "
+ (. ctx.fargs 1))))
+ {:nargs 1})