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.
|
-- Autoformat on save.
|
||||||
if client.supports_method("textDocument/formatting") then
|
if client.supports_method("textDocument/formatting") then
|
||||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
buffer = bufnr,
|
pattern = '*.py,*.rs',
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.lsp.buf.format()
|
vim.lsp.buf.format()
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Reference in a new issue