Home

Awesome

jot.lua

Screenshot 2024-03-26 at 4 23 29 PM

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:

Installation

{
  "letieu/jot.lua",
  dependencies = { "nvim-lua/plenary.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

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

Inspiration and Thanks