From 0c40342e2956785ad86533f409064cd7524e3dc2 Mon Sep 17 00:00:00 2001 From: Jannik Donker Date: Mon, 27 Apr 2026 08:12:49 +0200 Subject: [PATCH] auto update file/buffer on focus --- lua/options.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/options.lua b/lua/options.lua index 6e52350..6700ca3 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -10,6 +10,11 @@ o.signcolumn = "yes" o.swapfile = false o.winborder = "single" o.termguicolors = true +o.autoread = true + +vim.api.nvim_create_autocmd({ "FocusGained", "BufEnter", "CursorHold", "CursorHoldI" }, { + command = "if mode() != 'c' | checktime | endif", +}) vim.diagnostic.config({ virtual_text = { prefix = "●", spacing = 2, source = "if_many" },