nvim: set extenstions for autoformatting

This commit is contained in:
Vladan Popovic 2024-10-03 11:20:34 +02:00
parent edd62c6301
commit 705dd7ed3f

View file

@ -12,7 +12,7 @@ local common_on_attach = function(client, bufnr)
-- Autoformat on save.
if client.supports_method("textDocument/formatting") then
vim.api.nvim_create_autocmd("BufWritePre", {
buffer = bufnr,
pattern = '*.py,*.rs',
callback = function()
vim.lsp.buf.format()
end,