diff --git a/lua/settings.lua b/lua/settings.lua index 4ef9cb6..a9d596b 100644 --- a/lua/settings.lua +++ b/lua/settings.lua @@ -42,3 +42,11 @@ vim.api.nvim_create_autocmd('Filetype', { pattern = { 'python', 'sent' }, command = 'setlocal expandtab tabstop=4 shiftwidth=4', }) + +-- use hcl for terraform files +vim.api.nvim_create_augroup('setFiletypeTerraform', { clear = true }) +vim.api.nvim_create_autocmd('Filetype', { + group = 'setExpandTabPython', + pattern = 'terraform', + command = "lua vim.api.nvim_buf_set_option(0, 'filetype', 'hcl')", +})