summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/terragrunt.vim21
-rw-r--r--fnl/conf/init.fnl11
-rw-r--r--fnl/conf/pkgs/noice.fnl1
3 files changed, 33 insertions, 0 deletions
diff --git a/compiler/terragrunt.vim b/compiler/terragrunt.vim
new file mode 100644
index 0000000..54f94ef
--- /dev/null
+++ b/compiler/terragrunt.vim
@@ -0,0 +1,21 @@
+if exists('current_compiler')
+ finish
+endif
+let current_compiler = 'go-test'
+
+if exists(':CompilerSet') != 2
+ command -nargs=* CompilerSet setlocal <args>
+endif
+
+" The errorformat can also use vim's regular expression syntax (albeit in a rather awkward way) which gives us a solution to the problem. We can use a non-capturing group and a zero-width assertion to require the presence of these signaling phrases without consuming them. This then allows the %m to pick them up. As plain regular expression syntax this zero-width assertion looks like:
+"
+" \%(undefined reference\|multiple definition\)\@=
+"
+" But in order to use it in efm we need to replace \ by %\ and % by %%
+
+
+CompilerSet makeprg=terragrunt
+CompilerSet errorformat=%.%#level=%t%.%#msg=%f:%l%\\,%c-%*\\d:\ %m,
+ \%Z%m,
+ \%E-\ %m\ (at\ %f:%l\\,%c-%*\\d),
+" vim: sw=2 sts=2 et
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})
diff --git a/fnl/conf/pkgs/noice.fnl b/fnl/conf/pkgs/noice.fnl
index cce1937..58ac761 100644
--- a/fnl/conf/pkgs/noice.fnl
+++ b/fnl/conf/pkgs/noice.fnl
@@ -5,6 +5,7 @@
:override {[:vim.lsp.util.convert_input_to_markdown_lines] true
[:vim.lsp.util.stylize_markdown] true
[:cmp.entry.get_documentation] true}}
+ :popupmenu {:enabled false}
:messages {; NOTE: If you enable messages then the cmdline is enabled automatically.
; This is a current Neovim limitation.
:enabled true