From b07dd6553bfaaef0a3cbd3a91f7e704209814ba2 Mon Sep 17 00:00:00 2001 From: Dennis Date: Mon, 27 Jan 2025 22:26:41 +0100 Subject: [PATCH] Removes unused plugins, adds orgmode plugin back --- .../nvim/config/lua/plugins/diffview.lua | 4 -- .../nvim/config/lua/plugins/harpoon.lua | 39 ------------------- .../nvim/config/lua/plugins/obsidian.lua | 28 ------------- .../nvim/config/lua/plugins/orgmode.lua | 34 ++++++++++++++++ 4 files changed, 34 insertions(+), 71 deletions(-) delete mode 100644 home/modules/nvim/config/lua/plugins/diffview.lua delete mode 100644 home/modules/nvim/config/lua/plugins/harpoon.lua delete mode 100644 home/modules/nvim/config/lua/plugins/obsidian.lua create mode 100644 home/modules/nvim/config/lua/plugins/orgmode.lua diff --git a/home/modules/nvim/config/lua/plugins/diffview.lua b/home/modules/nvim/config/lua/plugins/diffview.lua deleted file mode 100644 index f1b4e4f..0000000 --- a/home/modules/nvim/config/lua/plugins/diffview.lua +++ /dev/null @@ -1,4 +0,0 @@ -return { - "sindrets/diffview.nvim", - opts = {}, -} diff --git a/home/modules/nvim/config/lua/plugins/harpoon.lua b/home/modules/nvim/config/lua/plugins/harpoon.lua deleted file mode 100644 index fe0c6d8..0000000 --- a/home/modules/nvim/config/lua/plugins/harpoon.lua +++ /dev/null @@ -1,39 +0,0 @@ -return { - "ThePrimeagen/harpoon", - branch = "harpoon2", - dependencies = { "nvim-lua/plenary.nvim" }, - config = function() - local harpoon = require("harpoon") - - harpoon:setup() - - vim.keymap.set("n", "ha", function() - harpoon:list():add() - end) - - vim.keymap.set("n", "hx", function() - harpoon:list():select(1) - end) - vim.keymap.set("n", "hc", function() - harpoon:list():select(2) - end) - vim.keymap.set("n", "hv", function() - harpoon:list():select(3) - end) - vim.keymap.set("n", "hs", function() - harpoon:list():select(4) - end) - - vim.keymap.set("n", "hp", function() - harpoon:list():prev() - end) - - vim.keymap.set("n", "hn", function() - harpoon:list():next() - end) - - vim.keymap.set("n", "hh", function() - harpoon.ui:toggle_quick_menu(harpoon:list()) - end) - end, -} diff --git a/home/modules/nvim/config/lua/plugins/obsidian.lua b/home/modules/nvim/config/lua/plugins/obsidian.lua deleted file mode 100644 index e264edb..0000000 --- a/home/modules/nvim/config/lua/plugins/obsidian.lua +++ /dev/null @@ -1,28 +0,0 @@ -return { - "epwalsh/obsidian.nvim", - version = "*", -- recommended, use latest release instead of latest commit - lazy = true, - ft = "markdown", - event = { - "BufReadPre /home/dennis/notes/**.md", - "BufNewFile /home/dennis/notes/**.md", - }, - opts = { - workspaces = { - { - name = "notes", - path = "~/notes", - }, - }, - daily_notes = { - -- Optional, if you keep daily notes in a separate directory. - folder = "~/notes/001_dailies", - -- Optional, if you want to change the date format for the ID of daily notes. - date_format = "%Y-%m-%d", - -- Optional, if you want to change the date format of the default alias of daily notes. - alias_format = "%B %-d, %Y", - -- Optional, if you want to automatically insert a template from your template directory like 'daily.md' - template = nil, - }, - }, -} diff --git a/home/modules/nvim/config/lua/plugins/orgmode.lua b/home/modules/nvim/config/lua/plugins/orgmode.lua new file mode 100644 index 0000000..e4eee7a --- /dev/null +++ b/home/modules/nvim/config/lua/plugins/orgmode.lua @@ -0,0 +1,34 @@ +return { + "nvim-orgmode/orgmode", + event = "VeryLazy", + ft = { "org" }, + config = function() + require("orgmode").setup({ + org_agenda_files = "~/orgnzr/**/*", + org_default_notes_file = "~/orgnzr/inbox.org", + org_todo_keywords = { "PROJECT(p)", "TODO(t)", "NEXT(n)", "|", "DONE(d)" }, + win_split_mode = "120vsplit", + org_startup_indented = true, + org_indent_mode_turns_off_org_adapt_indentation = true, + org_hide_leading_stars = true, + org_blank_before_new_entry = { heading = false, plain_list_item = false }, + org_startup_folded = "content", + org_ellipsis = "  ", + org_capture_templates = { + t = { description = "Task", template = "* TODO %?\n" }, + l = { description = "Link", template = "* TODO [[%x]]%?" }, + a = { description = "Task at line", template = "* TODO %?\nat: %a" }, + }, + }) + + vim.api.nvim_create_autocmd("FileType", { + pattern = "org", + callback = function() + vim.keymap.set("i", "", 'lua require("orgmode").action("org_mappings.meta_return")', { + silent = true, + buffer = true, + }) + end, + }) + end, +}