Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
4 tasks done
TinyLittleWheatley opened this issue Jun 9, 2024 · 1 comment · Fixed by #1033
Closed
4 tasks done

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

TinyLittleWheatley opened this issue Jun 9, 2024 · 1 comment · Fixed by #1033
Labels
bug Something isn't working

Comments

@TinyLittleWheatley
Copy link
Contributor

Checklist

  • I have searched through the AstroNvim documentation
  • I have searched through the existing issues of this project
  • I have searched the existing issues of plugins related to this issue
  • I can replicate the bug with the minimal repro.lua provided below

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.

["<Leader>uT"] = { "<Cmd>Twilight<CR>", desc = "Toggle Twilight" },

["<Leader>uT"] = { "<Cmd>TransparentToggle<CR>", desc = "Toggle transparency" },

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.)
@TinyLittleWheatley TinyLittleWheatley added the bug Something isn't working label Jun 9, 2024
@Uzaaft
Copy link
Member

Uzaaft commented Jun 9, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants