feat: add weekly notes support with ISO week numbers#31
Open
feat: add weekly notes support with ISO week numbers#31
Conversation
Add comprehensive weekly notes functionality to complement daily notes:
- Create weekly.lua module with ISO week number calculation
- Add keybindings: <leader>nw (this week), <leader>nwl (last week), <leader>nwn (next week)
- Change workspace picker to <leader>nW to avoid keymap conflict
- Add :MarkdownNotesWeeklyOpen command with offset support
- Add template variables: week_number, week_year, week_id, full_date, year, month, day_name
- Include weekly_spec.lua test file
- Update README with weekly notes documentation and examples
Weekly notes use format: W{week}-{year}-Weekly-Review.md
ISO weeks start on Monday, Week 1 contains first Thursday of year
Automatically applies Weekly.md template if available
Fixes #16
Changed weekly_note_this_week keybinding from <leader>nw to <leader>nww to prevent WhichKey waiting for additional keys when <leader>nwl and <leader>nwn are also bound. Also clarified workspace picker uses <leader>nW.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements weekly notes functionality as outlined in IMPROVEMENTS.md (top priority recommendation). This adds comprehensive support for ISO week-based notes to complement the existing daily notes feature.
Features Added
Core Functionality
lua/markdown-notes/weekly.lua) with proper ISO week number calculationW{week}-{year}-Weekly-Review.md(e.g.,W03-2025-Weekly-Review.md)New Keybindings
<leader>nw- Open this week's note<leader>nwl- Open last week's note<leader>nwn- Open next week's note<leader>nW- Workspace picker (changed from<leader>nwto avoid conflict)New Commands
:MarkdownNotesWeeklyOpen [offset]- Open weekly note with optional week offset:MarkdownNotesDailyOpen [offset]- Added daily command for consistencyEnhanced Template Variables
Added missing template variables that were referenced in templates but not defined:
{{week_number}}- ISO week number (e.g., "03"){{week_year}}- Year for the week (e.g., "2025"){{week_id}}- Week identifier (e.g., "W03-2025"){{full_date}}- Full date format (e.g., "Wednesday, January 15, 2025"){{year}}- Current year{{month}}- Current month name{{day_name}}- Current day nameDocumentation
Testing
tests/markdown-notes/weekly_spec.luatest fileBreaking Changes
<leader>nwto<leader>nW(capital W) to accommodate weekly notesCloses
Fixes #16
Checklist