diff options
| author | aktersnurra <gustaf@gustafrydholm.xyz> | 2026-04-16 15:10:52 +0200 |
|---|---|---|
| committer | aktersnurra <gustaf@gustafrydholm.xyz> | 2026-04-17 00:02:28 +0200 |
| commit | 99a7ff44cdf70d028ef6aab26224f26f69ee528d (patch) | |
| tree | 3bac13281fe000f0cc9a1823b6ccac856b0acf88 /fnl/plugins/orgmode.fnl | |
| parent | 83a7f3505a441f1c152229d50a3d6011951a82fc (diff) | |
Diffstat (limited to 'fnl/plugins/orgmode.fnl')
| -rw-r--r-- | fnl/plugins/orgmode.fnl | 46 |
1 files changed, 22 insertions, 24 deletions
diff --git a/fnl/plugins/orgmode.fnl b/fnl/plugins/orgmode.fnl index 04cd3b4..60bc15c 100644 --- a/fnl/plugins/orgmode.fnl +++ b/fnl/plugins/orgmode.fnl @@ -1,5 +1,7 @@ ;; Orgmode for nvim. +(import-macros {: autocmds : user-cmds} :macros) + (local icons (require :settings.icons)) (local keys [{1 :<leader>oa @@ -15,31 +17,27 @@ 2 "<cmd>Telescope orgmode search_headings theme=dropdown<cr>" :desc "Search headings"}]) -(local user-cmds [[:OrgAgendaPrompt - (λ [] - (let [orgmode (require :orgmode)] - (orgmode.action :agenda.prompt))) - {:nargs 0}] - [:OrgCapturePrompt - (λ [] - (let [orgmode (require :orgmode)] - (orgmode.action :capture.prompt))) - {:nargs 0}]]) - -(local auto-cmds - [[:FileType - {:pattern :org - :callback (λ [] - (tset vim.opt_local :foldenable false) - (tset vim.opt_local :foldlevelstart 0) - (tset vim.opt_local :foldlevel 0) - (tset vim.opt_local :concealcursor :nc) - (tset vim.opt_local :conceallevel 2))}]]) - (λ init [] - (let [{: create-auto-cmds : create-user-cmds} (require :util.cmds)] - (create-user-cmds user-cmds) - (create-auto-cmds auto-cmds))) + (user-cmds + [:OrgAgendaPrompt + (λ [] + (let [orgmode (require :orgmode)] + (orgmode.action :agenda.prompt))) + {:nargs 0}] + [:OrgCapturePrompt + (λ [] + (let [orgmode (require :orgmode)] + (orgmode.action :capture.prompt))) + {:nargs 0}]) + (autocmds + [:FileType + {:pattern :org + :callback (λ [] + (tset vim.opt_local :foldenable false) + (tset vim.opt_local :foldlevelstart 0) + (tset vim.opt_local :foldlevel 0) + (tset vim.opt_local :concealcursor :nc) + (tset vim.opt_local :conceallevel 2))}])) (local templates {:t {:description :Todo :template "* TODO %?\n %u\n DEADLINE: %T\n"} |