lipgloss icon indicating copy to clipboard operation
lipgloss copied to clipboard

Colored and styled underlines

Open aymanbagabas opened this issue 9 months ago • 2 comments

Is your feature request related to a problem? Please describe. Many terminals and programs such as Kitty, Ghostty, iTerm2, and Neovim support styled underlines. This is described in details here https://sw.kovidgoyal.net/kitty/underlines/

Describe the solution you'd like Lip Gloss should be able to change underline style and color.

Describe alternatives you've considered Using x/ansi directly.

Additional context https://sw.kovidgoyal.net/kitty/underlines/

aymanbagabas avatar Mar 10 '25 20:03 aymanbagabas

This looks good, but let's target v2.x. This should be implemented with /x/ansi, correct?

meowgorithm avatar Mar 10 '25 21:03 meowgorithm

This looks good, but let's target v2.x. This should be implemented with /x/ansi, correct?

Correct, x/ansi already supports this, we just need to figure out how the API would work with style.Underline(bool). Do we want style.UnderlineStyle(...) or since this is targeting v2, do we want to repurpose style.Underline(UnderlineStyle, color.Color)? How would we support underline colors? style.UnderlineColor(...) is not consistent with style.Foreground(...)

Things to keep in mind while thinking about this 🙂

aymanbagabas avatar Mar 10 '25 21:03 aymanbagabas