Format with stylua
This commit is contained in:
parent
444a8aa752
commit
78a3368259
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue