NStefan002 / screenkey.nvim

Screencast your keys in Neovim
MIT License
291 stars 5 forks source link

Provide helper function to access recorded keys #19

Closed cvigilv closed 3 months ago

cvigilv commented 3 months ago

Problem

I would like to see the possibility of a small helper function that give acces to the user to use the recorded keys table, in order to make use of this key presses in other places e.g. statusline/tabline component, key logger for stats, etc.

Expected behavior

I find the implementation of this feature in tamton-aquib/keys.nvim a good example.

NStefan002 commented 3 months ago

Hi! I like your suggestion. Do you mind checking out statusline-component branch and giving me your feedback when you have time? Thanks!

Lazy.nvim snippet:

{
    "NStefan002/screenkey.nvim",
    cmd = "Screenkey",
    branch = "statusline-component",
    opts = {},
}
cvigilv commented 3 months ago

Hi! Thanks for the fast response. I would like to use the statusline component without the floating window of Screenkey. From my testing, I need to have the floating window running in order to get the output with the exposed function.

NStefan002 commented 3 months ago

Thanks for the feedback!

I would like to use the statusline component without the floating window of Screenkey.

Makes sense. I have a few suggestions for this, let me know which one you like the most:

cvigilv commented 3 months ago

I think the best alternative is something like vim.g.screenkey_statusline = true/false, since that way the plugin is not running constantly and produce latency issues or other problems

Thanks!

NStefan002 commented 3 months ago

I added the feature in the statusline-component branch along with the usage example in the how to use section of the README. Can you give me feedback when you have time?

Thanks for all the help

cvigilv commented 3 months ago

works perfect! Thanks!