From 99a7ff44cdf70d028ef6aab26224f26f69ee528d Mon Sep 17 00:00:00 2001 From: aktersnurra Date: Thu, 16 Apr 2026 15:10:52 +0200 Subject: Add fff and other nice things such as macros --- fnl/plugins/orgmode.fnl | 46 ++++++++++++++++++++++------------------------ 1 file changed, 22 insertions(+), 24 deletions(-) (limited to 'fnl/plugins/orgmode.fnl') 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 :oa @@ -15,31 +17,27 @@ 2 "Telescope orgmode search_headings theme=dropdown" :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"} -- cgit v1.2.3-70-g09d2