From e969ba230b329f665dcc6badca9558d3e9b15d7c Mon Sep 17 00:00:00 2001 From: Pim Kunis Date: Mon, 23 Jan 2023 14:02:52 +0100 Subject: [PATCH] add terraform language server --- playbooks/all.yml | 24 ++++++++++++------------ roles/neovim/files/plugin/lspconfig.lua | 6 +++--- roles/neovim/tasks/main.yml | 3 +++ roles/system/tasks/main.yml | 1 - 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/playbooks/all.yml b/playbooks/all.yml index b4c8143..2a2edba 100644 --- a/playbooks/all.yml +++ b/playbooks/all.yml @@ -2,26 +2,26 @@ hosts: self roles: - role: system - tags: system + tags: [system] - role: bash - tags: bash + tags: [bash, os3] - role: alacritty - tags: alacritty + tags: [alacritty, os3] - role: wireguard - tags: wireguard + tags: [wireguard] - role: asdf - tags: asdf + tags: [asdf] - role: neovim - tags: neovim + tags: [neovim, os3] - role: signal - tags: signal + tags: [signal, os3] - role: virtualbox - tags: virtualbox + tags: [virtualbox] - role: vscodium - tags: vscodium + tags: [vscodium, os3] - role: syncthing - tags: syncthing + tags: [syncthing] - role: strawberry - tags: strawberry + tags: [strawberry] - role: nicotine - tags: nicotine + tags: [nicotine] diff --git a/roles/neovim/files/plugin/lspconfig.lua b/roles/neovim/files/plugin/lspconfig.lua index 961f8c8..886b3a4 100644 --- a/roles/neovim/files/plugin/lspconfig.lua +++ b/roles/neovim/files/plugin/lspconfig.lua @@ -32,6 +32,6 @@ local on_attach = function(client, bufnr) vim.keymap.set('n', 'f', function() vim.lsp.buf.format { async = true } end, bufopts) end -require("lspconfig").pylsp.setup{ - on_attach = on_attach -} +require("lspconfig").pylsp.setup{ on_attach = on_attach } + +require'lspconfig'.terraformls.setup{ on_attach = on_attach } diff --git a/roles/neovim/tasks/main.yml b/roles/neovim/tasks/main.yml index 4f48143..79ac5eb 100644 --- a/roles/neovim/tasks/main.yml +++ b/roles/neovim/tasks/main.yml @@ -44,3 +44,6 @@ pip: name: - "python-lsp-server[all]" +- name: Install terraform-ls + apt: + pkg: terraform-ls diff --git a/roles/system/tasks/main.yml b/roles/system/tasks/main.yml index 1728105..82052e9 100644 --- a/roles/system/tasks/main.yml +++ b/roles/system/tasks/main.yml @@ -15,7 +15,6 @@ - tree - wireshark - units - - imagemagick - name: Install .gitconfig template: src: "{{ role_path }}/templates/.gitconfig.j2"