[mini.pick] Colorscheme picker with preview #951
pkazmier
started this conversation in
Show and tell
Replies: 2 comments 3 replies
-
Very nice! I think there were plans of including something like this in 'mini.extra'. Probably decided that it is fairly trivial to implement and left to the user. I'd also think about applying color scheme not only inside preview, but also after choosing. |
Beta Was this translation helpful? Give feedback.
3 replies
-
Nice! I also use this idea. I did have to set the colorscheme like so: local on_stop = function()
vim.schedule(function() -- must use schedule, otherwise eyeliner stops displaying
vim.cmd.colorscheme(selected_colorscheme)
end)
end |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I added a colorscheme picker to my configuration this morning and thought I'd share in case others were interested. If you preview a colorscheme, it will change your current colorscheme to the one you are previewing. If you cancel the picker, it will revert back to the colorscheme you had before you entered the picker.
Screen.Recording.2024-06-08.at.10.24.59.AM.mov
To track state of the original picker, I added the ability to have custom pre- and post-hooks for individual pickers:
With that in place, here is the definition of my colorscheme picker:
Beta Was this translation helpful? Give feedback.
All reactions