feat(autocmds): add lsp auto format on save
This commit is contained in:
parent
76ae0ff809
commit
cbe86ded28
1 changed files with 7 additions and 0 deletions
|
|
@ -3,3 +3,10 @@
|
||||||
-- pattern = "*",
|
-- pattern = "*",
|
||||||
-- command = [[%s/\s\+$//e]],
|
-- command = [[%s/\s\+$//e]],
|
||||||
-- })
|
-- })
|
||||||
|
|
||||||
|
-- LSP Auto format on save
|
||||||
|
vim.api.nvim_create_autocmd({ "BufWritePre" }, {
|
||||||
|
group = vim.api.nvim_create_augroup("Default", {}),
|
||||||
|
pattern = "*",
|
||||||
|
command = [[lua vim.lsp.buf.format()]],
|
||||||
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue