diff options
Diffstat (limited to '.config')
-rw-r--r-- | .config/nvim/lua/mango/set.lua | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/.config/nvim/lua/mango/set.lua b/.config/nvim/lua/mango/set.lua index e7a7d21..906dc26 100644 --- a/.config/nvim/lua/mango/set.lua +++ b/.config/nvim/lua/mango/set.lua @@ -51,11 +51,16 @@ api.nvim_create_autocmd('BufEnter', { }) -- Make buffer auto-reverting work… somehow -g.autoread = true -api.nvim_create_autocmd('CursorHold', { - command = 'checktime | call feedkeys("lh")', - group = augroup, -}) +vim.cmd([[ + if !exists('g:CheckUpdateStarted') + let g:CheckUpdateStarted = 1 + call timer_start(1000, 'CheckUpdate', {'repeat': -1}) + endif + + function! CheckUpdate(_) + silent! checktime + endfunction +]]) -- This has to be done to enable linenumbers in netrw g.netrw_bufsettings = 'noma nomod nu nobl nowrap ro' |