user/neovim: autosave tex, and autosave while in insert
This commit is contained in:
parent
870fc4e2d7
commit
480208b718
1 changed files with 2 additions and 2 deletions
|
|
@ -69,14 +69,14 @@ vim.cmd("au FileType rust highlight DiagnosticUnderlineHint ctermfg=14 gui=itali
|
|||
-- Plugins
|
||||
require('autoclose').setup {}
|
||||
local function autosavecond(buf)
|
||||
if vim.tbl_contains({"astro"}, vim.fn.getbufvar(buf, "&filetype")) then
|
||||
if vim.tbl_contains({"astro", "tex"}, vim.fn.getbufvar(buf, "&filetype")) then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
require('auto-save').setup {
|
||||
trigger_events = {
|
||||
defer = { "InsertLeave", "TextChanged", "TextChangedI" },
|
||||
defer_save = { "InsertLeave", "TextChanged", "TextChangedI" },
|
||||
},
|
||||
debounce_delay = 250,
|
||||
condition = autosavecond,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue