A Neovim plugin for efficiently capturing and organizing code snippets and notes directly from your editor.
When reviewing code in a project, it's often helpful to take notes with comments and explanations about the code’s functionality. However, manually copying code into a separate file for note-taking can be tedious, and it’s easy to lose context and references in the process.
Introducing neatnotes.nvim – a simple note-taking plugin that automatically creates a dedicated note file for your project. It inserts the selected code snippet with references to the file and line numbers in a clean, easy-to-read markdown format.
- Take notes from visually selected code
- Floating window support
- Automatic language detection for syntax highlighting
- Reference tracking with file paths and line numbers
Using lazy.nvim
{
"guglielmobartelloni/neatnotes.nvim",
config = function()
require("neatnotes").setup()
end
}
Using packer.nvim
use {
'guglielmobartelloni/neatnotes.nvim',
config = function()
require('neatnotes').setup()
end
}
- Select text in visual mode
- Use either:
- Command:
:TakeNote
- Default keybinding:
<leader>tn
- Command:
Notes are stored in ~/.local/share/nvim/
require('neatnotes').setup({
notes_dir = "/your/custom/path/",
use_floating_window = false,
})
MIT