From 329351913056392d61b46179db2f9b5f3500e7f8 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Mon, 24 Oct 2022 23:05:18 -0500 Subject: [PATCH] refactor(nvim): remove auto format on save --- .../primary/config/lua/plugins/autocmds.lua | 31 ------------------- 1 file changed, 31 deletions(-) diff --git a/dots/.nvim-environments/primary/config/lua/plugins/autocmds.lua b/dots/.nvim-environments/primary/config/lua/plugins/autocmds.lua index 08a47c24..e69de29b 100755 --- a/dots/.nvim-environments/primary/config/lua/plugins/autocmds.lua +++ b/dots/.nvim-environments/primary/config/lua/plugins/autocmds.lua @@ -1,31 +0,0 @@ -vim.api.nvim_create_autocmd('BufWritePre', { - pattern = '*', - callback = function() - local filetype = vim.bo.filetype - local neoformat_types = { 'sh' } - local ignore_types = { 'sql' } - - for _, ig_type in ipairs(ignore_types) do - if filetype == ig_type then - return - end - end - - for _, nf_type in ipairs(neoformat_types) do - if filetype == nf_type then - vim.cmd('Neoformat') - return - end - end - - vim.cmd('lua vim.lsp.buf.format({})') - end, -}) - -vim.api.nvim_create_autocmd('BufWritePost', { - pattern = '**/nvim/lua/plugins/plugins.lua', - callback = function() - vim.notify('Compiling Packer') - require('packer').compile() - end, -})