Skip to content

Qol Toc

github-actions[bot] edited this page Jun 25, 2022 · 182 revisions

ToC Generation

Generates a Table of Content from the Neorg file.


In order to use this feature, just add a = TOC at some place, and call:

  • :Neorg toc split to generate a split in the side of your Toc (Table of Contents)
  • :Neorg toc inline to generate a Toc right below the = TOC insertion
  • :Neorg toc toqflist to send the table of contents to your quickfix list


How to Apply

  • To manually load the module, place this code in your Neorg setup:
    ["core.norg.qol.toc"] = {
       config = { -- Note that this table is optional and doesn't need to be provided
           -- Configuration here
    Consult the configuration section to see how you can configure core.norg.qol.toc to your liking.


close_split_on_jump : If you use default_toc_mode = "split", you can decide if you want the toc to persist until you close it. Else, it'll close automatically when following a link

Default value: false

toc_split_placement : Where to place the TOC ("left"/"right")

Default value: "left"

Developer Usage

Public API

This segment will detail all of the functions core.norg.qol.toc exposes. All of these functions reside in the public table.

  • toqflist
  • close
  • generate_toc
  • follow_link_toc
  • find_toc
  • display_toc


None Provided

Extra Info


This module supports at least version 0.0.11. The current Neorg version is 0.0.11.


This module does not import any other files.


  • core.integrations.treesitter - A module designed to integrate TreeSitter into Neorg.
  • core.ui - A set of public functions to help developers create and manage UI (selection popups, prompts...) in their modules.
  • core.keybinds - Module for managing keybindings with Neorg mode support.
  • core.mode - Modes are a way of isolating different parts of Neorg based on the current mode.
  • core.norg.esupports.hop - "Hop" between Neorg links, following them with a single keypress.
  • core.autocommands - Handles the creation and management of Neovim's autocommands.
  • core.neorgcmd - This module deals with handling everything related to the :Neorg command.

Required by

This module isn't required by any other module.