Description
Not sure if this feature is supposed to be implemented in the file history or not.
in the default config, there is a g<C-x> keybind for it but in the config section in the docs, there is no file_history field under view.cycle_layouts
E5108: Lua: ...are/nvim/lazy/diffview/lua/diffview/scene/file_entry.lua:131: attempt to index field 'revs' (a nil value)
stack traceback:
...are/nvim/lazy/diffview/lua/diffview/scene/file_entry.lua:131: in function 'convert_layout'
....local/share/nvim/lazy/diffview/lua/diffview/actions.lua:649: in function <....local/share/nvim/lazy/diffview/lua/diffview/actions.lua:593>
Expected behavior
Either it cycles the layout or remove from default config
Actual behavior
Error
Steps to reproduce
- open file history
- invoke
cycle_layouts keybind (g<C-x> by default)
Health check
Output of :checkhealth diffview
diffview: 2 ⚠️
Checking plugin dependencies ~
- ✅ OK nvim-web-devicons installed.
- ⚠️ WARNING Optional dependency 'mini.icons' not found.
Checking VCS tools ~
- The plugin requires at least one of the supported VCS tools to be valid.
- ✅ OK Git found.
- ✅ OK Git is up-to-date. (2.53.0)
- ⚠️ WARNING Configured `hg_cmd` is not executable: 'hg'
Log info
Relevant info from :DiffviewLog
Neovim version
NVIM v0.12.0-dev-2026+g7a6e8d4430
Build type: RelWithDebInfo
LuaJIT 2.1.1767980792
Operating system and version
Linux 6.18.5-arch1-1 x86_64 GNU/Linux
Minimal config
-- #######################################
-- ### USAGE: nvim --clean -u mini.lua ###
-- #######################################
local root = vim.fn.stdpath("run") .. "/nvim/diffview.nvim"
local plugin_dir = root .. "/plugins"
vim.fn.mkdir(plugin_dir, "p")
for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
local plugins = {
{ "nvim-web-devicons", url = "https://github.com/nvim-tree/nvim-web-devicons.git" },
{ "diffview.nvim", url = "https://github.com/sindrets/diffview.nvim.git" },
-- ##################################################################
-- ### ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE ###
-- ##################################################################
}
for _, spec in ipairs(plugins) do
local install_path = plugin_dir .. "/" .. spec[1]
if vim.fn.isdirectory(install_path) ~= 1 then
if spec.url then
print(string.format("Installing '%s'...", spec[1]))
vim.fn.system({ "git", "clone", "--depth=1", spec.url, install_path })
end
end
vim.opt.runtimepath:append(spec.path or install_path)
end
-- DEFAULT CONFIG
require("diffview").setup({})
vim.opt.termguicolors = true
vim.cmd("colorscheme " .. (vim.fn.has("nvim-0.8") == 1 and "habamax" or "slate"))
print("Ready!")
Description
Not sure if this feature is supposed to be implemented in the file history or not.
in the default config, there is a
g<C-x>keybind for it but in the config section in the docs, there is nofile_historyfield underview.cycle_layoutsExpected behavior
Either it cycles the layout or remove from default config
Actual behavior
Error
Steps to reproduce
cycle_layoutskeybind (g<C-x>by default)Health check
Output of
:checkhealth diffviewLog info
Relevant info from
:DiffviewLogNeovim version
Operating system and version
Linux 6.18.5-arch1-1 x86_64 GNU/Linux
Minimal config