jot.lua
A note file per project. When you have an idea, note, something to copy later, just open the window and write it down. The note will be persisted.
Features:
- Togglable note per project in a
markdownfile. - Customizable jot window (Only for neovim 0.10+)
Installation
- With lazy.nvim
{ "letieu/jot.lua", dependencies = { "nvim-lua/plenary.nvim" } } - With packer.nvim
use { 'letieu/jot.lua', requires = {{'nvim-lua/plenary.nvim'}} }
Usage
Open
require('jot').open()
Close use quit_key in config
Toggle
require('jot').toggle()
Map open to a key
vim.keymap.set("n", "<leader>fj", function() require("jot").open() end)
Custom window options when open, toggle
require('jot').toggle({
relative = "editor",
width = 100,
height = 30,
row = 5,
col = 35,
})
Config
Default config
{
quit_key = "q",
notes_dir = vim.fn.stdpath("data") .. "/jot",
win_opts = {
split = "right",
focusable = false,
},
}
win_opts : [neovim docs](https://neovim.io/doc/user/api.html#nvim_open_win())
Customize config to open in floating window (Only for neovim 0.10+)
{
quit_key = "q",
notes_dir = vim.fn.stdpath("data") .. "/jot",
win_opts = {
relative = "editor",
width = 100,
height = 30,
row = 5,
col = 35,
},
}
Q&A
- What differentiates
jot.luafromflote.nvim?flote.nvimopen in a floating window, I want to open in a split window.jot.luacan customize the window options. Can use floating window if you want.jot.luauseplenary.nvimto handle file operations.jot.luano needsetupcall
Inspiration and Thanks
- Flote.nvim by @JellyApple102