Skip to content

shoebox/nb.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation


nb.nvim

About

A Neovim plugin for writing and using nb notebook, written in Lua.

It provides basic but powerful integration with nb, allowing you to use Neovim command to interact with your notebook(s).

It do not emulate any feature from the nb command-line and totally rely on it to create, read and update notes into the active notebook.

Warning
This is a WIP
This plugin is a work in progress and may not be stable.
Please use it with caution.

Available commands

The following Neovim commands are available:

General

  • :NbSelectNotebook
    Switch to another notebook.

Note taking

  • :NbAddNote
    Creates a new note into the active notebook. This command has two optional argument: the containing folder and name of the new note. If not provided, it will prompt you to enter the folder and name.

  • :NbEditNote
    To open and edit an existing note in the active notebook. This command has two optional argument: the containing folder and name of the new note. If not provided, it will prompt you to enter the folder and name.

Journaling

  • :NbToday
    To create and/or update today’s journal entry into the active notebook.

  • :NbYesterday
    To create and/or update yesterday’s journal entry into the active notebook.

  • :NbTomorrow
    To create and/or update tomorrow’s journal entry into the active notebook.

Install and configure

System requirements

Nb should be installed on your system and in your PATH.
Please refer to nb’s installation guide for more information.

Using Packer

Example of configuration using Packer
return {
  "shoebox/nb.nvim",
  cmd = {
    "NbAddNote",
    "NbEditNote",
    "NbSelectNotebook",
    "NbToday",
    "NbYesterday",
    "NbTomorrow",
  },
  config = function()
    require("nb-nvim").setup({
      notebook = "<<your-default-notebook>>", -- Replace with your default notebook name
    })
  end,
  dependencies = {
    "nvim-telescope/telescope-ui-select.nvim", -- Optional for Telescope UI
  },
}

Configuration

You can configure the following properties:

  • playbook (string):
    The default notebook to use. Can be changed dynamically with :NbSelectNotebook.

  • extension (string, optional):
    Override the default note file extension. Allow to override the default note file extension.
    If not provided default to the nb configuration.

  • debug (boolean):
    Enable debug mode for troubleshooting.

About

Neovim plugin for wmx/nb

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages