2023-05-20 10:16:24 +01:00
|
|
|
return {
|
|
|
|
"nvim-neorg/neorg",
|
2023-07-07 11:46:40 +01:00
|
|
|
cond = function() return vim.fn.executable "nix" == 1 end,
|
2023-05-20 10:16:24 +01:00
|
|
|
build = ":Neorg sync-parsers",
|
2023-06-10 08:29:21 +01:00
|
|
|
ft = "norg",
|
2023-05-20 12:44:21 +01:00
|
|
|
cmd = "Neorg",
|
|
|
|
lazy = true,
|
2023-06-12 18:59:08 +01:00
|
|
|
dependencies = { "plenary.nvim", "nvim-treesitter", "nvim-cmp" },
|
2023-05-20 12:44:21 +01:00
|
|
|
init = function()
|
|
|
|
vim.api.nvim_create_autocmd({ "BufWritePre" }, {
|
|
|
|
pattern = { "*.norg" },
|
|
|
|
command = "Neorg update-metadata",
|
|
|
|
})
|
2023-06-30 13:23:41 +01:00
|
|
|
vim.api.nvim_create_autocmd({ "BufReadPre", "BufNewFile" }, {
|
|
|
|
pattern = { "*.norg" },
|
|
|
|
command = "setlocal spell spelllang=en_gb",
|
|
|
|
})
|
2023-06-16 09:13:15 +01:00
|
|
|
vim.keymap.set("n", "<leader>wp", "<cmd>Neorg workspace personal <cr>")
|
|
|
|
vim.keymap.set("n", "<leader>ww", "<cmd>Neorg workspace work <cr>")
|
|
|
|
vim.keymap.set("n", "<leader>wr", "<cmd>Neorg return <cr>")
|
2023-06-15 17:50:51 +01:00
|
|
|
vim.keymap.set("n", "<leader>jo", "<cmd>Neorg journal today <cr>")
|
2023-06-30 10:42:28 +01:00
|
|
|
vim.keymap.set("n", "<leader>jc", "<cmd>Neorg journal custom <cr>")
|
2023-06-15 17:50:51 +01:00
|
|
|
vim.keymap.set("n", "<leader>jn", "<cmd>Neorg journal tomorrow <cr>")
|
|
|
|
vim.keymap.set("n", "<leader>jp", "<cmd>Neorg journal yesterday <cr>")
|
|
|
|
vim.keymap.set("n", "<leader>jt", "<cmd>Neorg journal template <cr>")
|
2023-05-20 12:44:21 +01:00
|
|
|
end,
|
2023-05-20 10:16:24 +01:00
|
|
|
opts = {
|
|
|
|
load = {
|
2023-05-20 12:44:21 +01:00
|
|
|
["core.defaults"] = {},
|
2023-05-23 21:11:16 +01:00
|
|
|
["core.concealer"] = { config = { icon_preset = "diamond" } },
|
|
|
|
["core.dirman"] = { config = { workspaces = { personal = "~/notes/personal", work = "~/notes/work" } } },
|
2023-05-20 12:44:21 +01:00
|
|
|
["core.completion"] = { config = { engine = "nvim-cmp" } },
|
2023-05-23 16:52:45 +01:00
|
|
|
["core.journal"] = {},
|
2023-05-20 13:21:42 +01:00
|
|
|
["core.presenter"] = { config = { zen_mode = "zen-mode" } },
|
2023-06-30 10:42:28 +01:00
|
|
|
["core.ui.calendar"] = {},
|
2023-05-20 10:16:24 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|