Evie Litherland-Smith
85cc28db9d
TODO taskwarrior needs fixing for proper use Enable nable virt text in neorg files Add Alpha shortcuts for neorg workspaces
43 lines
1.9 KiB
Lua
43 lines
1.9 KiB
Lua
return {
|
|
"nvim-neorg/neorg",
|
|
cond = function() return vim.fn.executable "nix" == 1 end,
|
|
build = ":Neorg sync-parsers",
|
|
ft = "norg",
|
|
cmd = "Neorg",
|
|
lazy = true,
|
|
dependencies = { "plenary.nvim", "nvim-treesitter", "nvim-cmp", "nabla.nvim" },
|
|
init = function()
|
|
vim.api.nvim_create_autocmd({ "BufWritePre" }, {
|
|
pattern = { "*.norg" },
|
|
command = "Neorg update-metadata",
|
|
})
|
|
vim.api.nvim_create_autocmd({ "BufReadPre", "BufNewFile" }, {
|
|
pattern = { "*.norg" },
|
|
command = "setlocal spell spelllang=en_gb",
|
|
})
|
|
vim.api.nvim_create_autocmd({ "BufReadPost", "BufNewFile" }, {
|
|
pattern = { "*.norg" },
|
|
command = "lua require('nabla').enable_virt()",
|
|
})
|
|
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>")
|
|
vim.keymap.set("n", "<leader>jo", "<cmd>Neorg journal today <cr>")
|
|
vim.keymap.set("n", "<leader>jc", "<cmd>Neorg journal custom <cr>")
|
|
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>")
|
|
end,
|
|
opts = {
|
|
load = {
|
|
["core.defaults"] = {},
|
|
["core.concealer"] = { config = { icon_preset = "diamond" } },
|
|
["core.dirman"] = { config = { workspaces = { personal = "~/notes/personal", work = "~/notes/work" } } },
|
|
["core.completion"] = { config = { engine = "nvim-cmp" } },
|
|
["core.journal"] = {},
|
|
["core.presenter"] = { config = { zen_mode = "zen-mode" } },
|
|
["core.ui.calendar"] = {},
|
|
},
|
|
},
|
|
}
|