Skip to content
This repository has been archived by the owner on Aug 31, 2022. It is now read-only.
/ nerveux.nvim Public archive

A neovim plugin written in lua to interact with the neuron Zettelkasten software.

License

Notifications You must be signed in to change notification settings

pyrho/nerveux.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nerveux

A neovim lua plugin to interact with neuron.

nerveux_normal See this asciinema recording for a little demo.

Highlights

  • Display zettle titles inline via virtual text overlays
    • in insert mode, the virtual text is place at the end of line
  • Uses telescope.nvim for search zettels
  • Cached queries via neuron daemon
    • daemon lifecycle is handled by the plugin

Install

Using vim-plug

Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-lua/popup.nvim'
Plug 'nvim-telescope/telescope.nvim'
Plug 'pyrho/nerveux.nvim'

or packer

use {
    'pyrho/nerveux.nvim',
    requires = {
        'nvim-lua/plenary.nvim',
        'nvim-lua/popup.nvim',
        'nvim-telescope/telescope.nvim',
    },
    config = function() require"nerveux".setup() end,
}

Setup

Simply add the following somewhere in your config.

require 'nerveux'.setup()

You can override the defaults like so:

require 'nerveux'.setup {
    --- path to neuron executable (default: neuron in PATH)
    neuron_cmd = "neuron",

    --- no trailing slash, (default: cwd)
    neuron_dir = "/my/zettel/root/dir",

    --- Use the cache, significantly faster (default: false)
    use_cache = true,

    --- start the neuron daemon to keep the cache up to date (default: false)
    start_daemon = true,

    --- show zettel titles inline as virtual text (default: false)
    virtual_titles = true,

    --- Automatically create mappings (default: false)
    create_default_mappings = true,

    --- The Highlight Group used for the inline zettel titles (default: Special)
    virtual_title_hl = "Special",
    virtual_title_hl_folge = "Repeat",

    --- `kill -9` the pid of the daemon at exit (VimPreLeave), only valid is
    -- start_daemon is true (default: false)
    kill_daemon_at_exit = true,
}

Default Mappings

  • gzz: Search all your zettels
    • then <CR> to edit
    • then <Tab> to insert the selected zettel into buffer
  • gzb: Search backlinks
    • then <CR> to edit
  • gzu: Search uplinks
    • then <CR> to edit
  • gzn: Create a new zettel
  • <CR>: Follow link under cursor

Similar plugins