diff options
Diffstat (limited to 'init.lua')
| -rw-r--r-- | init.lua | 22 |
1 files changed, 0 insertions, 22 deletions
@@ -123,28 +123,6 @@ vim.api.nvim_create_autocmd("TextYankPost", { end, }) --- Reload file when changed outside of nvim -vim.opt.autoread = false -- Must be false for FileChangedShell to trigger when the buffer was not changed --- The manual says that FileChangedShell is triggered on FocusGained but it's not true. This function actually triggers --- the next FileChangedShell when the buffer has unsaved changes and the file was modified outside of nvim. -vim.api.nvim_create_autocmd({ "FocusGained" }, { - desc = "Trigger buffer reload when file is edited outside of nvim", - group = vim.g.dotfiles.augroup, - callback = function() - vim.cmd.checktime() - end, -}) -vim.api.nvim_create_autocmd({ "FileChangedShell" }, { - desc = "Prompt user to reload buffer when modified outside of nvim", - group = vim.g.dotfiles.augroup, - pattern = "*", - callback = function() - if vim.v.fcs_reason == "conflict" or vim.v.fcs_reason == "changed" then - vim.v.fcs_choice = "ask" - end - end, -}) - ------------------------------------------------------------------------------------------------------------------------ -- Commands (there's more in the different plugins) ------------------------------------------------------------------------------------------------------------------------ |
