diff options
-rw-r--r-- | fnl/config/neorg.fnl | 9 | ||||
-rw-r--r-- | fnl/config/orgmode.fnl | 47 | ||||
-rw-r--r-- | fnl/config/treesitter.fnl | 2 | ||||
-rw-r--r-- | fnl/plugins.fnl | 4 | ||||
-rw-r--r-- | lazy-lock.json | 30 |
5 files changed, 65 insertions, 27 deletions
diff --git a/fnl/config/neorg.fnl b/fnl/config/neorg.fnl deleted file mode 100644 index a726bbc..0000000 --- a/fnl/config/neorg.fnl +++ /dev/null @@ -1,9 +0,0 @@ -;; 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 new file mode 100644 index 0000000..216fe4c --- /dev/null +++ b/fnl/config/orgmode.fnl @@ -0,0 +1,47 @@ +;; 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 263391d..e61e2c0 100644 --- a/fnl/config/treesitter.fnl +++ b/fnl/config/treesitter.fnl @@ -6,7 +6,7 @@ :rust :lua :hcl - :norg + :org :haskell :python :fennel diff --git a/fnl/plugins.fnl b/fnl/plugins.fnl index d416865..b39a58f 100644 --- a/fnl/plugins.fnl +++ b/fnl/plugins.fnl @@ -63,10 +63,10 @@ :config (fn [] (require :config.trouble))} ;; Misc plugins - {1 :nvim-neorg/neorg + {1 :nvim-orgmode/orgmode :event :VeryLazy :config (fn [] - (require :config.neorg))} + (require :config.orgmode))} {1 :ojroques/nvim-bufdel :cmd :BufDel} {1 :akinsho/toggleterm.nvim :cmd :ToggleTerm diff --git a/lazy-lock.json b/lazy-lock.json index 73a225f..57efe56 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,7 +1,7 @@ { - "Comment.nvim": { "branch": "master", "commit": "45dc21a71ad1450606f5e98261badb28db59d74c" }, + "Comment.nvim": { "branch": "master", "commit": "5f01c1a89adafc52bf34e3bf690f80d9d726715d" }, "LuaSnip": { "branch": "master", "commit": "5570fd797eae0790affb54ea669a150cad76db5d" }, - "SchemaStore.nvim": { "branch": "main", "commit": "ceebc0d0e5f6fe48c7739331e05c3843c07ade37" }, + "SchemaStore.nvim": { "branch": "main", "commit": "d1625bb74b3a7f84aad278a7968f4496ae8936c6" }, "alpha-nvim": { "branch": "main", "commit": "21a0f2520ad3a7c32c0822f943368dc063a569fb" }, "aniseed": { "branch": "master", "commit": "9892a40d4cf970a2916a984544b7f984fc12f55c" }, "auto-session": { "branch": "main", "commit": "c8b2f4048f846387361bd04cc185bf1aa7d2e3d1" }, @@ -17,33 +17,33 @@ "friendly-snippets": { "branch": "main", "commit": "1a6a02350568d6830bcfa167c72f9b6e75e454ae" }, "gitsigns.nvim": { "branch": "main", "commit": "2ab3bdf0a40bab53033048c6be75bda86316b55d" }, "harpoon": { "branch": "master", "commit": "21d0d1bfa3000e4384740bfaefa0ebc51c773786" }, - "lazy.nvim": { "branch": "main", "commit": "5697098e9763c204cfc75506d3fbbd187bc5d672" }, + "lazy.nvim": { "branch": "main", "commit": "9e983898b131d4975680bbda023224bb90a32daf" }, "leap.nvim": { "branch": "main", "commit": "a5c9504290832e6bdbbb6265fd1ff02fc6485d20" }, - "lir.nvim": { "branch": "master", "commit": "84af01547e51e15fc97e878330414385eeb825e8" }, + "lir.nvim": { "branch": "master", "commit": "806651bc22cc1aa0053fba4385a18800f576cc6b" }, "lspkind-nvim": { "branch": "master", "commit": "c68b3a003483cf382428a43035079f78474cd11e" }, "lualine-lsp-progress": { "branch": "master", "commit": "56842d097245a08d77912edf5f2a69ba29f275d7" }, "lualine.nvim": { "branch": "master", "commit": "fffbcb829288c3ca366f17cdb8d46aefb5c1d6f3" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "31d8ed0dd3daf6cc64e35d710a190b64080bdc86" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "5bea0e851b8f48479d2cb927cd26733b4058b2b3" }, "mason-null-ls.nvim": { "branch": "main", "commit": "4480bc59b72866376fc2f83048a932fa598d89a8" }, - "mason.nvim": { "branch": "main", "commit": "0d14400ab3755f27041f70566d6b78f48c82c54c" }, + "mason.nvim": { "branch": "main", "commit": "e6f6f901959d39d112b096d26b909c65723981d3" }, "minibar.nvim": { "branch": "master", "commit": "cd559b1c54d7603975300635ac908965d912a42c" }, "neogit": { "branch": "master", "commit": "0d6002c6af432343937283fb70791fc76fa7227c" }, - "neorg": { "branch": "main", "commit": "2c18f831effb5f3f383b2049902be23ea0dd7a8e" }, - "nlsp-settings.nvim": { "branch": "main", "commit": "2f3bf45aeb7497155b5a45a80d9fa7795209ddde" }, + "nlsp-settings.nvim": { "branch": "main", "commit": "b4a756be3ec71de19e0406782bb5b6ff6fb29cea" }, "no-clown-fiesta.nvim": { "branch": "master", "commit": "a7de377d8d3087581958f84d982b616fc93ca471" }, - "null-ls.nvim": { "branch": "main", "commit": "b26851b3e7ac1c0c85666f8a74e36aef2acb89c6" }, - "nvim-autopairs": { "branch": "master", "commit": "03580d758231956d33c8dd91e2be195106a79fa4" }, + "null-ls.nvim": { "branch": "main", "commit": "ef9010b2ac11e2068a8e1d5a4eff576289a1f9a4" }, + "nvim-autopairs": { "branch": "master", "commit": "b5994e6547d64f781cfca853a1aa6174d238fe0e" }, "nvim-bqf": { "branch": "main", "commit": "b418b0a241d36509196944a6f6bee886c775d54f" }, "nvim-bufdel": { "branch": "main", "commit": "a60b3531e5bd56f8602acb4ba7f5b2eeb782d54b" }, - "nvim-cmp": { "branch": "main", "commit": "d09b0c396aaa078cdfe78316ec06940971136e85" }, + "nvim-cmp": { "branch": "main", "commit": "8868cf9a09e5f3c2612a22ccb82dcc6d9f0d0d35" }, "nvim-colorizer.lua": { "branch": "master", "commit": "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6" }, - "nvim-lspconfig": { "branch": "master", "commit": "a63d2c75c6880d45209baff596939343e8a431fd" }, + "nvim-lspconfig": { "branch": "master", "commit": "25f0c65bd8fddadbafd0048a68560bf160ceb98c" }, "nvim-spectre": { "branch": "master", "commit": "68ea562b485b6593e325e7916c3bd6e833d433e7" }, - "nvim-surround": { "branch": "main", "commit": "6aafeeda19a98768d1c17ff6dde5548bc77a1a2d" }, - "nvim-treesitter": { "branch": "master", "commit": "7c9ddb72d198d45895d73bc7495e1b7e9627f6ca" }, + "nvim-surround": { "branch": "main", "commit": "f0077c3726d243eeaabd2ec280216e8c3ca7da9f" }, + "nvim-treesitter": { "branch": "master", "commit": "eaeedfb80419e8145760d95d1840996a2746af7c" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "32d9627123321db65a4f158b72b757bcaef1a3f4" }, "nvim-web-devicons": { "branch": "master", "commit": "05e1072f63f6c194ac6e867b567e6b437d3d4622" }, "nvim-window-picker": { "branch": "main", "commit": "5902827d0e338890a22849e2f18dc80d1cc1a8db" }, + "orgmode": { "branch": "master", "commit": "dadf56334d2be7d9e8ad1e22c697a6e75f0164b7" }, "plenary.nvim": { "branch": "master", "commit": "4b7e52044bbb84242158d977a50c4cbcd85070c7" }, "popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" }, "project.nvim": { "branch": "main", "commit": "685bc8e3890d2feb07ccf919522c97f7d33b94e4" }, @@ -58,6 +58,6 @@ "trouble.nvim": { "branch": "main", "commit": "897542f90050c3230856bc6e45de58b94c700bbf" }, "undotree": { "branch": "master", "commit": "1a23ea84bd02c34f50d8e10a8b4bfc89597ffe4e" }, "vim-slash": { "branch": "master", "commit": "31aee09b7ea8893a18fa34f65e63e364fc998444" }, - "which-key.nvim": { "branch": "main", "commit": "8682d3003595017cd8ffb4c860a07576647cc6f8" }, + "which-key.nvim": { "branch": "main", "commit": "61553aeb3d5ca8c11eea8be6eadf478062982ac9" }, "zen-mode.nvim": { "branch": "main", "commit": "6f5702db4fd4a4c9a212f8de3b7b982f3d93b03c" } }
\ No newline at end of file |