1
Fork 0
satellite/dotfiles/neovim/lua/my/plugins/neorg.lua

55 lines
1.5 KiB
Lua
Raw Normal View History

2023-04-17 21:01:50 +02:00
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
2023-04-17 21:01:50 +02:00
["core.integrations.telescope"] = {},
-- {{{ Completions
["core.norg.completion"] = {
config = {
engine = "nvim-cmp",
},
},
-- }}}
-- {{{ Dirman
["core.norg.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