I made my first Neovim Plugin!
If you’re like me, you’re always looking to improve your coding experience or just your daily workflow at the computer. This idea came from a simple need: I wanted a fast, minimal way to take notes without ever leaving Neovim. That’s why I built notekeeper.
What is notekeeper
?
notekeeper
is a lightweight note-taking plugin for Neovim, written in Lua. It allows you to quickly create and manage notes directly from your editor. No external dependencies, no distractions, just pure Vim-style note-taking.
Why I Built It
I kept finding myself constantly creating .txt
files in my project directories with names like Notes.txt
or IMPORTANT.txt
to write down things I didn’t want to forget.
Sure, I could just leave a TODO:
in the code and search for it later (like a normal programmer), but these notes usually weren’t directly related to the code or to a specific function. They were more like general thoughts, reminders, or decisions I wanted to keep track of.
So I wanted a way to centralize my notes locally, without having to worry about random files scattered across my projects.
Since I’m a Neovim user, I thought it would be a good idea to create a plugin to solve this issue. Not only would it address my personal problem, but it would also give me the chance to learn more about how Neovim plugins work. Plus, it was a great opportunity to dive into a new programming language — Lua — which I’ve always been curious about.
One of the plugins that inspired me was Harpoon, developed by ThePrimeagen (you might know him).
Harpoon is a plugin that lets you mark and quickly jump between important files. It basically gives you a fast and simple way to access frequently used files within Neovim. The idea of having a centralized spot for “important stuff” inside the editor really clicked with me, and that’s what motivated me to build something similar, but focused on personal notes and reminders.
How Does It Work?
When you press <leader> + n
, notekeeper
opens a custom buffer where you can freely write or update your notes. If there are already saved notes for the current project, they are automatically loaded into the buffer so you can pick up right where you left off.
Under the hood, the plugin creates a new, temporary buffer that is tied to your current working directory. A hash of the project path is used to uniquely identify and store the notes in a JSON file inside Neovim’s data directory (~/.local/share/nvim/notekeeper/
). This means every project has its own persistent note file, and switching between projects loads the correct notes automatically.
The buffer is set to behave like a regular file. When you save, the plugin captures the contents and stores them in the JSON file for that project. If you delete the content and save, it clears the stored note for that project.
Give it a try!
The plugin is open source and ready to use.
Feel free to check it out on GitHub, leave a star ⭐, open an issue, or contribute!