Closed dtomvan closed 1 year ago
3 problems:
-
is a magic characters so you need to escape it. (see Programming in Lua)length
is the length of the final matched string, so it should be 6.key:sub(7)
should be key:sub(6)
to get the final character of the string.["<C%-W>[hjkl]"] = {
message = function(keys)
return "Use <A-" .. keys:sub(6) .. "> instead of " .. keys
end,
length = 6,
},
This should work.
Btw, I am really happy to know that there are people using the custom hint configuration!
Please consider sharing your custom hints in the discussion. I am curious about what other people have created!
3.
key:sub(6)
should bekey:sub(7)
to get the final character of the string.
<C-W>h
123456 <<<
Nope, it is really 6. Thanks for helping, though. It works now!
Also, thank you so much for adding all of the builtin hints. They are really useful and must've taken a long time to come up with and write.
Describe the bug When defining a hint with a key combination containing a modifier, for example
<C-W>
, it will not trigger.Config options Consider the following hint:
Expected behavior When typing instead of h" should be shown.
<C-W>h
, the hint "UseScreenshots N/A
Additional context N/A