Skip to content

Latest commit

 

History

History
173 lines (154 loc) · 4.51 KB

plugins.org

File metadata and controls

173 lines (154 loc) · 4.51 KB

Plugins

📝 NOTE: If you create a plugin for orgmode, make sure to tag it with orgmode-nvim on github and submit an issue/PR to add it to this list.

Orgmode supports various plugins to extend its functionality or make it more pretty and user friendly:

Extend orgmode

org-roam.nvim

Link: org-roam.nvim

This is the port of Emacs org-roam.

sniprun

Link: sniprun

Plugin for code block evaluation.

telescope-orgmode.nvim

Link: telescope-orgmode.nvim Telescope extension for orgmode that adds fuzzy finding of orgmode files, headlines, etc.

Completion plugins

blink.cmp

Link: blink.cmp

Add the orgmode provider and enable it for org filetype.

require('blink.cmp').setup({
  sources = {
    per_filetype = {
      org = {'orgmode'}
    },
    providers = {
      orgmode = {
        name = 'Orgmode',
        module = 'orgmode.org.autocompletion.blink',
        fallbacks = { 'buffer' },
      },
    },
  },
})

nvim-cmp

Link: nvim-cmp Add the orgmode source to nvim-cmp sources list.
require('cmp').setup({
  sources = {
    { name = 'orgmode' }
  }
})

Aestehtics

org-bullets.nvim

Link: org-bullets.nvim Port of Emacs org-bullets.

Run after the orgmode setup.

-- Your orgmode setup
require('orgmode').setup()

--Setup org-bullets
require('org-bullets').setup()

headlines.nvim

Link: headlines.nvim

Plugin that adds some additional highlights to headlines.

-- Your orgmode setup
require('orgmode').setup()

--Setup headlines.nvim
require("headlines").setup()

Other

To view all plugins that are tagged for nvim-orgmode, visit orgmode-nvim github tag.

📝 NOTE: If you create a plugin for orgmode, make sure to tag it with orgmode-nvim on github and submit an issue/PR to add it to this list.

Example configuration

Example configuration with few of these plugins using lazy.nvim:
{
  'nvim-orgmode/orgmode',
  dependencies = {
    'nvim-telescope/telescope.nvim',
    'nvim-orgmode/telescope-orgmode.nvim',
    'nvim-orgmode/org-bullets.nvim',
    'Saghen/blink.cmp'
  },
  event = 'VeryLazy',
  config = function()
    require('orgmode').setup({
      org_agenda_files = '~/orgfiles/**/*',
      org_default_notes_file = '~/orgfiles/refile.org',
    })
    require('org-bullets').setup()
    require('blink.cmp').setup({
      sources = {
        per_filetype = {
          org = {'orgmode'}
        },
        providers = {
          orgmode = {
            name = 'Orgmode',
            module = 'orgmode.org.autocompletion.blink',
            fallbacks = { 'buffer' },
          },
        },
      },
    })

    require('telescope').setup()
    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)
    vim.keymap.set('n', '<leader>li', require('telescope').extensions.orgmode.insert_link)
  end,
}