Skip to content

Commit 2ed4742

Browse files
authored
feat(agenda): add @org.agenda.weekend.today highlight (#1135)
1 parent a214db3 commit 2ed4742

4 files changed

Lines changed: 6 additions & 1 deletion

File tree

doc/orgmode.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2991,6 +2991,7 @@ The following highlight groups are used:
29912991
- `@org.agenda.day`: Highlight for all days in Agenda view - linked to `Statement`
29922992
- `@org.agenda.today`: Highlight for today in Agenda view - linked to `@org.bold`
29932993
- `@org.agenda.weekend`: Highlight for weekend days in Agenda view - linked to `@org.bold`
2994+
- `@org.agenda.weekend.today`: Highlight for today when it is a weekend day in Agenda view - linked to `@org.bold`
29942995

29952996
📝 NOTE: Colors used for todo keywords and agenda states (deadline, schedule
29962997
ok, schedule warning) are parsed from the current colorscheme from several

docs/configuration.org

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2966,6 +2966,7 @@ The following highlight groups are used:
29662966
- =@org.agenda.day=: Highlight for all days in Agenda view - linked to =Statement=
29672967
- =@org.agenda.today=: Highlight for today in Agenda view - linked to =@org.bold=
29682968
- =@org.agenda.weekend=: Highlight for weekend days in Agenda view - linked to =@org.bold=
2969+
- =@org.agenda.weekend.today=: Highlight for today when it is a weekend day in Agenda view - linked to =@org.bold=
29692970

29702971
📝 NOTE:
29712972
Colors used for todo keywords and agenda states (deadline, schedule ok,

lua/orgmode/agenda/types/agenda.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,9 @@ function OrgAgendaType:render(bufnr, current_line)
259259

260260
agendaView:add_line(AgendaLine:single_token({
261261
content = self:_format_day(agenda_day.day),
262-
hl_group = add_highlight and (is_today and '@org.agenda.today' or '@org.agenda.weekend') or nil,
262+
hl_group = add_highlight
263+
and ((is_today and is_weekend) and '@org.agenda.weekend.today' or (is_today and '@org.agenda.today') or '@org.agenda.weekend')
264+
or nil,
263265
}, {
264266
metadata = {
265267
agenda_day = agenda_day.day,

syntax/orgagenda.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ syn match @org.agenda.tag /:[^ ]*:$/
44
hi default link @org.agenda.day Statement
55
hi default link @org.agenda.today @org.bold
66
hi default link @org.agenda.weekend @org.bold
7+
hi default link @org.agenda.weekend.today @org.bold
78
hi default link @org.agenda.header Comment
89
hi default link @org.agenda.separator Comment
910
hi default @org.agenda.tag gui=bold cterm=bold

0 commit comments

Comments
 (0)