How to react to actions like changing the current focused item or closing snap?
leiserfg opened this issue · 1 comments
leiserfg commented
I'm thinking to add a colorscheme picker for snap but those are stoppers for me.
My plan with the current API is like
- Producer stores the current colorscheme and produces the list of known ones.
- A preview that changes the colorsheme to the one selected and shows something in the buffer (as it's required) like a line with several words highlighted using the termial_color_# (this is a workaround to the fact that there is not, as far as I know, how to react to focusing an item)
- If the user selects it we have nothing to do as the theme is already set.
- If the user cancels (ESC) we just have to bring back the old colorscheme (I don't know how to implement it properly or at least workaround it )
camspiers commented
Really interesting ideas, I will have to think about the API for this, because it's definitely doable.