1
0
Fork 0

Format with stylua

This commit is contained in:
Daniele Tricoli 2022-12-13 03:01:56 +01:00
parent 444a8aa752
commit 78a3368259

View file

@ -70,13 +70,13 @@ null_ls.setup({
},
on_attach = function(client, bufnr)
-- Format on save.
if client.supports_method("textDocument/formatting") then
if client.supports_method "textDocument/formatting" then
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
vim.api.nvim_create_autocmd("BufWritePre", {
group = augroup,
buffer = bufnr,
callback = function()
vim.lsp.buf.format({ bufnr = bufnr })
vim.lsp.buf.format({ bufnr = bufnr })
end,
})
end