refactor(nvim): remove auto format on save

This commit is contained in:
Price Hiller 2022-10-24 23:05:18 -05:00
parent a5d2250d92
commit 3293519130

View File

@ -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,
})