Forked off from https://github.com/lyz-code/telescope-orgmode.nvim with custom hacky extensions
Go to file
2024-03-31 03:10:54 -05:00
lua feat: support tag searching, highlights 2024-03-31 03:10:54 -05:00
LICENSE Add MIT LICENSE 2022-11-02 00:41:49 +01:00
README.md docs: improve installation instructions 2024-02-09 15:08:40 +01:00
stylua.toml chore: add stylua config for unified styling 2024-02-11 15:01:03 +01:00

telescope-orgmode.nvim

Integration for orgmode with telescope.nvim.

Demo

Jump to to any heading in org_agenda_files with :Telescope orgmode search_headings

asciicast

Refile heading from capture or current file under destination with :Telescope orgmode refile_heading

asciicast

Installation

With lazyvim

  {
    "lyz-code/telescope-orgmode.nvim",
    event = "VeryLazy",
    dependencies = {
      "nvim-orgmode/orgmode",
      "nvim-telescope/telescope.nvim",
    },
    config = function()
      require("telescope").load_extension("orgmode")

      vim.keymap.set("n", "<leader>r", require("telescope").extensions.orgmode.refile_heading)
      vim.keymap.set("n", "<leader>fh", require("telescope").extensions.orgmode.search_headings)
    end,
  }

Without lazyvim

You can setup the extension by doing:

require('telescope').load_extension('orgmode')

To replace the default refile prompt:

vim.api.nvim_create_autocmd('FileType', {
  pattern = 'org',
  group = vim.api.nvim_create_augroup('orgmode_telescope_nvim', { clear = true }),
  callback = function()
    vim.keymap.set('n', '<leader>or', require('telescope').extensions.orgmode.refile_heading)
  end,
})

Available commands

:Telescope orgmode search_headings
:Telescope orgmode refile_heading

Available functions

require('telescope').extensions.orgmode.search_headings
require('telescope').extensions.orgmode.refile_heading