summaryrefslogtreecommitdiffstats
path: root/.config/nvim/plugin
diff options
context:
space:
mode:
authorThomas Vanbesien <tvanbesi@proton.me>2026-05-22 11:46:08 +0200
committerThomas Vanbesien <tvanbesi@proton.me>2026-05-22 11:46:08 +0200
commit1fb329fc26bfe119dd48b99dba300af87048a132 (patch)
treea64c4d6d71420bdd17f9278079a76da631d4029f /.config/nvim/plugin
parent047fae7cd3e921922aeb628230dbf75b52c43117 (diff)
downloaddotfiles-1fb329fc26bfe119dd48b99dba300af87048a132.tar.gz
dotfiles-1fb329fc26bfe119dd48b99dba300af87048a132.zip
misc(nvim): reload buffer when its file changed on disk
Bump 'updatetime' to 1 second because it affects three things: - swap file save frequency - GitGutter signs update frequency - CursorHold and CursorHoldI trigger frequency 100ms is too high of a frequency. Enable focus events in tmux for nvim 'FocusGained' event, Add two event handlers, one for updating the buffer with `checktime`, another for logging a message when doing so.
Diffstat (limited to '.config/nvim/plugin')
-rw-r--r--.config/nvim/plugin/50-git.lua2
1 files changed, 0 insertions, 2 deletions
diff --git a/.config/nvim/plugin/50-git.lua b/.config/nvim/plugin/50-git.lua
index 609ab93..64e6cd0 100644
--- a/.config/nvim/plugin/50-git.lua
+++ b/.config/nvim/plugin/50-git.lua
@@ -4,8 +4,6 @@
vim.pack.add({ "https://github.com/airblade/vim-gitgutter" }) -- Show git status in the gutter
-vim.opt.updatetime = 100 -- How often the git signs in the gutter update in ms
-
vim.keymap.set("n", "<Leader>gt", "<Cmd>GitGutterLineHighlightsToggle<CR>", { desc = "Toggle git line highlighting" })
vim.keymap.set("n", "<Leader>gg", "<Cmd>GitGutter<CR>", { desc = "Refresh GitGutter" })
vim.keymap.set("n", "<Leader>gq", "<Cmd>GitGutterQuickFix<CR>", { desc = "Git hunks to quickfix list" })