chromaTokenStyle maps a chroma token type to a lipgloss style using the given chroma style (theme).
(tokenType chroma.TokenType, style *chroma.Style)
| 508 | // chromaTokenStyle maps a chroma token type to a lipgloss style using the |
| 509 | // given chroma style (theme). |
| 510 | func chromaTokenStyle(tokenType chroma.TokenType, style *chroma.Style) lipgloss.Style { |
| 511 | entry := style.Get(tokenType) |
| 512 | s := lipgloss.NewStyle() |
| 513 | if entry.Colour.IsSet() { |
| 514 | s = s.Foreground(lipgloss.Color(entry.Colour.String())) |
| 515 | } |
| 516 | if entry.Bold == chroma.Yes { |
| 517 | s = s.Bold(true) |
| 518 | } |
| 519 | if entry.Italic == chroma.Yes { |
| 520 | s = s.Italic(true) |
| 521 | } |
| 522 | return s |
| 523 | } |
| 524 | |
| 525 | func (m *agentPickerModel) View() tea.View { |
| 526 | var body string |
no test coverage detected