From e42385b45fa23cd5be6c51accc6032f5fb143000 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Fri, 27 Oct 2023 14:28:21 -0500 Subject: [PATCH] Revert "refactor(nvim): remove orgmode" This reverts commit 034a1e9335b0d1d970264f6d8c306bba38ccdd4f. --- .../nvim/lua/plugins/configs/neorg.lua | 6 +-- .../nvim/lua/plugins/configs/org-mode.lua | 42 +++++++++++++++++++ 2 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 dots/.config/nvim/lua/plugins/configs/org-mode.lua diff --git a/dots/.config/nvim/lua/plugins/configs/neorg.lua b/dots/.config/nvim/lua/plugins/configs/neorg.lua index 1cba6d72..34666281 100644 --- a/dots/.config/nvim/lua/plugins/configs/neorg.lua +++ b/dots/.config/nvim/lua/plugins/configs/neorg.lua @@ -8,9 +8,9 @@ return { { "nvim-treesitter/nvim-treesitter" }, }, keys = { - { "o", desc = "> Neorg" }, - { "oj", ":Neorg journal custom", desc = "Neorg: Journal" }, - { "ot", ":Neorg toc", desc = "Neorg: Table of Contents" }, + { "N", desc = "> Neorg" }, + { "Nj", ":Neorg journal custom", desc = "Neorg: Journal" }, + { "Nt", ":Neorg toc", desc = "Neorg: Table of Contents" }, }, config = function() require("neorg").setup({ diff --git a/dots/.config/nvim/lua/plugins/configs/org-mode.lua b/dots/.config/nvim/lua/plugins/configs/org-mode.lua new file mode 100644 index 00000000..f0cde96d --- /dev/null +++ b/dots/.config/nvim/lua/plugins/configs/org-mode.lua @@ -0,0 +1,42 @@ +return { + { + "nvim-orgmode/orgmode", + dependencies = { + { "nvim-treesitter/nvim-treesitter" }, + { + "akinsho/org-bullets.nvim", + opts = { + concealcursor = true, + symbols = { + headlines = { + "󰀘", + "", + "󰺕", + "", + "󰬪", + "󱆭", + } + } + } + } + }, + ft = { "org" }, + keys = { + { "o", desc = "> Org" }, + }, + config = function() + -- Load treesitter grammar for org + require("orgmode").setup_ts_grammar() + + -- Setup orgmode + require("orgmode").setup({ + org_agenda_files = "~/Notes/**/*", + org_default_notes_file = "~/Notes/refile.org", + org_startup_folded = "inherit" + }) + if vim.bo.filetype == "org" then + vim.cmd.edit() + end + end, + } +}