--FIXME: own this return { 'nvim-neorg/neorg', dependencies = { 'nvim-lua/plenary.nvim', 'nvim-treesitter/nvim-treesitter', 'jbyuki/venn.nvim', }, build = ':Neorg sync-parsers', keys = { { '', ':VBox', mode = 'v', }, }, ft = 'norg', cmd = 'Neorg', opts = { load = { ['core.defaults'] = {}, -- Loads default behaviour ['core.concealer'] = { -- Adds pretty icons to your documents config = { icons = { todo = { undone = { icon = ' ', }, }, }, }, }, ['core.completion'] = { config = { engine = 'nvim-cmp', }, }, -- This is deleting the non-empty contents of files -- ["core.esupports.metagen"] = { -- config = { -- type = "auto", -- }, -- }, ['core.presenter'] = { config = { zen_mode = 'zen-mode', }, }, ['core.keybinds'] = { config = { hook = function ( keybinds ) keybinds.unmap( 'norg', 'n', '' ) keybinds.unmap( 'presenter', 'n', 'l' ) keybinds.unmap( 'presenter', 'n', 'h' ) keybinds.unmap( 'presenter', 'n', '' ) keybinds.unmap( 'presenter', 'n', 'q' ) -- Unmaps any Neorg key from the `norg` mode keybinds.remap_event( 'presenter', 'n', '', 'core.presenter.next_page' ) keybinds.remap_event( 'presenter', 'n', '', 'core.presenter.next_page' ) keybinds.remap_event( 'presenter', 'n', '', 'core.presenter.previous_page' ) keybinds.remap_event( 'presenter', 'n', '', 'core.presenter.previous_page' ) keybinds.remap_event( 'presenter', 'n', '', 'core.presenter.close' ) keybinds.map( 'norg', 'n', '', 'Neorg presenter start' ) end, }, }, }, }, config = function ( _, opts ) local neorg = require 'neorg' neorg.setup( opts ) local ok, quick_action = pcall( require, 'quick_action' ) if ok then quick_action.add( 'menu', { name = 'Toggle todo status', condition = function () if vim.bo.filetype ~= 'norg' then return false end local lnum = vim.api.nvim_win_get_cursor( 0 )[1] - 1 local todo_module = neorg.modules.get_module 'core.qol.todo_items' local item = todo_module and todo_module.get_todo_item_from_cursor( 0, lnum ) local row = item and item:start() return row == lnum end, action = function () vim.cmd 'Neorg keybind norg core.qol.todo_items.todo.task_cycle' end, } ) end end, }