Skip to content

Commit

Permalink
Different color for custom maps in :RMapsDesc
Browse files Browse the repository at this point in the history
  • Loading branch information
jalvesaq committed Feb 23, 2025
1 parent f57858b commit e8a2b7a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lua/r/maps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -384,9 +384,17 @@ M.show_map_desc = function()
)
table.insert(map_key_desc, { string.format(" %-04s", v[2]), "Type" })
local keymap = v[3] or " "
local syngrp = keymap == "disabled" and "Comment" or "Special"
local modes = vim.split(v[2], "")
for _, m in pairs(modes) do
if get_map_to(v[1], m) ~= "" then
syngrp = "String"
break
end
end
table.insert(map_key_desc, {
string.format("%-0" .. kw .. "s", keymap),
(keymap == "custom" or keymap == "disabled") and "Comment" or "Special",
syngrp,
})
table.insert(map_key_desc, { v[4] .. "\n" })
end
Expand Down

0 comments on commit e8a2b7a

Please sign in to comment.