diff --git a/lua/comment-config/init.lua b/lua/comment-config/init.lua index e213377..bc5177d 100644 --- a/lua/comment-config/init.lua +++ b/lua/comment-config/init.lua @@ -3,4 +3,14 @@ require("nvim_comment").setup({ operator_mapping = "c", comment_chunk_text_object = "ic", comment_empty = false, + + vim.api.nvim_create_augroup("comment", { clear = true }), + + vim.api.nvim_create_autocmd({ "BufEnter", "BufFilePost" }, { + group = "comment", + pattern = { "*.tf" }, + callback = function() + vim.api.nvim_buf_set_option(0, "commentstring", "# %s") + end, + }), })