|
| 1 | +-- Orgmode configuration - Emacs Orgmode clone for Neovim |
| 2 | +-- https://github.com/nvim-orgmode/orgmode |
| 3 | + |
| 4 | +---@type LazySpec |
| 5 | +return { |
| 6 | + { |
| 7 | + "nvim-orgmode/orgmode", |
| 8 | + event = "VeryLazy", |
| 9 | + ft = { "org" }, |
| 10 | + config = function() |
| 11 | + -- Setup orgmode |
| 12 | + require("orgmode").setup({ |
| 13 | + org_agenda_files = "~/sync/org/beorg/**/*", |
| 14 | + org_default_notes_file = "~/sync/org/inbox.org", |
| 15 | + |
| 16 | + -- Optional: Configure additional settings |
| 17 | + org_hide_leading_stars = true, |
| 18 | + org_agenda_start_on_weekday = 1, -- Monday |
| 19 | + org_deadline_warning_days = 14, |
| 20 | + |
| 21 | + -- Org-roam directory (for roam-style note taking) |
| 22 | + -- Note: nvim-orgmode doesn't have built-in roam support yet |
| 23 | + -- This is just a convention for organizing roam files |
| 24 | + -- Consider using org-roam.nvim plugin for full roam features |
| 25 | + -- org_roam_directory = "~/sync/org/roam", |
| 26 | + |
| 27 | + -- Optional: Customize TODO keywords |
| 28 | + -- org_todo_keywords = { "TODO", "NEXT", "|", "DONE" }, |
| 29 | + |
| 30 | + -- Vim-style keybindings |
| 31 | + mappings = { |
| 32 | + -- Global mappings (available everywhere) |
| 33 | + global = { |
| 34 | + org_agenda = "<leader>oa", |
| 35 | + org_capture = "<leader>oc", |
| 36 | + }, |
| 37 | + |
| 38 | + -- Org file mappings (in .org files) |
| 39 | + org = { |
| 40 | + org_meta_return = "<leader><CR>", -- Add heading/item/checkbox |
| 41 | + org_insert_heading_respect_content = "<leader>oih", -- Insert heading |
| 42 | + org_insert_todo_heading = "<leader>oiT", -- Insert TODO heading |
| 43 | + org_insert_todo_heading_respect_content = "<leader>oit", |
| 44 | + org_move_subtree_up = "gK", -- Vim-style: move subtree up |
| 45 | + org_move_subtree_down = "gJ", -- Vim-style: move subtree down |
| 46 | + org_do_promote = "<<", -- Promote heading |
| 47 | + org_do_demote = ">>", -- Demote heading |
| 48 | + org_promote_subtree = "<s", -- Promote subtree |
| 49 | + org_demote_subtree = ">s", -- Demote subtree |
| 50 | + org_todo = "cit", -- Change TODO state (vim-style "change in todo") |
| 51 | + org_todo_prev = "ciT", -- Previous TODO state |
| 52 | + org_toggle_checkbox = "<C-space>", |
| 53 | + org_open_at_point = "gx", -- Vim-style: go/execute |
| 54 | + org_cycle = "<TAB>", -- Fold current heading |
| 55 | + org_global_cycle = "<S-TAB>", -- Fold all |
| 56 | + org_archive_subtree = "<leader>o$", -- Archive |
| 57 | + org_set_tags_command = "<leader>ot", -- Set tags |
| 58 | + org_toggle_archive_tag = "<leader>oA", |
| 59 | + org_toggle_heading = "<leader>o*", |
| 60 | + org_timestamp_up = "<C-a>", -- Vim-style increment |
| 61 | + org_timestamp_down = "<C-x>", -- Vim-style decrement |
| 62 | + org_change_date = "cid", -- Change in date |
| 63 | + org_priority = "<leader>op", -- Set priority |
| 64 | + org_priority_up = "g<Up>", |
| 65 | + org_priority_down = "g<Down>", |
| 66 | + org_schedule = "<leader>os", -- Schedule |
| 67 | + org_deadline = "<leader>od", -- Set deadline |
| 68 | + org_time_stamp = "<leader>oi.", -- Insert timestamp |
| 69 | + org_time_stamp_inactive = "<leader>oi!", -- Insert inactive timestamp |
| 70 | + org_clock_in = "<leader>oxi", -- Clock in |
| 71 | + org_clock_out = "<leader>oxo", -- Clock out |
| 72 | + org_clock_cancel = "<leader>oxq", -- Cancel clock |
| 73 | + org_clock_goto = "<leader>oxj", -- Jump to clocked item |
| 74 | + org_set_effort = "<leader>oe", -- Set effort estimate |
| 75 | + org_show_help = "g?", -- Show help |
| 76 | + org_refile = "<leader>or", -- Refile |
| 77 | + org_store_link = "<leader>ol", -- Store link |
| 78 | + org_insert_link = "<leader>oL", -- Insert link |
| 79 | + }, |
| 80 | + |
| 81 | + -- Agenda view mappings |
| 82 | + agenda = { |
| 83 | + org_agenda_later = "f", -- Forward in time |
| 84 | + org_agenda_earlier = "b", -- Backward in time |
| 85 | + org_agenda_goto_today = ".", -- Today |
| 86 | + org_agenda_day_view = "vd", -- Day view |
| 87 | + org_agenda_week_view = "vw", -- Week view |
| 88 | + org_agenda_month_view = "vm", -- Month view |
| 89 | + org_agenda_year_view = "vy", -- Year view |
| 90 | + org_agenda_quit = "q", -- Vim-style quit |
| 91 | + org_agenda_switch_to = "<CR>", -- Open in current window |
| 92 | + org_agenda_goto = "<TAB>", -- Open in split |
| 93 | + org_agenda_goto_date = "J", -- Jump to date |
| 94 | + org_agenda_redo = "r", -- Refresh |
| 95 | + org_agenda_todo = "t", -- Change TODO state |
| 96 | + org_agenda_clock_in = "I", -- Clock in |
| 97 | + org_agenda_clock_out = "O", -- Clock out |
| 98 | + org_agenda_clock_cancel = "X", |
| 99 | + org_agenda_priority = ",", -- Set priority |
| 100 | + org_agenda_priority_up = "+", |
| 101 | + org_agenda_priority_down = "-", |
| 102 | + org_agenda_archive = "$", -- Archive |
| 103 | + org_agenda_toggle_archive_tag = "A", |
| 104 | + org_agenda_set_tags = ":", |
| 105 | + org_agenda_deadline = "d", -- Set deadline |
| 106 | + org_agenda_schedule = "s", -- Schedule |
| 107 | + org_agenda_filter = "/", -- Filter |
| 108 | + org_agenda_refile = "r", |
| 109 | + org_agenda_show_help = "g?", |
| 110 | + }, |
| 111 | + |
| 112 | + -- Capture mappings |
| 113 | + capture = { |
| 114 | + org_capture_finalize = "<C-c>", -- Save capture |
| 115 | + org_capture_refile = "<leader>or", -- Refile capture |
| 116 | + org_capture_kill = "<leader>ok", -- Discard capture |
| 117 | + org_capture_show_help = "g?", |
| 118 | + }, |
| 119 | + }, |
| 120 | + }) |
| 121 | + |
| 122 | + -- Optional: Setup completion with nvim-cmp if needed |
| 123 | + -- Since you're using blink.cmp, you may need to configure completion separately |
| 124 | + -- or use the built-in orgmode completion |
| 125 | + end, |
| 126 | + }, |
| 127 | +} |
0 commit comments