all repos

init.lua @ ed82a23

my nvim config

init.lua/lua/plugins/orgmode.lua(view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
local prefix = "<leader>;"
local dir = "~/org"

local function wrap(fn)
  return function()
    require("orgmode").action(fn)
  end
end

---@type LazySpec
return {
  "nvim-orgmode/orgmode",
  ft = { "org" },
  keys = {
    { "<leader>;a", wrap "agenda.prompt" },
    { "<leader>;c", wrap "capture.prompt" },
    { "<leader>;o", ("<cmd>e %s/refile.org<cr>"):format(dir) },
  },
  dependencies = {
    { "akinsho/org-bullets.nvim", config = true },
    {
      "nvim-orgmode/telescope-orgmode.nvim",
      ft = { "org" },
      dependencies = { "telescope.nvim" },
      config = function()
        require("telescope").load_extension "orgmode"
      end,
    },
  },
  ---@module "orgmode"
  ---@type OrgDefaultConfig
  opts = {
    org_default_notes_file = dir .. "/refile.org",
    org_agenda_files = dir .. "/**/*",
    mappings = {
      prefix = prefix,
      org = {
        org_open_at_point = "<CR>",
        org_return = false,
        org_export = false,
      },
    },
    org_capture_templates = {
      t = {
        description = "Task",
        template = "* TODO %?",
        target = "~/org/todolist.org",
      },
    },
  },
}