Skip to content

Commit

Permalink
fix: immediately show registers and marks. Fixes #144
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Aug 5, 2021
1 parent 40f493d commit 653ce71
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lua/which-key/plugins/marks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@ local M = {}

M.name = "marks"

M.actions = {
M.actions = {
{ trigger = "`", mode = "n" },
{ trigger = "'", mode = "n" },
{ trigger = "g`", mode = "n" },
{ trigger = "g'", mode = "n" },
}

function M.setup(_wk, _config, options)
for _, action in ipairs(M.actions) do
table.insert(options.triggers_nowait, action.trigger)
end
end

local labels = {
["^"] = "Last position of cursor in insert mode",
["."] = "Last change in current buffer",
Expand Down
6 changes: 6 additions & 0 deletions lua/which-key/plugins/registers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ M.actions = {
{ trigger = "<c-r>", mode = "c" },
}

function M.setup(_wk, _config, options)
for _, action in ipairs(M.actions) do
table.insert(options.triggers_nowait, action.trigger)
end
end

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

local labels = {
Expand Down

0 comments on commit 653ce71

Please sign in to comment.