From b04ff241e146fa60be4828dc0413dd9fbcd370e1 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Mon, 23 Oct 2023 01:27:30 +0200 Subject: nvim: Automatically refresh buffers when changed --- .config/nvim/lua/mango/set.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to '.config/nvim/lua/mango/set.lua') diff --git a/.config/nvim/lua/mango/set.lua b/.config/nvim/lua/mango/set.lua index 73f4dc6..ef51683 100644 --- a/.config/nvim/lua/mango/set.lua +++ b/.config/nvim/lua/mango/set.lua @@ -49,6 +49,13 @@ api.nvim_create_autocmd('BufEnter', { group = augroup, }) +api.nvim_create_autocmd('FocusGained', { + callback = function() + vim.cmd('checktime') + end, + group = augroup, +}) + opt.foldmethod = 'expr' opt.foldexpr = 'nvim_treesitter#foldexpr()' -- cgit v1.2.3