mirror of
https://github.com/CompeyDev/my-nvim-setup.git
synced 2024-12-12 12:50:37 +00:00
apply formatting on save to all files
This commit is contained in:
parent
7f5fbbf08b
commit
987eabdb07
1 changed files with 13 additions and 13 deletions
|
@ -69,19 +69,19 @@ return {
|
||||||
temp_dir = nil,
|
temp_dir = nil,
|
||||||
update_in_insert = false,
|
update_in_insert = false,
|
||||||
-- formatting on save
|
-- formatting on save
|
||||||
--on_attach = function(client, bufnr)
|
on_attach = function(client, bufnr)
|
||||||
-- 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_clear_autocmds { group = augroup, buffer = bufnr }
|
||||||
-- vim.api.nvim_create_autocmd("BufWritePre", {
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
-- group = augroup,
|
group = augroup,
|
||||||
-- buffer = bufnr,
|
buffer = bufnr,
|
||||||
-- callback = function()
|
callback = function()
|
||||||
-- vim.lsp.buf.format({ bufnr = bufnr })
|
vim.lsp.buf.format { bufnr = bufnr }
|
||||||
-- end,
|
end,
|
||||||
-- })
|
})
|
||||||
-- end
|
end
|
||||||
--end,
|
end,
|
||||||
} -- end of setup
|
}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue