summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/custom/plugins/auto-save.lua
diff options
context:
space:
mode:
authorKyren223 <Kyren223@proton.me>2024-11-19 00:58:09 +0200
committerKyren223 <Kyren223@proton.me>2024-11-19 00:58:09 +0200
commit92010ca06c47eaaa7d39526d5a0f8b3138dfd59d (patch)
treecb30c2752d80f3c771b3285b3b06dd4647b46dec /.config/nvim/lua/custom/plugins/auto-save.lua
parent39b82ef71b84077c6ebd9f53ca1f017e3670243a (diff)
Disabled a bunch of nvim stuff, will re-enable later once I sort things out
Diffstat (limited to '.config/nvim/lua/custom/plugins/auto-save.lua')
-rw-r--r--.config/nvim/lua/custom/plugins/auto-save.lua62
1 files changed, 31 insertions, 31 deletions
diff --git a/.config/nvim/lua/custom/plugins/auto-save.lua b/.config/nvim/lua/custom/plugins/auto-save.lua
index 5da836b..1fac72f 100644
--- a/.config/nvim/lua/custom/plugins/auto-save.lua
+++ b/.config/nvim/lua/custom/plugins/auto-save.lua
@@ -1,33 +1,33 @@
return {
- 'okuuva/auto-save.nvim',
- cmd = 'ASToggle',
- event = { 'InsertLeave', 'TextChanged' },
- opts = function()
- -- Disable autoformat between automatic saves
- vim.api.nvim_create_autocmd('User', {
- pattern = 'AutoSaveWritePre',
- group = vim.api.nvim_create_augroup('autosave-pre', { clear = true }),
- callback = function(opts)
- local bufnr = opts.data.saved_buffer
- vim.b[bufnr].disable_autoformat = true
- end,
- })
-
- vim.api.nvim_create_autocmd('User', {
- pattern = 'AutoSaveWritePost',
- group = vim.api.nvim_create_augroup('autosave-post', { clear = true }),
- callback = function(opts)
- local bufnr = opts.data.saved_buffer
- vim.b[bufnr].disable_autoformat = false
- end,
- })
-
- return {
- -- execution_message = { enabled = false }, removed
- condition = function(buf)
- -- Save only if the buffer is not a "special buffer"
- return vim.fn.getbufvar(buf, '&buftype') == ''
- end,
- }
- end,
+ -- 'okuuva/auto-save.nvim',
+ -- cmd = 'ASToggle',
+ -- event = { 'InsertLeave', 'TextChanged' },
+ -- opts = function()
+ -- -- Disable autoformat between automatic saves
+ -- vim.api.nvim_create_autocmd('User', {
+ -- pattern = 'AutoSaveWritePre',
+ -- group = vim.api.nvim_create_augroup('autosave-pre', { clear = true }),
+ -- callback = function(opts)
+ -- local bufnr = opts.data.saved_buffer
+ -- vim.b[bufnr].disable_autoformat = true
+ -- end,
+ -- })
+ --
+ -- vim.api.nvim_create_autocmd('User', {
+ -- pattern = 'AutoSaveWritePost',
+ -- group = vim.api.nvim_create_augroup('autosave-post', { clear = true }),
+ -- callback = function(opts)
+ -- local bufnr = opts.data.saved_buffer
+ -- vim.b[bufnr].disable_autoformat = false
+ -- end,
+ -- })
+ --
+ -- return {
+ -- -- execution_message = { enabled = false }, removed
+ -- condition = function(buf)
+ -- -- Save only if the buffer is not a "special buffer"
+ -- return vim.fn.getbufvar(buf, '&buftype') == ''
+ -- end,
+ -- }
+ -- end,
}