A Neovim plugin that enables code auditors to take notes about the code they're reviewing without modifying the source code. Everything is saved in the notes.md file at the project's root.
- Highlight code and add notes without changing the source
- Store all notes in a separate "notes.md" file
- Link notes to specific lines of code
- Display visual indicators on lines with notes
- Show relevant notes in a side panel when cursor is on a line with notes
- Edit notes directly in the panel and save changes to the notes file automatically
- Delete notes from the source code
- Use different icons for different type of notes
- Add a "question" note when starting with
? - Add a "possible finding" note when starting with
! - Add an "info" note when starting with any other symbol
- Add a "question" note when starting with
- Mark/unmark "reviewed" code
- Generate structured joint notes
- Generate Typst code from notes
- Deal with sourcecode changes
Using packer.nvim:
use {
'alwaystrueio/audit.nvim',
config = function()
require('audit').setup()
end
}Using vim-plug:
Plug 'alwaystrueio/audit.nvim'- Select text in visual mode
- Run
:AuditAddNote - Enter your note
- Notes will be saved to
notes.mdin your working directory
:AuditAddNote- Add a note for the selected text (visual mode only):AuditAddProjectNote- Add a project-wide note not tied to specific code:AuditTogglePanel- Toggle the notes panel on/off and enable/disable automatic panel display:AuditSyncNotes- Manually sync edited notes from the panel to the notes.md file
The plugin doesn't set any default keybindings. Here are examples of how to set up your own keybindings:
-- In your init.lua or other configuration file
-- Add a note from visual mode
vim.keymap.set('v', '<Leader>an', ':AuditAddNote<CR>', { noremap = true, silent = true })
-- Toggle the notes panel
vim.keymap.set('n', '<Leader>at', ':AuditTogglePanel<CR>', { noremap = true, silent = true })
-- Save changes from the panel (when the panel has focus)
vim.keymap.set('n', '<Leader>as', ':AuditSyncNotes<CR>', { noremap = true, silent = true })You can edit notes directly in the notes panel:
- When a note is displayed in the panel, you can modify its content.
- When you leave the panel, the note is automatically updated. You can also explicitly save your changes using the
:AuditSyncNotescommand.
Note that only the content of notes can be edited; the code snippets remain unchanged to preserve the original references.
The plugin works with default settings that can't be configured at the moment.
Notes are stored in a Markdown file with the following structure:
# Audit Notes
## path/to/file.ext
### Note 1 (Lines 10-15)
This is a note about the code.
<The actual code snippet>