-- Neorg - An organized future for Neovim -- https://github.com/nvim-neorg/neorg -- -- Documentation: https://github.com/nvim-neorg/neorg/wiki -- Modules reference: https://github.com/nvim-neorg/neorg/wiki/User-Modules-Reference return { "nvim-neorg/neorg", lazy = false, -- Disable lazy loading to ensure proper initialization -- Pin the version for stability - you can update when ready version = "*", -- Use the latest stable version dependencies = { "nvim-lua/plenary.nvim", -- Already should be installed in your config "nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter-textobjects", "hrsh7th/nvim-cmp", -- Proper repository path for nvim-cmp }, build = ":Neorg sync-parsers", -- This will install the Neorg treesitter parser config = function() require("neorg").setup { load = { -- Load the core modules that provide basic functionality ["core.defaults"] = {}, -- Loads default modules -- Essential modules for a good experience ["core.concealer"] = { config = { icon_preset = "diamond", -- Icon style: basic, diamond, varied icons = { -- Custom icons for improved visual appearance heading = { icons = { "◉", "○", "✸", "✿" }, -- Cycle through these for heading levels }, -- Keep default values for other icons todo = { pending = { icon = "" }, -- Keep the default }, }, folds = true, -- Enable folding of nested content performance = { conceal_modifier_pre = 200, -- Optimized conceal performance conceal_modifier_post = 300, concealer_weight_implies_priority = true, }, }, }, -- For managing directories of .norg files - required for many features ["core.dirman"] = { config = { workspaces = { notes = "~/notes", -- General notes work = "~/work/notes", -- Work-related notes personal = "~/personal/notes", -- Personal notes projects = "~/projects/notes", -- Project-specific notes }, default_workspace = "notes", index = "index.norg", -- Default index file to look for }, }, -- Enhance completion capabilities - integrates with your existing completion ["core.completion"] = { config = { engine = "nvim-cmp", -- Use nvim-cmp for completion name = "neorg", -- Source name for nvim-cmp -- Customize completion behavior snippet_engine = nil, -- Will use your configured snippet engine trigger_on_carriage_return = true, -- Trigger completion when pressing Enter }, }, -- Export your Neorg files to other formats ["core.export"] = {}, -- Base export module ["core.export.markdown"] = { config = { extensions = "all", -- Export all extensions versioning = { -- Add version information to exported files enabled = true, -- Pattern: {year}{month}{day}{hour}{min}{sec}_filename.md pattern = "%Y%m%d%H%M%S_{name}.md", }, }, }, -- For a nicer table of contents ["core.qol.toc"] = { config = { toc_title = "Table of Contents", -- Title of the TOC close_after_use = true, -- Close TOC after jumping to a heading default_level = 4, -- Show headings up to this level toc_position = "right", -- Position of the TOC window }, }, -- For taking journal notes ["core.journal"] = { config = { strategy = "flat", -- "flat" for single files, "nested" for year/month/day structure workspace = "notes", -- Use the notes workspace for journal entries journal_folder = "journal", -- Store journal entries in this subfolder use_template = false, -- Whether to use a template for new entries template_name = nil, -- Optional template name if use_template is true zipper_indicator = false, -- Show indicators for fast navigation }, }, -- Summary generation for notes (new module) ["core.summary"] = {}, -- Enhanced UI presentation mode ["core.presenter"] = { config = { zen_mode = "zen-mode", -- Zen mode plugin to use (if installed) slide_count = true, -- Show slide count in presenter mode } }, -- Enhance keybinds with custom modes ["core.keybinds"] = { -- This config is crucial for avoiding keybinding conflicts config = { -- All Neorg keybindings are only active inside .norg files -- They won't affect your existing keymaps in other file types default_keybinds = true, neorg_leader = "n", -- Use n as the Neorg prefix -- Custom keybinds organized by category hook = function(keybinds) -- Navigation keybinds keybinds.map("norg", "n", "nj", "Neorg journal today", { desc = "Open today's journal" }) keybinds.map("norg", "n", "nyt", "Neorg journal yesterday", { desc = "Open yesterday's journal" }) keybinds.map("norg", "n", "ntm", "Neorg journal tomorrow", { desc = "Open tomorrow's journal" }) -- Workspace management keybinds.map("norg", "n", "nw", "Neorg workspace", { desc = "Open workspace selector" }) keybinds.map("norg", "n", "nn", "Neorg workspace notes", { desc = "Switch to notes workspace" }) keybinds.map("norg", "n", "nwp", "Neorg workspace personal", { desc = "Switch to personal workspace" }) -- Document manipulation keybinds.map("norg", "n", "ntt", "Neorg toc", { desc = "Generate table of contents" }) keybinds.map("norg", "n", "ni", "Neorg inject-metadata", { desc = "Inject metadata" }) keybinds.map("norg", "n", "nm", "Neorg update-metadata", { desc = "Update metadata" }) -- Export commands keybinds.map("norg", "n", "nem", "Neorg export to-markdown", { desc = "Export to Markdown" }) -- Toggle concealer keybinds.map("norg", "n", "nc", "Neorg toggle-concealer", { desc = "Toggle concealer" }) -- Return to last workspace keybinds.map("norg", "n", "nl", "Neorg return", { desc = "Return to last workspace" }) -- Advanced keybinds for list manipulation keybinds.map_event("norg", "n", "nu", "core.itero.next-iteration", { desc = "Iterate next" }) keybinds.map_event("norg", "n", "np", "core.itero.previous-iteration", { desc = "Iterate previous" }) end, }, }, -- Module for better list handling ["core.itero"] = {}, -- UI improvements for better look and feel ["core.ui"] = {}, ["core.ui.calendar"] = {}, -- Calendar view for journal navigation }, } end, }