Back to Neorg

Neorg Cookbook

res/wiki/static/Cookbook.md

9.6.41.3 KB
Original Source

Neorg Cookbook

This document details a bunch of snippets and prebuilt configurations for individual modules for a just works experience.

[!TIP] If you're looking for a quickstart setup to get you started with Neorg, check out the kickstart page instead.

Completion with nvim-cmp

Requirements

Steps

  1. In your Neorg configuration:

    lua
    load = {
        ["core.defaults"] = {},
        ["core.completion"] = {
            config = {
                engine = "nvim-cmp",
            }
        },
        ["core.integrations.nvim-cmp"] = {},
    }
    
  2. In your nvim-cmp configuration:

    lua
    sources = cmp.config.sources({
        -- ... your other sources here
        { name = "neorg" },
    })
    

Latex Rendering

Requirements

  • A terminal with kitty graphics protocol support (kitty/ghostty)
  • image.nvim installed and set up

Steps

  1. In your Neorg configuration:

    lua
    load = {
        ["core.integrations.image"] = {},
        ["core.latex.renderer"] = {},
    }
    
  2. Place some maths within maths blocks ($| ... |$):

    norg
    $|Hello, \LaTeX|$
    
  3. Run :Neorg render-latex.