From 705dd7ed3f7b98bb3137b4a1f3b9809b9a72f20f Mon Sep 17 00:00:00 2001 From: Vladan Popovic Date: Thu, 3 Oct 2024 11:20:34 +0200 Subject: [PATCH] nvim: set extenstions for autoformatting --- dotfiles/.config/nvim/lua/lsp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotfiles/.config/nvim/lua/lsp.lua b/dotfiles/.config/nvim/lua/lsp.lua index 85e4cd7..85f9e8f 100644 --- a/dotfiles/.config/nvim/lua/lsp.lua +++ b/dotfiles/.config/nvim/lua/lsp.lua @@ -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,