Open
Description
Description
When <leader>
is set to space key
, it doesn't work in diff4_mixed view. Instead, space key
is recognized. If <leader>
is set to \
, the default, <leader>
is working as expected. Therefore, I can proceed with the diffview mappings starting with <leader>
.
Expected behavior
No response
Actual behavior
The behavior is described in the description section above.
Steps to reproduce
In .gitconfig
[mergetool "diffview"]
cmd = nvim -n -c "DiffviewOpen" "$MERGE"
In init.lua
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
- Make a git conflict.
- git mergetool
- Diffview is opened
- Press
<leader>
Health check
Output of :checkhealth diffview
==============================================================================
diffview: require("diffview.health").check()
Checking plugin dependencies ~
- ✅ OK nvim-web-devicons installed.
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.34.1)
- ⚠️ WARNING Configured `hg_cmd` is not executable: 'hg'
Log info
Relevant info from :DiffviewLog
[INFO 2025-05-11 12:39:49.520 +0900] ...al/share/nvim/plugged/diffview.nvim/lua/diffview/lib.lua:24: [command call] :DiffviewOpen
[INFO 2025-05-11 12:39:49.704 +0900] ...iffview.nvim/lua/diffview/scene/views/diff/diff_view.lua:488: [DiffView] Completed update for 8 files successfully (86.617 ms)
Neovim version
NVIM v0.11.1
Build type: Release
LuaJIT 2.1.1741730670
Operating system and version
Linux 5.15.167.4-microsoft-standard-WSL2 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
require("diffview").setup({
-- ##############################################################################
-- ### ADD DIFFVIEW.NVIM CONFIG THAT IS _NECESSARY_ FOR REPRODUCING THE ISSUE ###
-- ##############################################################################
})
vim.opt.termguicolors = true
vim.cmd("colorscheme " .. (vim.fn.has("nvim-0.8") == 1 and "habamax" or "slate"))
-- ############################################################################
-- ### ADD INIT.LUA SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE ###
-- ############################################################################
print("Ready!")