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
|
-- Plugins
|
||||||
require('autoclose').setup {}
|
require('autoclose').setup {}
|
||||||
local function autosavecond(buf)
|
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
|
return true
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
require('auto-save').setup {
|
require('auto-save').setup {
|
||||||
trigger_events = {
|
trigger_events = {
|
||||||
defer = { "InsertLeave", "TextChanged", "TextChangedI" },
|
defer_save = { "InsertLeave", "TextChanged", "TextChangedI" },
|
||||||
},
|
},
|
||||||
debounce_delay = 250,
|
debounce_delay = 250,
|
||||||
condition = autosavecond,
|
condition = autosavecond,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue