summaryrefslogtreecommitdiff
path: root/fnl/config/orgmode.fnl
blob: 99e55be58b1beeeaf149411c68dc7e238bc3831d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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))}