Skip to content

Commit

Permalink
Add indicator to :ObsidianDailies entries that don't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
epwalsh committed Mar 12, 2024
1 parent 5747ae3 commit 538cd94
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

### Changed

- Add indicator to entries that don't exist yet in `:ObsidianDailies` picker list.

## [v3.7.2](https://github.com/epwalsh/obsidian.nvim/releases/tag/v3.7.2) - 2024-03-12

### Changed
Expand Down
2 changes: 1 addition & 1 deletion lua/obsidian/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1831,7 +1831,7 @@ end
---
---@param datetime integer|?
---
---@return obsidian.Path, string
---@return obsidian.Path, string (Path, ID) The path and ID of the note.
Client.daily_note_path = function(self, datetime)
datetime = datetime and datetime or os.time()

Expand Down
3 changes: 3 additions & 0 deletions lua/obsidian/commands/dailies.lua
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ return function(client, data)
elseif offset == 1 then
daily_note_alias = daily_note_alias .. " @tomorrow"
end
if not daily_note_path:is_file() then
daily_note_alias = daily_note_alias .. " ➡️ create"
end
dailies[#dailies + 1] = {
value = offset,
display = daily_note_alias,
Expand Down

0 comments on commit 538cd94

Please sign in to comment.