Skip to content

Commit

Permalink
fix(mini-clue): update to new which-key v3 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed Jul 12, 2024
1 parent 09a82e1 commit 2c5063b
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions lua/astrocommunity/keybinding/mini-clue/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,15 @@ return {
return vim.tbl_map(function(trigger) return { trigger.keys, mode = trigger.mode } end, opts.triggers or {})
end,
opts = function()
local miniclue = require "mini.clue"
local miniclue, astrocore = require "mini.clue", require "astrocore"
local astrocore_clues = {}
for mode, maps in pairs(require("astrocore").which_key_queue or {}) do
for keys, map in pairs(maps) do
if type(map) == "table" then
local desc = map.name or map.desc
if desc then table.insert(astrocore_clues, { mode = mode, keys = keys, desc = desc }) end
end
for _, map in ipairs(astrocore.which_key_queue or {}) do
local desc = map.group or map.desc
if type(map) == "table" and map[1] and desc then
table.insert(astrocore_clues, { mode = map.mode, keys = map[1], desc = desc })
end
end
astrocore.which_key_queue = nil
return {
window = { config = { row = "auto", col = "auto" } },
triggers = {
Expand Down

0 comments on commit 2c5063b

Please sign in to comment.