How to make a dot repeat with lua function?

Hi i see we already have many plugin use lua but they can’t repeat with dot.
Is there anyway to make a lua function can repeat with vim-repeat?

From vim-repeats example I can’t see why lua plugins won’t be able to . it maps against keymaps not functions

call repeat#set("\<Plug>MyWonderfulMap", v:count)

That traslated to lua will be

vim.fn['repeat#set']("<Plug>MyWonderfulMap", vim.v.count)

If you’re saying how to map a lua functions to keymaps you could do something like

vim.api.nvim_set_keymap('n', '<Plug>MyWonderfulMap', ":lua require'My_module'.my_function()<CR>", {noremap=true})

You need to properly escape the plug mapping.
This should do it:

vim.fn['repeat#set'](vim.api.nvim_replace_termcodes('<Plug>MyWonderfulMap', true, false, true), vim.v.count)