diff --git a/dots/.config/nvim/lua/plugins/configs/autolist.lua b/dots/.config/nvim/lua/plugins/configs/autolist.lua index 475254f0..2dcaf4da 100644 --- a/dots/.config/nvim/lua/plugins/configs/autolist.lua +++ b/dots/.config/nvim/lua/plugins/configs/autolist.lua @@ -30,6 +30,11 @@ return { ["yaml.ansible"] = { "[-]", }, + org = { + "-", + list_patterns.digit, + list_patterns.ascii + }, markdown = { list_patterns.unordered, list_patterns.digit, diff --git a/dots/.config/nvim/lua/plugins/configs/cmp.lua b/dots/.config/nvim/lua/plugins/configs/cmp.lua index 0b3c2616..7b396ce8 100644 --- a/dots/.config/nvim/lua/plugins/configs/cmp.lua +++ b/dots/.config/nvim/lua/plugins/configs/cmp.lua @@ -328,6 +328,7 @@ return { }) cmp.setup.filetype("toml", { sources = standard_sources({ { name = "crates" } }) }) + cmp.setup.filetype("org", { sources = standard_sources({ { name = "orgmode", priority = 99 } }) }) -- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore). cmp.setup.cmdline("/", { diff --git a/dots/.config/nvim/lua/plugins/configs/neorg.lua b/dots/.config/nvim/lua/plugins/configs/neorg.lua index 0848ee26..3f9ba496 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..5c5b4288 --- /dev/null +++ b/dots/.config/nvim/lua/plugins/configs/org-mode.lua @@ -0,0 +1,38 @@ +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 = "~/orgfiles/**/*", + org_default_notes_file = "~/orgfiles/refile.org", + }) + end, + } +} diff --git a/dots/.config/nvim/lua/plugins/configs/treesitter.lua b/dots/.config/nvim/lua/plugins/configs/treesitter.lua index c557612b..e7f0d835 100644 --- a/dots/.config/nvim/lua/plugins/configs/treesitter.lua +++ b/dots/.config/nvim/lua/plugins/configs/treesitter.lua @@ -143,7 +143,7 @@ return { }, highlight = { enable = true, - additional_vim_regex_highlighting = false, + additional_vim_regex_highlighting = { "org" }, disable = function(_, buf) local disabled_filetypes = { "tex",