Automatically format files with LSP before write.
This commit is contained in:
parent
368b931dc8
commit
b83bbf0fdf
1 changed files with 6 additions and 6 deletions
|
|
@ -19,9 +19,9 @@ vim.opt.expandtab = true
|
|||
vim.opt.number = true
|
||||
|
||||
-- Use LSP to format bufer automatically just before write
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
buffer = buffer,
|
||||
callback = function()
|
||||
vim.lsp.buf.format { async = false }
|
||||
end
|
||||
})
|
||||
--vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
-- buffer = buffer,
|
||||
-- callback = function()
|
||||
-- vim.lsp.buf.format { async = false }
|
||||
-- end
|
||||
--})
|
||||
|
|
|
|||
Loading…
Reference in a new issue