nvim/lua/plugins/nvim_neorg.lua

39 lines
1.7 KiB
Lua
Raw Normal View History

return {
"nvim-neorg/neorg",
2023-06-10 08:29:21 +01:00
cond = function() return vim.fn.executable "nix" == 1 and not vim.g.vscode end,
build = ":Neorg sync-parsers",
2023-06-10 08:29:21 +01:00
ft = "norg",
cmd = "Neorg",
lazy = true,
dependencies = { "plenary.nvim", "nvim-treesitter", "nvim-cmp" },
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",
})
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" } },
2023-05-23 16:52:45 +01:00
["core.journal"] = {},
["core.presenter"] = { config = { zen_mode = "zen-mode" } },
["core.ui.calendar"] = {},
},
},
}