Closed eslam-allam closed 1 month ago
Interestingly enough, the icons are inherited properly in this one:
require("which-key").add({
"<leader>cj",
icon = { icon = "", color = "orange" },
buffer = args.buf,
group = "jdtls",
{ "<leader>cjw", "<cmd>JdtWipeDataAndRestart<CR>", desc = "Wipe and Restart" },
{ "<leader>cjc", "<cmd>JdtCompile<CR>", desc = "Compile" },
{ "<leader>cjs", "<cmd>JdtSetRuntime<CR>", desc = "Set Runtime" },
{
"<leader>cju",
rhs = function()
require("jdtls").update_projects_config({ select_mode = "all" })
end,
desc = "Update Config",
},
{ "<leader>cjr", "<cmd>JdtRestart<CR>", desc = "Restart" },
{ "<leader>cjj", "<cmd>JdtJshell<CR>", desc = "JShell" },
})
end
I cannot figure out why this one works when the one in the min repro doesnt.
Did you check docs and existing issues?
Neovim version (nvim -v)
NVIM v0.11.0-dev+402-g028dd3c5c
Operating system/version
linux fedora-40
Describe the bug
Adding icons to a group works just fine, and it's also inherited by other groups nested within it. However, there are some observations I've found that don't seem to be intended:
I'm not sure if these points are intended or not but it seems counter intuitive as keymaps automatically set by the predefined pattern rules seem to apply to keymaps and groups equally.
Steps To Reproduce
Expected Behavior
keymaps should support icons just like groups do.
Repro