bensadeh/tailspin

Unable to disable `Date` group in log output?

peterkos opened this issue · 4 comments

Hi!

I'm struggling to disable the highlight group for Date, i.e., hide the Date column in log output

From README:

To disable a highlight group, either comment it out or delete it.

I've attempted:

# 1) comment out
#[groups.date]

# 2) set disabled = true
[groups.date]
disabled = true

It looks like I can set disabled on Date and it should work? I may be missing something obvious here 😅

pub struct Date {
pub date: Style,
pub time: Style,
pub zone: Style,
#[serde(default)]
pub disabled: bool,
}

Ah, on second thought: I think I'm mixing up "disable highlight group" with "hide a group in output" 👀 which is my end goal

Hello there!

Ah, I see, that's an interesting feature request! I guess it is somewhat related to #9? That issue has been put on hold because it is somewhat complex (like you mentioned).

However, adding a way to omit / hide the date might be a simpler stop-gap solution until something better is in place for the dates.

Yeah; I'm playing around with this locally, will post updates when something ✨ tangible has appeared

Hi again @peterkos ,

I've merged the changes into main from #50.

The changes allows you to shorten the date and time segments into another string (which can be empty) like so:

[date]
shorten = { to = "", style = { fg = "magenta" } }

[time]
shorten = { to = "", style = { fg = "blue" } }

Let me know if this is a good solution for you.