From a00993820f0d7df9cb13132337d483e1675e8adc Mon Sep 17 00:00:00 2001 From: Barrett Ruth <62671086+barrettruth@users.noreply.github.com> Date: Sun, 15 Feb 2026 18:55:54 -0500 Subject: [PATCH] docs: add lazy.nvim installation FAQ (#125) ## Problem Users attempt to lazy-load diffs.nvim with `event`, `ft`, `lazy`, or `keys` options, which interferes with the plugin's own `FileType` autocmd registered at startup. ## Solution Add a FAQ entry with a correct lazy.nvim snippet using `init` and a note explaining that the plugin lazy-loads itself. --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 0cce463..0a45156 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,22 @@ luarocks install diffs.nvim ## FAQ +**How do I install with lazy.nvim?** + +```lua +{ + 'barrettruth/diffs.nvim', + init = function() + vim.g.diffs = { + ... + } + end, +} +``` + +Do not lazy load `diffs.nvim` with `event`, `lazy`, `ft`, `config`, or `keys` to +control loading - `diffs.nvim` lazy-loads itself. + **Does diffs.nvim support vim-fugitive/Neogit?** Yes. Enable it in your config: