summaryrefslogtreecommitdiff
path: root/fnl/plugins/orgmode.fnl
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2023-01-11 00:41:17 +0100
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2023-01-11 00:41:17 +0100
commitf318452070d42e51231f7880a5d0eaa93d978a1e (patch)
treec76f35889ebc7a4e52bbd06e07c8f33f9bf68f5d /fnl/plugins/orgmode.fnl
parent433952cf3efa8e2b5e23ff0e76a4afe6f95d44b5 (diff)
Rip aniseed, hail hotpot
Diffstat (limited to 'fnl/plugins/orgmode.fnl')
-rw-r--r--fnl/plugins/orgmode.fnl24
1 files changed, 24 insertions, 0 deletions
diff --git a/fnl/plugins/orgmode.fnl b/fnl/plugins/orgmode.fnl
new file mode 100644
index 0000000..99e55be
--- /dev/null
+++ b/fnl/plugins/orgmode.fnl
@@ -0,0 +1,24 @@
+;; Orgmode for nvim.
+
+(local templates
+ {:t {:description :Task :template "* TODO %?\n %u\n DEADLINE: %T\n"}
+ :m {:description :Meeting :template "* Meeting %?"}
+ :n {:description :Note :template "* NOTE %? :NOTE:\n %u\n"}})
+
+(local opts {:org_agenda_files ["~/.local/share/org/**/*"]
+ :org_hide_emphasis_markers true
+ :org_agenda_start_on_weekday false
+ :org_default_notes_file "~/.local/share/org/refile.org"
+ :org_agenda_templates templates})
+
+(fn setup []
+ (let [orgmode (require :orgmode)]
+ (tset vim.opt :conceallevel 2)
+ (tset vim.opt :concealcursor :nc)
+ (orgmode.setup_ts_grammar)
+ (orgmode.setup opts)))
+
+{1 :nvim-orgmode/orgmode
+ :event :BufReadPost
+ :config (fn []
+ (setup))}