Help: color on fzf register_ui_select items #1513
Answered
by
ibhagwan
serranomorante
asked this question in
Q&A
-
Hi! I'm using the register_ui_select utility. I like it a lot. Could you refer to me any code snippet or existent example on how can I add a color to item 2 in the screenshot? Right now I'm using the hand-point-right icon, but adding a different color just to that line would be a really good visual aid to my current selected item. Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
ibhagwan
Nov 4, 2024
Replies: 1 comment 1 reply
-
You need to use terminal ansi escape sequences, you can use fzf-lua's own utils to convert neovim hl to an ansi escape sequence: := require("fzf-lua").utils.ansi_from_hl("IncSearch", "text")
-- First ret val should be the wrapped string, something like:
-- ^[[48;2;255;203;139m^[[38;2;1;22;39mtext^[[0m |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
serranomorante
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You need to use terminal ansi escape sequences, you can use fzf-lua's own utils to convert neovim hl to an ansi escape sequence: