Skip to content

Commit

Permalink
feat: expose registers to customize order
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed May 26, 2021
1 parent 20a85bd commit 2b83fe7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lua/which-key/plugins/registers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ M.actions = {
{ trigger = "<c-r>", mode = "i" },
}

local registers = '*+"-:.%/#=_abcdefghijklmnopqrstuvwxyz0123456789'
M.registers = '*+"-:.%/#=_abcdefghijklmnopqrstuvwxyz0123456789'

local labels = {
['"'] = "last deleted, changed, or yanked content",
Expand All @@ -30,8 +30,8 @@ local labels = {
function M.run(_trigger, _mode, _buf)
local items = {}

for i = 1, #registers, 1 do
local key = registers:sub(i, i)
for i = 1, #M.registers, 1 do
local key = M.registers:sub(i, i)
local ok, value = pcall(vim.fn.getreg, key)
if not ok then
value = ""
Expand Down

0 comments on commit 2b83fe7

Please sign in to comment.