1
Fork 0
satellite/dotfiles/neovim/lua/my/plugins/neorg.lua
2023-05-10 03:57:27 +02:00

55 lines
1.4 KiB
Lua

local M = {
"nvim-neorg/neorg",
build = ":Neorg sync-parsers",
dependencies = { "nvim-lua/plenary.nvim", "nvim-neorg/neorg-telescope" },
ft = "norg",
config = function()
require("neorg").setup({
load = {
["core.defaults"] = {}, -- Loads default behaviour
["core.concealer"] = {}, -- Adds pretty icons to your documents
["core.integrations.telescope"] = {},
-- {{{ Completions
["core.completion"] = {
config = {
engine = "nvim-cmp",
},
},
-- }}}
-- {{{ Dirman
["core.dirman"] = { -- Manages Neorg workspaces
config = {
workspaces = {
notes = "~/Neorg",
["uni-notes"] = "~/Projects/uni-notes",
},
},
},
-- }}}
-- {{{ Keybinds
["core.keybinds"] = {
config = {
hook = function(keybinds)
-- Binds the `gtd` key in `norg` mode to execute `:echo 'Hello'`
keybinds.map("norg", "n", "gtd", "<cmd>echo 'Hello!'<CR>")
end,
},
},
-- }}}
},
})
-- {{{ Lazy cmp loading
vim.api.nvim_create_autocmd("InsertEnter", {
group = vim.api.nvim_create_augroup("CmpSourceNeorg", {}),
pattern = "*.norg",
callback = function()
require("cmp").setup.buffer({ sources = { { name = "neorg" } } })
end,
})
-- }}}
end,
}
return M