X-Git-Url: https://git.r.bdr.sh/rbdr/nota.nvim/blobdiff_plain/2cc29448a37001cf90b22d089ab992e93afdd71f..refs/heads/main:/plugin/nota.lua?ds=inline diff --git a/plugin/nota.lua b/plugin/nota.lua index d34a7be..1864deb 100644 --- a/plugin/nota.lua +++ b/plugin/nota.lua @@ -46,41 +46,44 @@ end local command = api.nvim_create_user_command -local configuration = require('configuration').configuration +local configuration = require('nota.configuration').configuration if configuration.default_keybinds then - require('keybinds').bind() + require('nota.keybinds').bind() end -- Note Handling Commands -command('NotaOpenDailyNote', function() require('notes').open_daily() end, { nargs = 0 }) -command('NotaOpenWeeklyNote', function() require('notes').open_weekly() end, { nargs = 0 }) -command('NotaOpenMonthlyNote', function() require('notes').open_monthly() end, { nargs = 0 }) -command('NotaOpenSeasonalNote', function() require('notes').open_seasonal() end, { nargs = 0 }) -command('NotaOpenYearlyNote', function() require('notes').open_yearly() end, { nargs = 0 }) -command('NotaOpenNote', function() require('notes').open() end, { nargs = 0 }) +command('NotaOpenDailyNote', function(options) require('nota.notes').open_daily(options.args) end, { nargs = '?' }) +command('NotaOpenWeeklyNote', function() require('nota.notes').open_weekly() end, { nargs = 0 }) +command('NotaOpenMonthlyNote', function() require('nota.notes').open_monthly() end, { nargs = 0 }) +command('NotaOpenSeasonalNote', function() require('nota.notes').open_seasonal() end, { nargs = 0 }) +command('NotaOpenYearlyNote', function() require('nota.notes').open_yearly() end, { nargs = 0 }) +command('NotaOpenNote', function() require('nota.notes').open() end, { nargs = 0 }) +command('NotaOpenNextNote', function() require('nota.notes').open_next() end, { nargs = 0 }) +command('NotaOpenPreviousNote', function() require('nota.notes').open_previous() end, { nargs = 0 }) -- Task View Handling Commands -command('NotaOpenAgenda', function() require('task_views').open_agenda() end, { nargs = 0 }) -command('NotaOpenOpen', function() require('task_views').open_open() end, { nargs = 0 }) -command('NotaOpenOpenImportant', function() require('task_views').open_open_important() end, { nargs = 0 }) -command('NotaOpenJournal', function() require('task_views').open_journal() end, { nargs = 0 }) +command('NotaOpenAgenda', function() require('nota.task_views').open_agenda() end, { nargs = 0 }) +command('NotaOpenOpen', function() require('nota.task_views').open_open() end, { nargs = 0 }) +command('NotaOpenOpenImportant', function() require('nota.task_views').open_open_important() end, { nargs = 0 }) +command('NotaOpenJournal', function() require('nota.task_views').open_journal() end, { nargs = 0 }) -- Task Handling Commands -command('NotaToggleTask', function() require('tasks').toggle() end, { nargs = 0 }) -command('NotaToggleTaskImportance', function() require('tasks').toggle_importance() end, { nargs = 0 }) -command('NotaInsertTask', function() require('tasks').insert() end, { nargs = 0 }) -command('NotaCaptureTask', function() require('tasks').capture() end, { nargs = 0 }) -command('NotaTagTask', function() require('tasks').tag() end, { nargs = 0 }) -command('NotaRescheduleTaskToday', function() require('tasks').reschedule_for_today() end, { nargs = 0 }) -command('NotaRescheduleTaskTomorrow', function() require('tasks').reschedule_for_tomorrow() end, { nargs = 0 }) -command('NotaRescheduleTaskSomeday', function() require('tasks').reschedule_for_someday() end, { nargs = 0 }) -command('NotaRescheduleTask', function(options) require('tasks').reschedule(options.args) end, { nargs = '?' }) +command('NotaToggleTask', function() require('nota.tasks').toggle() end, { nargs = 0 }) +command('NotaToggleTaskImportance', function() require('nota.tasks').toggle_importance() end, { nargs = 0 }) +command('NotaInsertTask', function() require('nota.tasks').insert() end, { nargs = 0 }) +command('NotaCaptureTask', function() require('nota.tasks').capture() end, { nargs = 0 }) +command('NotaTagTask', function(options) require('nota.tasks').tag(options.args) end, { nargs = '?' }) +command('NotaRemoveTagTask', function(options) require('nota.tasks').remove_tag(options.args) end, { nargs = '?' }) +command('NotaRescheduleTaskToday', function() require('nota.tasks').reschedule_for_today() end, { nargs = 0 }) +command('NotaRescheduleTaskTomorrow', function() require('nota.tasks').reschedule_for_tomorrow() end, { nargs = 0 }) +command('NotaRescheduleTaskSomeday', function() require('nota.tasks').reschedule_for_someday() end, { nargs = 0 }) +command('NotaRescheduleTask', function(options) require('nota.tasks').reschedule(options.args) end, { nargs = '?' }) -- .plan Handling Commands -command('NotaOpenPlan', function() require('plan').open() end, { nargs = 0 }) -command('NotaCapturePlan', function() require('plan').capture() end, { nargs = 0 }) +command('NotaOpenPlan', function() require('nota.plan').open() end, { nargs = 0 }) +command('NotaCapturePlan', function() require('nota.plan').capture() end, { nargs = 0 }) -- Learning File Handling Commands -command('NotaOpenLearning', function() require('learning').open() end, { nargs = 0 }) -command('NotaCaptureLearning', function() require('learning').capture() end, { nargs = 0 }) +command('NotaOpenLearning', function() require('nota.learning').open() end, { nargs = 0 }) +command('NotaCaptureLearning', function() require('nota.learning').capture() end, { nargs = 0 })