• Stars
    star
    187
  • Rank 206,464 (Top 5 %)
  • Language
    Lua
  • License
    GNU General Publi...
  • Created over 3 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Telescope.nvim integration for Neorg

Neorg Telescope

This repo hosts a 3rd party module for Neorg to integrate with telescope.nvim

🌟 Showcase

Fuzzy Searching Any Linkable

Simply jump to any important element in the workspace. This includes headings, drawers, markers. The command for this is Telescope neorg find_linkable

Demo find_linkable

Automatic Link Insertion

Simply press a key (<C-l> in insert mode by default) and select what you want to link to.

insert_link only works for elements in the current workspace.

Demo insert_link

Automatic File Link Insertion

You can use Telescope neorg insert_file_link to insert a link to a neorg file. Notice that this only works for files in the current workspace. Note: If no file is selected a link to a file with the name of the prompt value will be inserted. This file will be created if you use the link with neorg's hop

Demo insert_file_link

Fuzzy Searching Headings

With Telescope neorg search_headings you can search through all the headings in the current file.

Demo search_headings

Gtd Pickers

Those pickers are all broken since gtd was removed in core

The removed pickers

Find Project Tasks

Use Telescope neorg find_project_tasks to pick a project and then the tasks inside it. You can then jump to those tasks. If you select and empty project (colored gray) then you'll jump to the project.

Screen.Recording.2022-03-14.at.18.26.26.mov

Find Context Tasks

With Telescope neorg find_context_tasks you pick a context and then tasks.

Screen.Recording.2022-03-15.at.15.34.35.mov

Find AOF Tasks

You can use Telescope neorg find_aof_tasks to pick an aof and then search through the tasks of it.

Screen.Recording.2022-03-15.at.15.32.11.mov

Find AOF Project Tasks

When you use Telescope neorg find_aof_project_tasks you can pick an area of focus, then a project inside it and last but not least you can search for tasks inside the project.

Screen.Recording.2022-03-15.at.15.35.48.mov

🔧 Installation

First, make sure to pull this plugin down. This plugin does not run any code in of itself. It requires Neorg to load it first:

You can install it through your favorite plugin manager:

  • packer.nvim
    use {
        "nvim-neorg/neorg",
        config = function()
            require('neorg').setup {
                load = {
                    ["core.defaults"] = {},
                    ...
                    ["core.integrations.telescope"] = {}
                },
            }
        end,
        requires = { "nvim-lua/plenary.nvim", "nvim-neorg/neorg-telescope" },
    }
  • vim-plug
    Plug 'nvim-neorg/neorg' | Plug 'nvim-lua/plenary.nvim' | Plug 'nvim-neorg/neorg-telescope'

    You can then put this initial configuration in your init.vim file:

    lua << EOF
    require('neorg').setup {
      load = {
          ["core.defaults"] = {},
          ...
          ["core.integrations.telescope"] = {}
      },
    }
    EOF
  • lazy.nvim
    require("lazy").setup({
        {
            "nvim-neorg/neorg",
            opts = {
                load = {
                    ["core.defaults"] = {},
                    ...
                    ["core.integrations.telescope"] = {},
                },
            },
            dependencies = { { "nvim-lua/plenary.nvim" }, { "nvim-neorg/neorg-telescope" } },
        }
    })

Usage

You can define keybindings like this:

local neorg_callbacks = require("neorg.callbacks")

neorg_callbacks.on_event("core.keybinds.events.enable_keybinds", function(_, keybinds)
    -- Map all the below keybinds only when the "norg" mode is active
    keybinds.map_event_to_mode("norg", {
        n = { -- Bind keys in normal mode
            { "<C-s>", "core.integrations.telescope.find_linkable" },
        },

        i = { -- Bind in insert mode
            { "<C-l>", "core.integrations.telescope.insert_link" },
        },
    }, {
        silent = true,
        noremap = true,
    })
end)

Support Welcome

If it's not clear by the code already, I'm a solid noob at telescope related things :)

If you have any awesome ideas or any code you want to contribute then go ahead! Any sort of help is appreciated ❤️

Some Ideas Right Off The Top Of My Head

  • Fuzzy searching content in paragraphs only
  • Fuzzy searching content in the current heading

GIFs

Insert Link

insert_link_gif

More Repositories

1

neorg

Modernity meets insane extensibility. The future of organizing your life in Neovim.
Lua
6,236
star
2

tree-sitter-norg

A TreeSitter parser for the Neorg File Format
C
99
star
3

awesome-neorg

A collection of awesome Neorg notes, software and resources
87
star
4

neorg-lsp

An LSP for the Neorg file format.
Zig
38
star
5

norgopolis

A backend server for Norg related applications.
Rust
29
star
6

Norgberg

Norgberg is the database services module for Neorg, providing fast document data caching and module state storage.
Rust
25
star
7

norg-fmt

A formatter for Norg files.
Rust
22
star
8

example_workspaces

21
star
9

library-of-norgxandria

The Library of Alexandria, in .norg
21
star
10

rust-norg

A robust parser for Norg for tools that don't use tree-sitter.
Rust
10
star
11

tree-sitter-norg2

Attempt at a second generation parser for the Norg format.
JavaScript
9
star
12

dev-notes

All of our developer notes regarding ideas for new features and syntax.
9
star
13

tree-sitter-norg3

Third time's the charm.
JavaScript
9
star
14

tree-sitter-norg-table

A TreeSitter parser for Neorg's `table` Tag
C
7
star
15

tree-sitter-norg-meta

A TreeSitter parser for Neorg's `document.metadata` Tag
C
6
star
16

neorg-gtd

A cross-platform module for Getting Things Done in Neorg.
Rust
4
star
17

neorg-breeze

A library for parsing entire directories of Norg files in a multithreaded fashion.
Rust
4
star
18

lua-utils.nvim

A small, curated set of utilities for Neovim plugins.
Lua
3
star
19

norg-specs

A collection of specifications and grammars for Neorg's file format, `norg`.
1
star
20

nixpkgs-neorg-overlay

Nixpkgs overlay for Neorg and related packages
Nix
1
star
21

norgopolis-protos

A set of `.proto` files for Norgopolis services.
Rust
1
star
22

norgopolis-client

A Rust client for Norgopolis.
Rust
1
star