nvim: set extenstions for autoformatting
This commit is contained in:
parent
edd62c6301
commit
705dd7ed3f
1 changed files with 1 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue