I would like to create dynamic menu items in Main.sublime-menu. They would either get their caption or checked/nonchecked value from the result of a plugin.
I know it must be possible, since it is already done in Main.sublime-menu to show the “Open Recent” file list. Somehow, the following menu entry shows as its caption the most recently opened file:
{ "command": "open_recent_file", "args": {"index": 0 } },
How does the File > Open Recent list show the filename as its caption in the menu? How can I do something similar to implement a return value from a plugin that will feed the value of the menu item caption? What about if I want a menu item to have its checked/nonchecked value as the result of a plugin return value? Thanks.