Skip to content

Commit

Permalink
feat: Hide mapping when desc = "which_key_ignore" (#391)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdoury committed Jan 10, 2023
1 parent 85f69b0 commit fd07b61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/which-key/keys.lua
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function M.get_mappings(mode, prefix_i, buf)
ret.mapping = vim.tbl_deep_extend("force", {}, ret.mapping or {}, node.mapping)
end
for k, child in pairs(node.children) do
if child.mapping and child.mapping.label ~= "which_key_ignore" then
if child.mapping and child.mapping.label ~= "which_key_ignore" and child.mapping.desc ~= "which_key_ignore" then
ret.mappings[k] = vim.tbl_deep_extend("force", {}, ret.mappings[k] or {}, child.mapping)
end
end
Expand Down

0 comments on commit fd07b61

Please sign in to comment.