From 71bdd80401af595bcf6bf6ea7f6a251d95c4a1d0 Mon Sep 17 00:00:00 2001 From: Tine Date: Fri, 5 Jul 2024 20:34:42 +0200 Subject: [PATCH] feat(nvim): use opentofu for formatting --- bat/config | 2 +- nvim/lua/code_helpers.lua | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/bat/config b/bat/config index e6d5f50..db721e2 100644 --- a/bat/config +++ b/bat/config @@ -1,2 +1,2 @@ --italic-text='always' ---theme=OneHalfLight +--theme=OneHalfDark diff --git a/nvim/lua/code_helpers.lua b/nvim/lua/code_helpers.lua index ce033aa..db1b701 100644 --- a/nvim/lua/code_helpers.lua +++ b/nvim/lua/code_helpers.lua @@ -241,7 +241,14 @@ require("formatter").setup({ require("formatter.filetypes.proto").buf_format, }, terraform = { - require("formatter.filetypes.terraform").terraformfmt, + --require("formatter.filetypes.terraform").terraformfmt, + function() + return { + exe = "tofu", + args = { "fmt", "-" }, + stdin = true, + } + end, }, -- Use the special "*" filetype for defining formatter configurations on