AstroNvim / astrocommunity

A community repository of common plugin specifications
GNU General Public License v3.0
1.04k stars 212 forks source link

twilight and transparent plugins try to set the same key map #1031

Closed TinyLittleWheatley closed 3 weeks ago

TinyLittleWheatley commented 3 weeks ago

Checklist

Neovim version (nvim -v)

0.10.0 Release

Operating system/version

Debian 12

Terminal/GUI

Windows terminal

Describe the bug

astrocommunity.color.twilight-nvim overwrites <Leader>uT mapping set by astrocommunity.color.transparent-nvim. https://github.com/AstroNvim/astrocommunity/blob/51eb1c1efd58ac35242070db1ec484c7c910a5a7/lua/astrocommunity/color/twilight-nvim/init.lua#L9 https://github.com/AstroNvim/astrocommunity/blob/51eb1c1efd58ac35242070db1ec484c7c910a5a7/lua/astrocommunity/color/transparent-nvim/init.lua#L22

Steps to Reproduce

  1. Follow install instructions.
  2. Import both plugins.
  3. Reopen neovim and search keymaps.

Expected behavior

To set unique mappings for plugins that can be used together.

Screenshots

No response

Additional Context

No response

Minimal configuration

-- save as repro.lua
-- run with nvim -u repro.lua
-- DO NOT change the paths
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "runtime", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  -- stylua: ignore
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
end
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)

-- install plugins
local plugins = {
  { "AstroNvim/AstroNvim", import = "astronvim.plugins" },
  {
  "AstroNvim/astrocommunity",

  { import = "astrocommunity.color.transparent-nvim" },
  { import = "astrocommunity.color.twilight-nvim" },
},

  -- add any other plugins/customizations here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

-- add anything else here (autocommands, vim.filetype, etc.)
Uzaaft commented 3 weeks ago

@TinyLittleWheatley We have multiple plugins that override each other in terms of keymaps. At a certain point, it's doomed to happen. Feel free to open a PR with a proposed keymap, or override it yourself.