Skip to content

Commit

Permalink
Change nvim_create_autocmd callback to a lambda (#1295)
Browse files Browse the repository at this point in the history
  • Loading branch information
chiting authored Jul 6, 2023
1 parent 974e868 commit 7fce3c3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ autocmd BufWritePre *.tf lua vim.lsp.buf.format()
require'lspconfig'.terraformls.setup{}
vim.api.nvim_create_autocmd({"BufWritePre"}, {
pattern = {"*.tf", "*.tfvars"},
callback = vim.lsp.buf.format(),
callback = function()
vim.lsp.buf.format()
end,
})
```

Expand Down

0 comments on commit 7fce3c3

Please sign in to comment.