From 2dda6a31bde28375006bb12512d61a5865ba1044 Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Mon, 9 Jan 2023 13:09:12 -0500 Subject: [PATCH] update lockfile, fix treesitter for terraform filetypes --- flake.lock | 6 +++--- modules/neovim/config/lsp.nix | 5 ++++- modules/neovim/lua/settings.lua | 3 ++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index 13a1574..327e0dc 100644 --- a/flake.lock +++ b/flake.lock @@ -377,11 +377,11 @@ "nvim-treesitter-src": { "flake": false, "locked": { - "lastModified": 1673030922, - "narHash": "sha256-aV7SMPZ82Z3TmoPKOqBY2RM505lCkrCHyfBqJrrVoGc=", + "lastModified": 1673257831, + "narHash": "sha256-eIjdaPbWBYWAJ5konYwVtvwuSDgUdnbWG775nK/Vn7o=", "owner": "nvim-treesitter", "repo": "nvim-treesitter", - "rev": "2d8e6b666297ddf19cbf7cbc2b0f1928bc49224a", + "rev": "d8c84521dc9f407f88dfca35b9572c6532207a4a", "type": "github" }, "original": { diff --git a/modules/neovim/config/lsp.nix b/modules/neovim/config/lsp.nix index 5a00369..39b8421 100644 --- a/modules/neovim/config/lsp.nix +++ b/modules/neovim/config/lsp.nix @@ -42,7 +42,10 @@ command = "${pkgs.shfmt}/bin/shfmt", extra_args = { "-i", "4", "-ci" }, }), - require("null-ls").builtins.formatting.terraform_fmt.with({ command = "${pkgs.terraform}/bin/terraform" }), + require("null-ls").builtins.formatting.terraform_fmt.with({ + command = "${pkgs.terraform}/bin/terraform", + extra_filetypes = { "hcl" }, + }), }, on_attach = function(client, bufnr) diff --git a/modules/neovim/lua/settings.lua b/modules/neovim/lua/settings.lua index a6896c9..81fdcfe 100644 --- a/modules/neovim/lua/settings.lua +++ b/modules/neovim/lua/settings.lua @@ -4,7 +4,8 @@ vim.filetype.add({ pattern = { - [".*%.tfvars"] = "terraform", + [".*%.tfvars"] = "hcl", + [".*%.tf"] = "hcl", }, })