From 98ed56e5da35975688cdd29b23cb0348a6c04fb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wo=C5=BAniak?= Date: Tue, 3 Jan 2023 08:44:12 +0100 Subject: [PATCH] Added installing the terraform and terraform-ls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcin Woźniak --- .config/nvim/installer.sh | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.config/nvim/installer.sh b/.config/nvim/installer.sh index 83f1129..8a4e362 100755 --- a/.config/nvim/installer.sh +++ b/.config/nvim/installer.sh @@ -44,10 +44,24 @@ function install_shfmt() { GO111MODULE=on go install mvdan.cc/sh/v3/cmd/shfmt@latest } +function install_terraform() { + # Install terraform and terraform-ls + GO111MODULE=on go install github.com/hashicorp/terraform@latest + GO111MODULE=on go install github.com/hashicorp/terraform-ls@latest + if [[ "$(uname)" == "Darwin" ]]; then + brew install tflint + else + curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash + fi +} + function install_shellcheck() { # Install shellcheck - [[ "$(uname)" == "Darwin" ]] && brew install shellcheck - sudo emerge shellcheck-bin + if [[ "$(uname)" == "Darwin" ]]; then + brew install shellcheck + else + curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash + fi } function install_gopls() { @@ -84,6 +98,7 @@ function main() { command_start install_shfmt command_start install_shellcheck command_start install_gopls + command_start install_terraform command_start install_black command_start install_ansible command_start install_meraki_ansible