{"id":13896263,"url":"https://github.com/ishchow/nvim-deardiary","last_synced_at":"2025-07-17T12:31:27.414Z","repository":{"id":54508505,"uuid":"318923196","full_name":"ishchow/nvim-deardiary","owner":"ishchow","description":"Journaling plugin for NeoVim","archived":false,"fork":false,"pushed_at":"2022-11-15T15:32:55.000Z","size":53,"stargazers_count":21,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-25T01:33:34.655Z","etag":null,"topics":["lua","neovim-plugin"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ishchow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-06T01:08:01.000Z","updated_at":"2024-11-06T06:41:38.000Z","dependencies_parsed_at":"2023-01-22T03:18:11.825Z","dependency_job_id":null,"html_url":"https://github.com/ishchow/nvim-deardiary","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ishchow/nvim-deardiary","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishchow%2Fnvim-deardiary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishchow%2Fnvim-deardiary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishchow%2Fnvim-deardiary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishchow%2Fnvim-deardiary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ishchow","download_url":"https://codeload.github.com/ishchow/nvim-deardiary/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishchow%2Fnvim-deardiary/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265606638,"owners_count":23796974,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lua","neovim-plugin"],"created_at":"2024-08-06T18:02:46.973Z","updated_at":"2025-07-17T12:31:27.127Z","avatar_url":"https://github.com/ishchow.png","language":"Lua","readme":"![ci](https://github.com/ishchow/nvim-deardiary/workflows/ci/badge.svg)\n\n# Overview\n\ndeardiary is a plugin that makes journaling in neovim easy and convenient.\n\nFeatures:\n- Manage multiple journals\n- Set different frequencies of entries per journal (ex. daily, weekly)\n- Custom frequencies of journal entries (ex. can add quarterly frequencies)\n- Control filesystem paths of new entries\n- Templating of new entires\n\nRequirements:\n- neovim 0.5+\n    - Currently requires latest neovim nightly since 0.5 isn't released yet\n\n# Quickstart\n\n## Installation\n\ndeardiary can be installed just like any other neovim plugin.\n\nPlug: \n\n```\nPlug 'ishchow/nvim-deardiary'\n```\n\nPacker:\n\n``` \nuse 'ishchow/nvim-deardiary'\n```\n\n## Configuration\n\nAdd the following to a file under `$XDG_CONFIG_HOME/nvim/lua` (ex.\n~/.config/nvim/lua/diary.lua)\n\n```lua\nlocal config = require(\"deardiary.config\")\n\nconfig.journals = {\n    {\n        path = \"~/journals/personal\",\n        frequencies = {\"daily\", \"weekly\"},\n    },\n    {\n        path = \"~/journals/work\",\n        frequencies = {\"daily\", \"weekly\", \"monthly\", \"yearly\"},\n    },\n}\n```\n\nThen, in your init.vim file, add this to use your configuration:\n\n```viml\nlua require(\"diary\")\n```\n\n## Usage\n### Basic Usage\nRun the following command to set the active journal from `config.journals`.\n\n`:DearDiarySelectJournal` or `\u003cLeader\u003ejs`.\n\nA menu will open up like this:\n\n```\n1    ~/journals/personal\n2    ~/journals/work\nType in journal index and press \u003cEnter\u003e (empty cancels): \n```\n\nEnter a number to pick the desired journal.\n\nThen, open todays entry using:\n\n`:DearDiaryToday` or `\u003cLeader\u003ejdc`.\n\nToday's entry will be opened in a new buffer and filled with the contents from\na template.\n\n`# Saturday, December 26, 2020`\n\nSave the file and the contents of this buffer will be saved to:\n\n`~/journals/personal/daily/2020/12/26.md`\n\n### Set current journal based on cwd\nIf the current working directory has a common path prefix with any of the\nconfigured journals, you can automatically using this command:\n\n`:DearDiarySetCurrentJournalCwd` or `\u003cLeader\u003ejsc`\n\nTo automatically set the current journal based on the current working\ndirectory upon entering vim, add the following to your init.vim:\n\n```viml\naugroup deardiary\n    autocmd!\n    autocmd VimEnter * lua require(\"deardiary\").set_current_journal_cwd()\naugroup end\n```\n\n## Commands and Mappings\nThe following commands and mappings are provided by the plugin. The mappings\nsimply execute the commands and are provided for convenience.\n\n```vimhelp\n:DearDiarySelectJournal | \u003cPlug\u003e(DearDiarySelectJournal) | \u003cLeader\u003ejs\n    Selects current journal\n\n:DearDiarySetCurrentJournalCwd | \u003cPlug\u003e(DearDiarySetCurrentJournalCwd) | \u003cLeader\u003ejsc\n    Sets the current journal based on the current working directory\n\n:DearDiaryToday | \u003cPlug\u003e(DearDiaryToday) | \u003cLeader\u003ejdc\n    Go to entry for today\n\n:DearDiaryTomorrow | \u003cPlug\u003e(DearDiaryTomorrow) | \u003cLeader\u003ejdn\n    Go to entry for tomorrow\n\n:DearDiaryYesterday | \u003cPlug\u003e(DearDiaryYesterday) | \u003cLeader\u003ejdp\n    Go to entry for yesterday\n\n:DearDiaryThisWeek | \u003cPlug\u003e(DearDiaryThisWeek) | \u003cLeader\u003ejwc\n    Go to entry for this week\n\n:DearDiaryNextWeek | \u003cPlug\u003e(DearDiaryNextWeek) | \u003cLeader\u003ejwn\n    Go to entry for next week\n\n:DearDiaryLastWeek | \u003cPlug\u003e(DearDiaryLastWeek) | \u003cLeader\u003ejwp\n    Go to entry for last week\n\n:DearDiaryThisMonth | \u003cPlug\u003e(DearDiaryThisMonth) | \u003cLeader\u003ejmc\n    Go to entry for this month\n\n:DearDiaryNextMonth | \u003cPlug\u003e(DearDiaryNextMonth) | \u003cLeader\u003ejmn\n    Go to entry for next month\n\n:DearDiaryLastMonth | \u003cPlug\u003e(DearDiaryLastMonth) | \u003cLeader\u003ejmp\n    Go to entry for last month\n\n:DearDiaryThisYear | \u003cPlug\u003e(DearDiaryThisYear) | \u003cLeader\u003ejyc\n    Go to entry for this year\n\n:DearDiaryNextYear | \u003cPlug\u003e(DearDiaryNextYear) | \u003cLeader\u003ejyn\n    Go to entry for next year\n\n:DearDiaryLastYear | \u003cPlug\u003e(DearDiaryLastYear) | \u003cLeader\u003ejyp\n    Go to entry for last year\n```\n\nDefault mappings can be overriden if a mapping to the mapping name already\nexists in your init.vim file.\n\nFor example:\n\n```viml\nnmap \u003csilent\u003e \u003cLeader\u003eds \u003cPlug\u003e(DearDiarySelectJournal)\n```\n\nTo completely disable all default mappings, add the following line to your\ninit.vim.\n\n```viml\nlet g:deardiary_use_default_mappings = 0\n```\n\n## Documentation\n\nOpen the [help file](https://github.com/ishchow/deardiary/blob/main/doc/deardiary.txt)\nfor complete documentation. Help file contains examples of advanced\nconfiguration such as custom frequencies and templating.\n\n# Contributing\n\n## Repo structure\n\n```\n.\n├── doc # NeoVim built-in help files\n├── lua # Plugin lua modules\n│   └── deardiary # Lua module containing plugin\n│       └── lib # Lua module containing vendored, external libraries\n├── mock # Lua modules containng mocks for unit test\n│   └── mock # Mock lua module\n├── plugin # Vimscript runtime files, provides glue code for mappings and commands\n└── spec # Unit tests\n```\n\n## Testing plugin locally\n\n`nvim --cmd \"set rtp+=$(pwd)\" README.md`\n\n## Unit testing\n\n### Setup hererocks\n\nSetup an isolated lua environment using [hererocks](https://github.com/mpeterv/hererocks).\nThis is done so that your system lua isn't polluted with rocks used to test this\nplugin.\n\n```\npip3 install hererocks # use sudo if this doesn't work\nhererocks -j 2.1.0-beta3 -r latest env\nsource env/bin/activate\n```\n\n### Run tests\n\nInstalls test dependencies if not already installed and runs unit tests.\n\n`luarocks test`\n\nAfter test dependencies are installed, the above command can be used to re-run\ntests or you can run tests directly using busted.\n\n`busted`\n\n### Deactivate hererocks\n\nDeactivate the lua environment.\n\n`lua-deactivate`\n","funding_links":[],"categories":["Lua"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fishchow%2Fnvim-deardiary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fishchow%2Fnvim-deardiary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fishchow%2Fnvim-deardiary/lists"}