Skip to content

Latest commit

 

History

History
74 lines (56 loc) · 2.78 KB

README.md

File metadata and controls

74 lines (56 loc) · 2.78 KB

orgWiki.nvim

This plugin implements a subset of features from the popular vimwiki plugin for org filetype. Written in pure lua

Note: This plugin is still experimental. Would be grateful for any bug reports or suggestions for improvement where necessary

Features

  • Create hyperlink for <cWORD> and easily navigate between links
  • Create and maintain wikis
  • Switch between Wikis
  • Create diary entries
  • Autogenerate and update diary index
  • Preview linked file in a popup window

Configuration

Install the plugin using your favourite plugin manager Example for packer.nvim

use {"ranjithshegde/orgWiki.nvim"}

The plugin follows similar method of configuration like many other lua plugins via calling the setup function with a opts table

This function initializes orgWiki by setting keymaps and defining path variables opts as a table that must include the following

wiki_path: A list of directories to be recognized as orgWiki

diary_path: A string containing the path to the direcotry where diary entries must be stored

if you do not wish for the plugin to create the mappings you can use this option disable_mappings = true

keys: optional table with values to set up keybindings. When any of the keys are omitted, default mappings are used. Below shows the list of key options with its default mappings

  • create_or_follow = "<CR>", -- Follow hyperlink under cursor
  • traverse_back = "<BS>", -- Return to the parent file or top of the link stack
  • goto_next = ]w, -- Go to next hyperlink in the file
  • goto_prev = "[w", -- Go to prevvious hyperlink in the file
  • hover = "K", -- Preview the linked file in a popup window
  • open_index = "<leader>ww", -- Open the default orgWiki index file
  • open_index_tab = "<leader>wt", -- Open the default wiki in a new tab
  • open_choice_index = "<leader>wc", -- Open a wiki from list
  • open_next_index = "<leader>wn", -- Switch to the next wiki if available
  • open_diary_index = "<leader>wi", -- Open the diary index file
  • diary_update = "<leader>w<leader>i", -- Update the diary index files with new available entries
  • diary_today = "<leader>w<leader>w", -- Open a new diary entry ("Today")
  • diary_tomorrow = "<leader>w<leader>t", -- Open a new diary entry ("Tomorrow")
  • diary_yesterday = "<leader>w<leader>y", -- Open yesterday's diary entry

example

    use {
        "ranjithshegde/orgWiki.nvim",
        config = function()
            require("orgWiki").setup {
                wiki_path = { "~/Documents/Orgs/" },
                diary_path = "~/Documents/Orgs/diary/",
            }
        end,
    }

TODO

  • Diary - Replace hyperlink tag with #+TITLE: preamble (if exists)
  • Add hover popup to preview the contents of hyperlinked file
  • Future: Add roadmap