Skip to content

feat(agenda): highlight upcoming deadlines as @org.agenda.deadline.upcoming#1138

Merged
kristijanhusak merged 2 commits into
nvim-orgmode:masterfrom
vollowx:feat/ddl-upcoming
May 3, 2026
Merged

feat(agenda): highlight upcoming deadlines as @org.agenda.deadline.upcoming#1138
kristijanhusak merged 2 commits into
nvim-orgmode:masterfrom
vollowx:feat/ddl-upcoming

Conversation

@vollowx
Copy link
Copy Markdown
Contributor

@vollowx vollowx commented May 3, 2026

AI-assisted: Claude Sonnet 4.6 from GitHub Copilot

Summary

Added @org.agenda.deadline.upcoming for upcoming deadlines, especially for the deadline items shown at today.

Before:

image

After: Upcoming deadline items shown at today are no longer highlighted as scheduled_past.

image

Related Issues

Closes #1137

Changes

  • Added a new highlight @org.agenda.deadline.upcoming defaults to the same style as @org.agenda.scheduled_past
    • lua/orgmode/colors/highlights.lua
    • lua/orgmode/colors/init.lua
  • Highlight upcoming deadlines shown e.g. at today as the highlight above, in lua/orgmode/agenda/agenda_item.lua
  • Update tests in agenda/agenda_item_spec.lua and color/color_specs.lua to use the new highlight name

Notes:

I updated the tests yet when I do make test, there're some not passing but unrelated to this MR.

Also I'd suggest to change ...scheduled_past to ...scheduled.past, and make it clearer in the code, that is to stop using warning and use the highlight names directly.

Checklist

I confirm that I have:

  • Followed the
    Conventional Commits
    specification
    (e.g., feat: add new feature, fix: correct bug,
    docs: update documentation).
  • My PR title also follows the conventional commits specification.
  • Updated relevant documentation, if necessary.
  • Thoroughly tested my changes.
  • Added tests (if applicable) and verified existing tests pass with
    make test.
  • Checked for breaking changes and documented them, if any.

Copy link
Copy Markdown
Member

@kristijanhusak kristijanhusak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@kristijanhusak kristijanhusak merged commit 260a366 into nvim-orgmode:master May 3, 2026
11 checks passed
@vollowx vollowx deleted the feat/ddl-upcoming branch May 3, 2026 14:33
@vollowx
Copy link
Copy Markdown
Contributor Author

vollowx commented May 3, 2026

Thanks for your quick response!

As mentioned above, I'd suggest to:

  1. Rename @org.agenda.scheduled_past --> @org.agenda.scheduled.past to follow the treesitter highlight convention
  2. Stop using warning to refer to scheduled_past hl in code, instead use directly scheduled_past.

I'd like to know your opinions on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Future deadlines are highlighted as scheduled_past

2 participants