Skip to content

Completion

github-actions[bot] edited this page Feb 25, 2025 · 69 revisions

core.completion

Get completions in Neorg files

Overview

This module is an intermediary between Neorg and the completion engine of your choice. After setting up this module (this usually just involves setting the engine field in the configuration section), please read the corresponding wiki page for the engine you selected (nvim-cmp coq_nvim or nvim-compe) to complete setup.

Completions are provided in the following cases (examples in (), | represents the cursor location):

  • TODO items (- (|)
  • @ tags (@|)
  • # tags (#|)
  • file path links ({:|) provides workspace relative paths (:$/workspace/relative/path:)
  • header links ({*|)
  • fuzzy header links ({#|)
  • footnotes ({^|)
  • file path + header links ({:path:*|)
  • file path + fuzzy header links ({:path:#|)
  • file path + footnotes ({:path:^|)
  • anchor names ([|)
  • link names ({<somelink>}[|)

Header completions will show only valid headers at the current level in the current or specified file. All link completions are smart about closing : and }.

Configuration

  • engine
    (nil)

    The engine to use for completion.

    Possible values:

    • "nvim-cmp"
    • "coq_nvim"
    • "nvim-compe"
    • { module_name = "external.lsp-completion" } this must be used with neorg-interim-ls and can provide completions through a shim Language Server. This allows users without an auto complete plugin to still get Neorg completions
    nil
  • name
    (string)

    The identifier for the Neorg source.

    "[Neorg]"

Dependencies

Clone this wiki locally