]> git.r.bdr.sh - rbdr/nota.nvim/commitdiff
Namespace the plugin main
authorRuben Beltran del Rio <redacted>
Mon, 1 Jul 2024 21:06:18 +0000 (23:06 +0200)
committerRuben Beltran del Rio <redacted>
Mon, 1 Jul 2024 21:06:18 +0000 (23:06 +0200)
lua/nota.lua
lua/nota/configuration.lua [moved from lua/configuration.lua with 99% similarity]
lua/nota/keybinds.lua [moved from lua/keybinds.lua with 100% similarity]
lua/nota/learning.lua [moved from lua/learning.lua with 92% similarity]
lua/nota/notes.lua [moved from lua/notes.lua with 98% similarity]
lua/nota/plan.lua [moved from lua/plan.lua with 96% similarity]
lua/nota/task_views.lua [moved from lua/task_views.lua with 98% similarity]
lua/nota/tasks.lua [moved from lua/tasks.lua with 98% similarity]
lua/nota/util.lua [moved from lua/util.lua with 100% similarity]
plugin/nota.lua

index 3043d77e90d8fa4a6754b5c90c4aa59fa2da872a..6dcbdec86d26aaa05a0cef5787fc81233f339fd1 100644 (file)
@@ -1,7 +1,7 @@
 local Nota = {}
 
 function Nota.setup(user_configuration)
-  configuration = require('configuration').configure(user_configuration)
+  configuration = require('nota.configuration').configure(user_configuration)
 end
 
 return Nota
similarity index 99%
rename from lua/configuration.lua
rename to lua/nota/configuration.lua
index f251eb9344b036e405b744cfb688e6e5dcf2182c..4eb1a122fcc5cf5531ec77bfacffafc0954bed10 100644 (file)
@@ -3,7 +3,7 @@
 -------------------------------------------------------------------------------
 local Configuration = {}
 
-local Util = require('util')
+local Util = require('nota.util')
 -------------------------------------------------------------------------------
 -- Internal Functions
 -------------------------------------------------------------------------------
similarity index 100%
rename from lua/keybinds.lua
rename to lua/nota/keybinds.lua
similarity index 92%
rename from lua/learning.lua
rename to lua/nota/learning.lua
index b730c6a082d05c27dc2bffcdb3dbeb83a67a9956..22ad3257a587ff4bcdfaaeec2e279ebeda7d6622 100644 (file)
@@ -3,8 +3,8 @@
 -------------------------------------------------------------------------------
 local Learning = {}
 
-local Configuration = require('configuration')
-local Util = require('util')
+local Configuration = require('nota.configuration')
+local Util = require('nota.util')
 -------------------------------------------------------------------------------
 -- Internal Functions
 -------------------------------------------------------------------------------
similarity index 98%
rename from lua/notes.lua
rename to lua/nota/notes.lua
index ca61735ab7fefec17ae625c6fd8fd641b82c120d..abb1bf7f4fad84e06253bbbb24b835f9aa5b694b 100644 (file)
@@ -3,8 +3,8 @@
 -------------------------------------------------------------------------------
 local Notes = {}
 
-local Util = require('util')
-local Configuration = require('configuration')
+local Util = require('nota.util')
+local Configuration = require('nota.configuration')
 local api = vim.api
 -------------------------------------------------------------------------------
 -- Internal Functions
similarity index 96%
rename from lua/plan.lua
rename to lua/nota/plan.lua
index 477ff9a0a35677bf16de33048ae17e0661aa7b37..85f32ba49ef05755108ef8b96eec94e5fe6bacc9 100644 (file)
@@ -3,8 +3,8 @@
 -------------------------------------------------------------------------------
 local Plan = {}
 
-local Configuration = require('configuration')
-local Util = require('util')
+local Configuration = require('nota.configuration')
+local Util = require('nota.util')
 -------------------------------------------------------------------------------
 -- Internal Functions
 -------------------------------------------------------------------------------
similarity index 98%
rename from lua/task_views.lua
rename to lua/nota/task_views.lua
index 9309ad3277c276fab28233937f913652346f7867..a088aa91511534ecd3be0665b6d13935da48890d 100644 (file)
@@ -2,8 +2,8 @@
 -- Tools to deal with task views
 -------------------------------------------------------------------------------
 local TaskViews = {}
-local Util = require('util')
-local Configuration = require('configuration')
+local Util = require('nota.util')
+local Configuration = require('nota.configuration')
 local api = vim.api
 -------------------------------------------------------------------------------
 -- Internal Functions
similarity index 98%
rename from lua/tasks.lua
rename to lua/nota/tasks.lua
index 33fce8f23717eaab87d9b20f83622f0e5dd338a3..f2a3ef18bb5f54a2d384d01f9811845b72ecfa4c 100644 (file)
@@ -2,9 +2,9 @@
 -- Tools to deal with tasks
 -------------------------------------------------------------------------------
 local Tasks = {}
-local Configuration = require('configuration')
-local Notes = require('notes')
-local Util = require('util')
+local Configuration = require('nota.configuration')
+local Notes = require('nota.notes')
+local Util = require('nota.util')
 local api = vim.api
 -------------------------------------------------------------------------------
 -- Internal Functions
similarity index 100%
rename from lua/util.lua
rename to lua/nota/util.lua
index 180c84d761d994d32bd445da86c7b17064b004aa..1864debb3f8d5299da74e0b38ec0bd1c951f8174 100644 (file)
@@ -46,44 +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(options) require('notes').open_daily(options.args) end, { nargs = '?' })
-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('NotaOpenNextNote', function() require('notes').open_next() end, { nargs = 0 })
-command('NotaOpenPreviousNote', function() require('notes').open_previous() 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(options) require('tasks').tag(options.args) end, { nargs = '?' })
-command('NotaRemoveTagTask', function(options) require('tasks').remove_tag(options.args) end, { nargs = '?' })
-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 })