diff --git a/.config/nvim/lua/core/autocommands.lua b/.config/nvim/lua/core/autocommands.lua index 885917d..1567e92 100644 --- a/.config/nvim/lua/core/autocommands.lua +++ b/.config/nvim/lua/core/autocommands.lua @@ -41,3 +41,13 @@ vim.api.nvim_create_autocmd({ "VimLeavePre" }, { Session.store(vim.loop.cwd()) end, }) + +-- Ensure terraform files use hcl LSP +vim.api.nvim_create_autocmd({ "BufNewFile", "BufRead" }, { + pattern = { "*.tf" }, + callback = function() + vim.cmd([[ + set filetype=hcl + ]]) + end, +})