From 7ca6a1c1b8eb0f2b6856878b0cf14f574cf54653 Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Tue, 21 Mar 2023 17:21:47 +0530 Subject: [PATCH] nvim: after/ftplugin/rust: Remove format on save Formatting on save tends to go completely wrong sometimes for some reason. Just remove it. --- nvim/.config/nvim/after/ftplugin/rust.lua | 7 ------- 1 file changed, 7 deletions(-) diff --git a/nvim/.config/nvim/after/ftplugin/rust.lua b/nvim/.config/nvim/after/ftplugin/rust.lua index 6f8fca5..b8be7c9 100644 --- a/nvim/.config/nvim/after/ftplugin/rust.lua +++ b/nvim/.config/nvim/after/ftplugin/rust.lua @@ -12,13 +12,6 @@ vim.keymap.set('n', 'cbd', ":Dispatch! cargo doc" , { noremap=true, bu vim.keymap.set('n', 'cdD', ":Dispatch! cargo doc --open", { noremap=true, buffer=0 }) vim.keymap.set('n', 'cbu', ":Dispatch! cargo update" , { noremap=true, buffer=0 }) -vim.api.nvim_create_autocmd({ "BufWritePre" }, { - buffer = 0, - callback = function() - vim.lsp.buf.format({async=true}) - end, -}) - vim.api.nvim_create_autocmd({ "BufReadPre", "BufWinEnter" }, { pattern = { "*/git/checkouts/*", "*/toolchains/*", "*cargo/registry/*" }, callback = function()