summaryrefslogtreecommitdiff
path: root/fnl
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2022-12-26 17:17:37 +0100
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2022-12-26 17:17:37 +0100
commitfc04483abe73633a012548d56627ad272667af87 (patch)
tree200289ebb0b9fffa47152e9f909d6acc78d47fdc /fnl
parentc0f658cdcfc5577f62814f1d547a671f2595648f (diff)
Replace orgmode with neorg
Diffstat (limited to 'fnl')
-rw-r--r--fnl/config/neorg.fnl9
-rw-r--r--fnl/config/orgmode.fnl47
-rw-r--r--fnl/config/treesitter.fnl2
-rw-r--r--fnl/plugins.fnl4
4 files changed, 12 insertions, 50 deletions
diff --git a/fnl/config/neorg.fnl b/fnl/config/neorg.fnl
new file mode 100644
index 0000000..a726bbc
--- /dev/null
+++ b/fnl/config/neorg.fnl
@@ -0,0 +1,9 @@
+;; A neovim orgmode.
+(module config.neorg {autoload {util config.util}})
+
+(def- opts
+ {:load {:core.defaults []
+ :core.norg.dirman {:config {:workspaces {:work "~/.local/share/neorg/work"
+ :home "~/.local/share/neorg/home"}}}}})
+
+(util.setup :neorg opts)
diff --git a/fnl/config/orgmode.fnl b/fnl/config/orgmode.fnl
deleted file mode 100644
index 216fe4c..0000000
--- a/fnl/config/orgmode.fnl
+++ /dev/null
@@ -1,47 +0,0 @@
-;; Orgmode for nvim.
-(module config.orgmode {autoload {nvim aniseed.nvim util config.util}})
-
-(nvim.ex.set :conceallevel=2)
-(nvim.ex.set :concealcursor=nc)
-
-(def- 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"}})
-
-(defn- create-title [task]
- (string.format "%s (%s)" task.category task.humanized_duration))
-
-(defn- create-subtitle [task]
- (string.format "%s %s %s" (string.rep "*" task.level) task.todo
- task.title))
-
-(defn- get-date [task] (string.format "%s: %s" task.type (task.time:to_string)))
-
-(def- notifications
- {:reminder_time [0 1 5 10]
- :repeater_reminder_time [0 1 5 10]
- :deadline_warning_reminder_time [0]
- :cron_notifier (fn [tasks]
- (each [_ task (ipairs tasks)]
- (let [title (create-title task)
- sub-title (create-subtitle task)
- date (get-date task)]
- (if (vim.fn.executable :notify-send)
- (vim.loop.spawn :notify-send
- {:args [:--icon=.local/share/nvim/site/pack/packer/start/orgmode/assets/orgmode_nvim.png
- (string.format "%s\n%s\n%s"
- title
- subtitle
- date)]})))))})
-
-(def- 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
- : notifications})
-
-(let [orgmode (util.prequire :orgmode)]
- (orgmode.setup_ts_grammar)
- (orgmode.setup opts))
diff --git a/fnl/config/treesitter.fnl b/fnl/config/treesitter.fnl
index e61e2c0..263391d 100644
--- a/fnl/config/treesitter.fnl
+++ b/fnl/config/treesitter.fnl
@@ -6,7 +6,7 @@
:rust
:lua
:hcl
- :org
+ :norg
:haskell
:python
:fennel
diff --git a/fnl/plugins.fnl b/fnl/plugins.fnl
index b39a58f..d416865 100644
--- a/fnl/plugins.fnl
+++ b/fnl/plugins.fnl
@@ -63,10 +63,10 @@
:config (fn []
(require :config.trouble))}
;; Misc plugins
- {1 :nvim-orgmode/orgmode
+ {1 :nvim-neorg/neorg
:event :VeryLazy
:config (fn []
- (require :config.orgmode))}
+ (require :config.neorg))}
{1 :ojroques/nvim-bufdel :cmd :BufDel}
{1 :akinsho/toggleterm.nvim
:cmd :ToggleTerm