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. |
The following Neovim commands are available:
-
: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.
Nb should be installed on your system and in your PATH.
Please refer to nb’s
installation guide for more information.
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
},
}
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.